Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latex error when compiling documentation file #9

Closed
wiai opened this issue Nov 4, 2016 · 1 comment
Closed

latex error when compiling documentation file #9

wiai opened this issue Nov 4, 2016 · 1 comment

Comments

@wiai
Copy link

wiai commented Nov 4, 2016

Hi,
I am trying to compile the documentation and get this error when running
"xelatex documentation.tex" like stated in "readme.md":

! You can't use `\spacefactor' in math mode.
\@->\spacefactor
                 \@m
l.36 ... \textbf{User \(\LaTeX\) definitions file}
                                                   \item

and more errors afterwards.
When specifying "xelatex -interaction=nonstopmode documentation.tex" like in the documentation, the pdf file seems to be produced correctly but latex still reports the list of errors.

The relevant output:
log.txt

Running Windows 10, Miktex 2.9.

Thanks!
wiai

jfbercher added a commit that referenced this issue Nov 4, 2016
- corrected processing of \\LaTeX macro, cf #9
@jfbercher
Copy link
Owner

hmmm...
ok, actually a small but interesting issue. It is related to the use of the \LaTeX macro. In order to have it interpreted by mathjax, we have to enclose it between dollars. It is converted as is when converting to latex. But this macro is a text mode macro, and thus latex complains that it is not uses as it should (but we must enclose it between $ in order to have it interpreted in the livenotebook or in html)...
Thus for the moment I have introduced a simple substitution in the notebook --> latex conversion.

More importantly, looking at the other errors, I realized that the processing of comments (any line beginning by a % is ignored) was not always correct. This was because the latex text is reflowed sometimes in a strange way during the markdown to latex conversion. I have introduced and pushed a fix for that. Anyway, one should have a look at the log file since the conversion may not be perfect (actually the text resulting for standard notebook -> latex conversion is also not always perfect)

Thanks for your comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants