I am trying to create a maze and its solution using the labyrinth
package inside a standalone
document class akin to a tikz
. However, when I try to compile, I run into the following error (MWE given below)
! LaTeX Error: Not allowed in LR mode. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.5 ...abyrinth}[unit=12pt, thickness=1pt]{19}{20}
Here is the MWE
\documentclass{standalone} % document type and language \usepackage{labyrinth} \begin{document} \begin{labyrinth}[unit=12pt, thickness=1pt]{19}{20} \putsymbol(8,\minus1){\Large$\Uparrow$} \putsymbol(10,20){\Large$\Uparrow$} \h *9+---*7+ \v +*5-+--+--+---+--+ \h -*4+--+-+-*4+--+ \v +*4-++-++---+--++-+ \h *4+--+--+++--++--+ \v +---++-++---+++--+-+ \h -++--+---++*4-+++ \v +--++-+-++-+-+++---+ \h ++--+-+++--++---+++ \v +--+-+*4-++-*4+--+ \h -+++-*4+-+*6-+ \v +---++---++-++-+-+-+ \h +++---++--++-++---+ \v +--++---++--+--+++-+ \h -+--+++--++-++---+ \v +-++---++--+--+-++-+ \h +---++--++-++-++--+ \v +-+++-+++--+-++--+-+ \h -+*7-++*4-+++ \v ++-*6+-+-+-+-+--+ \h --+*8-*4+--++ \v ++--*8+-+-++--+ \h -+++*{12}-++ \v +-+--+-+-++-+-++--++ \h +--*7+-+++-++ \v +-+---+---+---+-+-++ \h -++-+--++-+++-++-+ \v ++-+-+---++-+-+--+-+ \h ---+-+++*5-+-++-+ \v +++-++--++-++-++-+-+ \h --+---+--++-+*4-+ \v ++-+-+-++--++-+-+-++ \h -+-+++--++*4-+++ \v +---+-++--*5+-*4+ \h -++*4-++ \v ++-*4+--+-+--*6+ \h *6-++-*5+ \v *4+-++*8-+-+++ \h ---+++-+-+-*6+ \v +-+*4-+--+*8-+ \h *7+---*9+ \autosolution[font=\color{Orange}](8,0)(10,19){u} \labyrinthsolution[ font=\color{MidnightBlue}\footnotesize, up=\kern2pt$\uparrow$, left=$\leftarrow$, down=\kern2pt$\downarrow$, right=$\rightarrow$, hcorr=0.1\unitlength, vcorr=0.3\unitlength, ](7,1){% ldlllluulddluuuuuuuruluuurulurrdd% dldrruuurrrddddluuuldddlldrrrdr% } \end{labyrinth} \end{document}
What is going wrong here? I did not find any documentation on the incompatibility between the two packages. And what is the fix here?