make pip an option
This commit is contained in:
parent
78e06ed17d
commit
394ecc310c
1 changed files with 16 additions and 12 deletions
|
@ -1,5 +1,8 @@
|
|||
__HEADER__(Hacky code setup for verbatim code)
|
||||
|
||||
__NEW_IF__(pipe,false)
|
||||
\DeclareOption{pipe}{__SET_IF__(pipe,true)}
|
||||
\ProcessOptions
|
||||
|
||||
\catcode`_=13
|
||||
\let_\_
|
||||
|
@ -15,18 +18,19 @@ __HEADER__(Hacky code setup for verbatim code)
|
|||
}
|
||||
|
||||
\newif\ifactive\activefalse
|
||||
\catcode`|=\active
|
||||
\def|{
|
||||
\ifactive
|
||||
\endgroup
|
||||
\activefalse
|
||||
\else
|
||||
\begingroup
|
||||
\catcode`_=13
|
||||
\ttfamily
|
||||
\fi
|
||||
}
|
||||
|
||||
__IF__(pipe)
|
||||
\catcode`|=\active
|
||||
\def|{
|
||||
\ifactive
|
||||
\endgroup
|
||||
\activefalse
|
||||
\else
|
||||
\begingroup
|
||||
\catcode`_=13
|
||||
\ttfamily
|
||||
\fi
|
||||
}
|
||||
% Quick fix for tables
|
||||
\AddToHook{env/tabular/begin}[code]{\catcode`|=13}
|
||||
\AddToHook{env/tabular/end}[code]{\catcode`|=8}
|
||||
\fi
|
||||
|
|
Loading…
Reference in a new issue