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

\textrm{} inside mathescape inside listings causes failures #816

Closed
ashinkarov opened this issue Nov 24, 2016 · 2 comments
Labels
Milestone

Comments

@ashinkarov
Copy link

@ashinkarov ashinkarov commented Nov 24, 2016

Here is a small tex file that uses listings:

\documentclass{article}
\usepackage{listings}
\lstset{
     mathescape
}
\begin{document}
\lstinline{t =  $f_{\textrm{map}}$(x)}
\end{document}

If I call latexml as follows:

latexml --dest=test.xml test

I get the following output:

latexml (LaTeXML version 0.8.2)
processing started Thu Nov 24 20:55:25 2016

(Digesting TeX test...
(Loading /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/Package/TeX.pool.ltxml...
(Loading /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/Package/eTeX.pool.ltxml... 0.00 sec)
(Loading /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/Package/pdfTeX.pool.ltxml... 0.00 sec) 0.07 sec)
(Processing content /tmp/test-tutorial/test.tex...
(Loading /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/Package/LaTeX.pool.ltxml... 0.09 sec)
(Loading /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/Package/article.cls.ltxml... 0.01 sec)
(Loading /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/Package/listings.sty.ltxml...
(Processing definitions /usr/share/texmf-dist/tex/latex/listings/listings.cfg... 0.01 sec) 0.20 sec)
Error:unexpected:} Attempt to close boxing group
	at /tmp/test-tutorial/test.tex; line 7 col 32
	current frame is mode-switch to display_math due to T_CS[\@@BEGINDISPLAYMATH] at /tmp/test-tutorial/test.tex; line 7 col 32
	In Core::Stomach[@0x2b80c58] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Core::Definition::Primitive[End] <= Core::Stomach[@0x2b80c58] <= Core::Definition::Primitive[Begin] <= ...

Error:unexpected:} Attempt to close boxing group
	at /tmp/test-tutorial/test.tex; line 7 col 32
	current frame is mode-switch to display_math due to T_CS[\@@BEGINDISPLAYMATH] at /tmp/test-tutorial/test.tex; line 7 col 32
	In Core::Stomach[@0x2b80c58] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Core::Definition::Primitive[End] <= Core::Stomach[@0x2b80c58] <= Core::Definition::Primitive[Begin] <= ...

Error:unexpected:} Attempt to close boxing group
	at /tmp/test-tutorial/test.tex; line 7 col 32
	current frame is mode-switch to display_math due to T_CS[\@@BEGINDISPLAYMATH] at /tmp/test-tutorial/test.tex; line 7 col 32
	In Core::Stomach[@0x2b80c58] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Core::Definition::Primitive[End] <= Core::Stomach[@0x2b80c58] <= Core::Definition::Constructor[\begin{... <= ...

Error:unexpected:} Attempt to close boxing group
	at /tmp/test-tutorial/test.tex; line 7 col 33
	current frame is mode-switch to display_math due to T_CS[\@@BEGINDISPLAYMATH] at /tmp/test-tutorial/test.tex; line 7 col 32
	In Core::Stomach[@0x2b80c58] at /tmp/test-tutorial/test.tex; line 7 col 33
	 <= Core::Definition::Primitive[End] <= Core::Stomach[@0x2b80c58] <= Core::Definition::Constructor[\begin{... <= ...

Error:expected:$ Missing $ closing display math.
	at /tmp/test-tutorial/test.tex; line 7 col 35
	Ignoring; expect to be in wrong math/text mode.
	In Core::Definition::Primitive[Math] from TeX.pool.ltxml line 3013
	 <= Core::Stomach[@0x2b80c58] <= Core::Definition::Constructor[\begin{... <= Core::Stomach[@0x2b80c58] <= ...

Error:unexpected:} Attempt to close boxing group
	at /tmp/test-tutorial/test.tex; line 7 col 38
	current frame is mode-switch to display_math due to T_CS[\@@BEGINDISPLAYMATH] at /tmp/test-tutorial/test.tex; line 7 col 32
	In Core::Stomach[@0x2b80c58] at /tmp/test-tutorial/test.tex; line 7 col 38
	 <= Core::Definition::Primitive[End] <= Core::Stomach[@0x2b80c58] <= Core::Definition::Constructor[\begin{... <= ...
 0.31 sec)
Error:unexpected:\end{document} Attempt to end mode text
	at Anonymous String; line 0 col 0
	current frame is mode-switch to display_math due to T_CS[\@@BEGINDISPLAYMATH] at /tmp/test-tutorial/test.tex; line 7 col 32
	In Core::Stomach[@0x2b80c58] at Anonymous String; line 0 col 0
	 <= Core::Definition::Constructor[\end{do... <= Core::Stomach[@0x2b80c58] <= Core::Definition::Constructor[\begin{... <= ...

Error:expected:\end{document} Input ended while environment document was open
	at Anonymous String; line 2 col 0
 0.39 sec)
(Building...
(Loading compiled schema /usr/lib64/perl5/vendor_perl/5.24.0/LaTeXML/resources/RelaxNG/LaTeXML.model... 0.01 sec).
Error:malformed:ltx:equation <ltx:equation> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..."/>
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Core::Definition::Constructor[$$] <= Whatsit[\@@BEGINDISPLAYMATH,Core::Lis... <= Core::Document[@0x38f76e0] <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier"/>
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[f Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[_ Font[display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at /tmp/test-tutorial/test.tex; line 7 col 32
	Currently in XMLDocument[46149024]<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...
	In Core::Document[@0x38f76e0] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Box[{ Font[display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at /tmp/test-tutorial/test.tex; line 7 col 32
	Currently in XMLDocument[46149024]<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...
	In Core::Document[@0x38f76e0] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Box[\ Font[display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier"/>
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[t Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[e Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[x Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[t Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[r Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...
.
Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[m Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at /tmp/test-tutorial/test.tex; line 7 col 32
	Currently in XMLDocument[46149024]<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...
	In Core::Document[@0x38f76e0] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Box[{ Font[display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier"/>
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[m Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[a Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at Anonymous String; line 0 col 0
	Currently in ...<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _noautoclose="1" class="ltx_lstlisting">...<ltx:text _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[math,medium,italic,10,bla..." class="ltx_lst_identifier">...
	In Core::Document[@0x38f76e0] at Anonymous String; line 0 col 0
	 <= Box[p Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\@listi... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at /tmp/test-tutorial/test.tex; line 7 col 32
	Currently in XMLDocument[46149024]<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...
	In Core::Document[@0x38f76e0] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Box[( Font[display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\begin{... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at /tmp/test-tutorial/test.tex; line 7 col 32
	Currently in XMLDocument[46149024]<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...
	In Core::Document[@0x38f76e0] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Box[x Font[italic,display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\begin{... <= ...

Error:malformed:ltx:XMTok <ltx:XMTok> isn't allowed here
	at /tmp/test-tutorial/test.tex; line 7 col 32
	Currently in XMLDocument[46149024]<ltx:document _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." _ID_counter_p_="1" xmlns="http://dlmf.nist.gov/LaTeXML">...<ltx:para _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b..." xml:id="p1">...<ltx:p _box="LaTeXML::Core::Whatsit=HASH(0x..." _font="Font[serif,medium,upright,10,b...">...
	In Core::Document[@0x38f76e0] at /tmp/test-tutorial/test.tex; line 7 col 32
	 <= Box[) Font[display]] <= Core::Document[@0x38f76e0] <= Core::Definition::Constructor[\begin{... <= ...
 0.04 sec)
(Rewriting... 0.00 sec)
(Finalizing... 0.00 sec)
Conversion complete: 26 errors.
processing finished Thu Nov 24 20:55:26 2016

@dginev dginev added this to the LaTeXML-0.8.3 milestone Nov 24, 2016
@brucemiller

This comment has been minimized.

Copy link
Owner

@brucemiller brucemiller commented Nov 29, 2016

Wow! That's a lot of errors. Actually, it isn't the \textrm, much weirder than that. So, basically \lstinline does not read balanced {} except (apparently) within embedded math.

I'm going to have to do some experimentation to establish exactly what's supposed to work, and then emulate it. Ah, TeX land, where every bug becomes a feature!

@brucemiller

This comment has been minimized.

Copy link
Owner

@brucemiller brucemiller commented Dec 3, 2016

Oddly, this "feature" doesn't seem to come into play with escapechar or others. So, it's hacky, but should be working now. Thanks for the report!

@brucemiller brucemiller closed this Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.