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
Backslashes in markdown cells are sometimes incorrectly interpreted as inline TeX #771
Comments
The
The reason why those spurious On the long run, this should be solved by avoiding the intermediate reST representation (see #36), but this might not happen soon. In the meantime, you should simply avoid nested markup. |
Thanks @mgeier. The thing is, I'm not actually trying to nest markup; I want the text inside the asterisks to be interpreted literally, as it is in the jupyter lab interface. Is there a way to rewrite it so that it doesn't try to nest markup? Maybe I am missing something obvious... |
I know. It's the intermediate reST representation that does that.
AFAIK, that's currently not possible. But if you simply write your code snippets as code (as in your fourth example), it works fine, doesn't it?
Not at the moment, but maybe in a future version. But I don't really see a problem in your concrete examples, since code should be formatted as code anyway. |
I suppose there are probably cases where backslashes can exist legitimately in non-code contexts, but I concede that formatting as code is appropriate in my case here :) Thanks for your help @mgeier, and happy American Thanksgiving! |
Backslashes in markdown cells sometimes result in
nbsphinx-math
role tags making it into the HTML output. Here's an example:I think this is because pandoc is (undesirably, in this case) interpreting the backslashes as inline TeX commands, despite the cell not using
$
or\(
to indicate TeX? When I add-raw_tex
to the pandoc build command, the HTML rendering of the above test cell becomes as I expect (nonbsphinx-math
literals).I'd like to somehow achieve nice rendering of this example without manually modifying how nbsphinx calls pandoc. Is that possible? If not, would it make sense to add a configuration option to nbsphinx to add
-raw_tex
to the build command?The text was updated successfully, but these errors were encountered: