Skip to content

Commit d273ed1

Browse files
authoredFeb 1, 2017
Merge pull request #212 from getnikola/fixing-doc
Fixing LaTeX plugin Markdown
2 parents 7c9fbb8 + 068218c commit d273ed1

File tree

1 file changed

+41
-38
lines changed

1 file changed

+41
-38
lines changed
 

‎v7/latex/README.md

+41-38
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,54 @@ The following LaTeX or LaTeX-similar constructs can be used:
1414
* `\begin{center} ... \end{center}` can be used for centered text.
1515
* `\begin{blockquote} ... \end{blockquote}` can be used for block quotes.
1616
* Formulae:
17-
* Everything of the form `$...$`, `\( ... \)` for inline formulae.
18-
* Everything of the form `$$...$$`, `\[ ... \]` for display-style formulae.
19-
* `\begin{align} ... \end{align}` and `\begin{align*} ... \end{align*}` for
20-
aligned formulae from the AMSMath package. Note that no equation numbers will be used in HTML output, and that you cannot use `\label{...}` and `\ref{...}` with `\begin{align}` environments.
21-
* Everything of the form `\begin{pstricks}{...} ... \end{pstricks}`.
22-
* Everything of the form `\begin{tikzpicture}[...] ... \end{tikzpicture}`.
23-
* There is a special environment for lists of formulae which can be rearranged in multiple columns: `\begin{formulalist} \formula{$1+1$} \formula{$f(x)$} ... \end{formulalist}`
24-
The `\begin{formulalist}` can have an optional argument which indicates the number of columns. This is currently not used.
17+
* Everything of the form `$...$`, `\( ... \)` for inline formulae.
18+
* Everything of the form `$$...$$`, `\[ ... \]` for display-style formulae.
19+
* `\begin{align} ... \end{align}` and `\begin{align*} ... \end{align*}` for
20+
aligned formulae from the AMSMath package. Note that no equation numbers will be used in HTML output, and that you cannot use `\label{...}` and `\ref{...}` with `\begin{align}` environments.
21+
* Everything of the form `\begin{pstricks}{...} ... \end{pstricks}`.
22+
* Everything of the form `\begin{tikzpicture}[...] ... \end{tikzpicture}`.
23+
* There is a special environment for lists of formulae which can be rearranged in multiple columns: `\begin{formulalist} \formula{$1+1$} \formula{$f(x)$} ... \end{formulalist}`
24+
The `\begin{formulalist}` can have an optional argument which indicates the number of columns. This is currently not used.
2525

26-
Please note that the use of align-style formulae, PSTricks images and TikZ pictures requires the [`latex_formula_renderer` plugin](https://plugins.getnikola.com/v7/latex_formula_renderer/); see below for more information.
26+
Please note that the use of align-style formulae, PSTricks images and TikZ pictures requires the [`latex_formula_renderer` plugin](https://plugins.getnikola.com/v7/latex_formula_renderer/); see below for more information.
2727

2828
* Enumerations:
29-
* Ordered enumerations with `\begin{enumerate} \item ... \end{enumerate}`.
30-
* Unordered enumerations with `\begin{itemize} \item ... \end{itemize}`.
29+
* Ordered enumerations with `\begin{enumerate} \item ... \end{enumerate}`.
30+
* Unordered enumerations with `\begin{itemize} \item ... \end{itemize}`.
3131
* Source code:
32-
* Inline with `\code{lang}{...}` or `\code{lang}|...|`, where `lang` specifies the language and `|` can also be any other character than `{` and `[` which marks both the beginning and the end of the inline code.
33-
* Block with `\begin{codelisting}{lang} ... \end{codelisting}`.
32+
* Inline with `\code{lang}{...}` or `\code{lang}|...|`, where `lang` specifies the language and `|` can also be any other character than `{` and `[` which marks both the beginning and the end of the inline code.
33+
* Block with `\begin{codelisting}{lang} ... \end{codelisting}`.
34+
35+
The language field is currently passed unprocessed to pygments.
3436

35-
The language field is currently passed unprocessed to pygments.
3637
* Controls like `\\` and `\newpar`.
3738
* Section headers like `\chapter{...}`, `\section{...}`, `\subsection{...}` and `subsubsection{...}`.
3839
* Theorem environments:
39-
* `\begin{definition} ... \end{definition}`;
40-
* `\begin{definitions} ... \end{definitions}`;
41-
* `\begin{lemma} ... \end{lemma}`;
42-
* `\begin{proposition} ... \end{proposition}`;
43-
* `\begin{theorem} ... \end{theorem}`;
44-
* `\begin{corollary} ... \end{corollary}`;
45-
* `\begin{example} ... \end{example}`;
46-
* `\begin{examples} ... \end{examples}`;
47-
* `\begin{remark} ... \end{remark}`;
48-
* `\begin{remarks} ... \end{remarks}`;
49-
* `\begin{proof} ... \end{proof}`.
50-
51-
To add a QED sign at the end of an environment, use `\qed` inside the environment. This is done automatically for `proof` environments.
52-
53-
Also, the environments have an optional title argument: `\begin{theorem}[Fermat's Last Theorem] ... \end{theorem}`
40+
* `\begin{definition} ... \end{definition}`;
41+
* `\begin{definitions} ... \end{definitions}`;
42+
* `\begin{lemma} ... \end{lemma}`;
43+
* `\begin{proposition} ... \end{proposition}`;
44+
* `\begin{theorem} ... \end{theorem}`;
45+
* `\begin{corollary} ... \end{corollary}`;
46+
* `\begin{example} ... \end{example}`;
47+
* `\begin{examples} ... \end{examples}`;
48+
* `\begin{remark} ... \end{remark}`;
49+
* `\begin{remarks} ... \end{remarks}`;
50+
* `\begin{proof} ... \end{proof}`.
51+
52+
To add a QED sign at the end of an environment, use `\qed` inside the environment. This is done automatically for `proof` environments.
53+
54+
Also, the environments have an optional title argument: `\begin{theorem}[Fermat's Last Theorem] ... \end{theorem}`
55+
5456
* Labels `\label{...}` are recognized in some contexts (section headers and theorem environments) and can be refered to with `\ref{...}` or `\ref[Text]{label}`.
5557
* URLs can be inserted with `\url{...}` and hyperlinks with `\href{url}{text}`.
5658
* Short texts in foreign languages can be marked with `\foreignlanguage{language}{text}`.
5759
* Arbitrary unicode symbols can be inserted with `\symbol{...}`, where the decimal representation must be used.
5860
* `\noindent` and `\setlength{...}{...}` are ignored.
5961
* Images can be inserted with `\includegraphics{filename}` or `\includegraphics[...]{filename}`. The optional argument is a comma-separated list of `key=value` pairs, where we support the keys `width`, `height`, and `alt` (for the `<img alt=""` argument in HTML). The width and height values can be of the following forms:
60-
* If the unit ends with `\textwidth` resp. `\textheight`, the value before will be interpreted as a fractional value (or 1 if there is nothing before) and converted to a percent value in HTML output.
61-
* If the unit ends with `cm`, it will be converted to `em` in HTML output.
62-
* Otherwise, the unit will be expected to be a unit-less number and will be taken as pixel size in HTML output.
62+
* If the unit ends with `\textwidth` resp. `\textheight`, the value before will be interpreted as a fractional value (or 1 if there is nothing before) and converted to a percent value in HTML output.
63+
* If the unit ends with `cm`, it will be converted to `em` in HTML output.
64+
* Otherwise, the unit will be expected to be a unit-less number and will be taken as pixel size in HTML output.
6365
* Tables can be set with `\begin{tabular}{...} ... \end{tabular}`. Both `\hline` and `\cline{...}` are supported, and the argument of `\begin{tabular}` can consist out of `|`, `l`, `r` and `c`.
6466
* Pictures can be grouped with `\begin{picturegroup} \picture{title}{commands} ... \end{picturegroup}`. The `commands` can be `\includegraphics`, TikZ pictures, PSTricks pictures, etc.
6567

@@ -68,6 +70,7 @@ LaTeX compatibility
6870
-------------------
6971

7072
Almost everything listed above is compatible to LaTeX, except:
73+
7174
* The `\begin{blockquote} ... \end{blockquote}` environment.
7275
* The formula list environment `\begin{formulalist} \formula{...} ... \end{formulalist}`.
7376
* The picture group environment `\begin{picturegroup} \picture{title}{commands} ... \end{picturegroup}`.
@@ -148,17 +151,17 @@ Formulae backend
148151

149152
There are two available formulae backends:
150153

151-
* one based on the [`latex_formula_renderer` plugin](https://plugins.getnikola.com/v7/latex_formula_renderer/);
152-
* one based on [MathJax](https://www.mathjax.org/).
154+
* one based on the [`latex_formula_renderer` plugin](https://plugins.getnikola.com/v7/latex_formula_renderer/);
155+
* one based on [MathJax](https://www.mathjax.org/).
153156

154157
You can choose which one by setting the `LATEX_FORMULA_RENDERER` configuration variable; default is `latex_formula_image_renderer`, which is based on the `latex_formula_renderer` plugin. See `conf.py.sample` for more information.
155158

156159
The first plugin allows special features the second doesn't:
157160

158-
* `align` environments (see the [AMSMath documentation](ftp://ftp.ams.org/ams/doc/amsmath/amsldoc.pdf));
159-
* XY-pic diagrams (see the [XY-Pic user guide](http://texdoc.net/texmf-dist/doc/generic/xypic/xyguide.pdf));
160-
* PSTricks graphics (see [here](https://en.wikipedia.org/wiki/PSTricks) for more information);
161-
* TikZ pictures (see [here](https://en.wikibooks.org/wiki/LaTeX/PGF/TikZ) for more information).
161+
* `align` environments (see the [AMSMath documentation](ftp://ftp.ams.org/ams/doc/amsmath/amsldoc.pdf));
162+
* XY-pic diagrams (see the [XY-Pic user guide](http://texdoc.net/texmf-dist/doc/generic/xypic/xyguide.pdf));
163+
* PSTricks graphics (see [here](https://en.wikipedia.org/wiki/PSTricks) for more information);
164+
* TikZ pictures (see [here](https://en.wikibooks.org/wiki/LaTeX/PGF/TikZ) for more information).
162165

163166
You need an installed LaTeX distribution for this to work, with some extra tools. See the `latex_formula_renderer` plugin for details.
164167

0 commit comments

Comments
 (0)
Please sign in to comment.