Skip to content

Commit a59de8f

Browse files
Merge pull request #181 from PeilinZHENG/master
Update contribution.rst
2 parents 6f0c9f0 + c1c508e commit a59de8f

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

docs/source/contribution.rst

+53-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,59 @@ We use `sphinx <https://www.sphinx-doc.org/en/master/>`__ to manage the document
146146

147147
The source files for docs are .rst file in docs/source.
148148

149-
For English docs, ``sphinx-build source build/html`` in docs dir is enough. The html version of the docs are in docs/build/html.
149+
For English docs, ``sphinx-build source build/html`` and ``make latexpdf LATEXMKOPTS="-silent"`` in docs dir are enough.
150+
The html and pdf version of the docs are in docs/build/html and docs/build/latex, respectively.
151+
152+
**Formula Environment Attention**
153+
154+
It should be noted that the formula environment ``$$CONTENT$$`` in markdown is equivalent to the ``equation`` environment in latex.
155+
Therefore, in the jupyter notebook documents, do not nest the formula environment in ``$$CONTENT$$`` that is incompatible with
156+
``equation`` in latex, such as ``eqnarray``, which will cause errors in the pdf file built by ``nbsphinx``.
157+
However, compatible formula environments can be used. For example, this legal code in markdown
158+
159+
.. code-block:: markdown
160+
161+
$$
162+
\begin{split}
163+
X&=Y\\
164+
&=Z
165+
\end{split}
166+
$$
167+
168+
will be convert to
169+
170+
.. code-block:: latex
171+
172+
\begin{equation}
173+
\begin{split}
174+
X&=Y\\
175+
&=Z
176+
\end{split}
177+
\end{equation}
178+
179+
in latex automatically by ``nbsphinx``, which is a legal latex code. However, this legal code in markdown
180+
181+
.. code-block:: markdown
182+
183+
$$
184+
\begin{eqnarray}
185+
X&=&Y\\
186+
&=&Z
187+
\end{eqnarray}
188+
$$
189+
190+
will be convert to
191+
192+
.. code-block:: latex
193+
194+
\begin{equation}
195+
\begin{eqnarray}
196+
X&=&Y\\
197+
&=&Z
198+
\end{eqnarray}
199+
\end{equation}
200+
201+
in latex, which is an illegal latex code.
150202

151203
**Auto Generation of API Docs:**
152204

0 commit comments

Comments
 (0)