Skip to content

Commit e227706

Browse files
authored
Added to LaTeX troubleshooting
1 parent c9cbcb1 commit e227706

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Export Troubleshooting.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@
55

66
a. If any images were previously inserted like `![](https://drive.google.com/uc?export=view&id=...)` it may be necessary to COPY ALL WORK into a new notebook because some information gets stored in the background of a `.ipynb` file, and I have seen at least 1 case of this causing problems even once the offending line is removed.
77

8-
3. LaTeX issues -- See below for LaTeX specific tips.
8+
3. LaTeX issues (often shows an error like `! Missing $ inserted.`) -- See below for LaTeX specific tips.
99

1010
4. Make a new `.ipynb` file and copy across cells a few at a time, making sure you can export the new `.ipynb` as you go. That will help narrow down which cell has a problem if it has been difficult to find so far.
1111

1212
<br>
1313

1414
## LaTeX
1515
The way Jupyter/Colab interprets markdown cells is slightly different to how the LaTeX compiler reads them, and unfortunately for us, the Jupyter/Colab interpreter is smarter than the LaTeX one, which means that even though things look great in the notebook, they might fail while exporting.
16-
So far, the things I have found to cause issues are:
17-
* Spaces inside of `$` signs... e.g. `$ 50\pm10 $` won't compile, but `$50\pm10$` will.
18-
* Opening and closing many `$latex$` sections in one sentence seems to cause issues sometimes... e.g. avoid things like `$10\pm$5+$\mu$=40$\pm7$E$10$`
19-
* If you use are using something like `\begin{align} ... \end{align`} (which defines a LaTeX enclosure) then you should NOT use `$` signs as well.
16+
Some just do not render correctly:
17+
* Inline text with a space at the end (e.g. `$5.0 $`). Will render as LaTeX in colab, but as regular text including "$" in export
18+
19+
Some cause the export to crash:
20+
* Empty LaTeX (e.g. `$$` or `$$$$`). Will show up as empty space in Colab, but causes export to crash with `! Missing $ inserted.`
21+
* Numbers directly after a closing `$` without a space first (e.g. `$10\pm$5`). Will render in Colab, but causes export to crash with `! Missing $ inserted.`
22+
* Using `$` inside of a `\begin{equation}...` style LaTeX. Probably will not render correctly in Colab, and can cause a variety of export issues. Just stick to the `$1=1$` or `$$1=1$$` style LaTeX.

0 commit comments

Comments
 (0)