LaTeX2Wiki
Материал из SRNS
Версия от 23:01, 5 апреля 2011; Korogodin (обсуждение | вклад)
LaTeX2Wiki - Python-скрипт, конвертирующий LaTeX разметку в Wiki разметку. Скрипт можно скачать по ссылке
Поддерживаемые инструкции
Скрипт примитивен и рассчитан на обработку следующих команд LaTeX:
| LaTeX | replacement wikitext |
|---|---|
| \cite{} | ([#References|references]) |
| \emph{ txt } | ''txt'' |
| \texit{ txt } | ''txt'' |
| \texttt{ txt } | =txt= |
| \textbf{ txt } | '''txt''' |
| \textt{ txt } | =txt= |
| \begin{ equation }(*?) or \[ | <center><math> |
| \end{ equation }(*?) or \] | </math></center> |
| \begin{ eqnarray }(*?) | <center><math><\begin{matrix}> |
| \end{ eqnarray }(*?) | <\end{matrix}></math></center> |
| \begin{ align }(*?) | <center><math><\begin{matrix}> |
| \end{ align }(*?) | <\end{matrix}></math></center> |
| \begin{ aligned }(*?) | |
| \end{ aligned }(*?) | |
| \begin{ subequations }(*?) | |
| \end{ subequations }(*?) | |
| $ | <math>or </math> |
| \begin{verbatim} | <br><code> |
| \end{verbatim} | </code><br> |
| \[..]section | appropriate wiki heading level |
Пример использования
python LaTeX2Wiki.py < infile.tex >outfile.wiki
Perl-скрипт
Существует аналогичный Perl-скрипт, возможно с б'ольшими возможностями. Скачать можно тут, но всегда лучше найти более свежую версию в интернете.
Пример обращения:
perl LaTeX2wiki.pl infile.tex >outfile.html
Документация:
perl LaTeX2wiki.pl -h