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

Plain Text \LaTeX converted to logo. #719

Open
t-makaro opened this issue Dec 13, 2017 · 1 comment
Open

Plain Text \LaTeX converted to logo. #719

t-makaro opened this issue Dec 13, 2017 · 1 comment

Comments

@t-makaro
Copy link
Contributor

Similar to issue #262 and its fix #687. However this problem predates that fix.

"\LaTeX" does not get converted into the logo in the markdown of the notebook, but the latex compiler interprets it upon conversion to pdf.

I already have an idea for a solution. I propose to update the mathjax compatibility definitions defined in #687 by replacing:

\renewcommand{\TeX}{\textrm{\Oldtex}} 
\renewcommand{\LaTeX}{\textrm{\Oldlatex}} 

with:

\renewcommand{\TeX}{\ifmmode \textrm{\Oldtex} \else \textbackslash TeX \fi}
\renewcommand{\LaTeX}{\ifmmode \Oldlatex \else \textbackslash LaTeX \fi}

This exactly replicates the use of "\LaTeX", "\TeX", "$\LaTeX$", and "$\TeX$" in the notebook. So plain text and the logo can be written in both the notebook and the converted pdf without any conversion error. And no the fact that "\textrm{}" only wraps one of those commands is not an error, since by default "\LaTeX" calls "\TeX".

@t-makaro
Copy link
Contributor Author

t-makaro commented Dec 13, 2017

I know that it was discussed that some would prefer that the notebook renders "\LaTeX" outside of math mode into the logo. However, that would mean that writing "\LaTeX" in plain text in the notebook is impossible without also the ability to render "\textbackslash". I believe that this is a simple solution that makes all use cases of "\LaTeX" possible without adding lots of special cases to notebook markdown, and makes conversion painless.

Should the notebook ever decide to render the LaTeX logo outside of math mode then this would be a simple switch back.

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

Successfully merging a pull request may close this issue.

1 participant