Closed sra-minshall closed 2 years ago
I think this will do what you want (there is no Pygments lexer called inlinetext
):
\documentclass{beamer}
\usepackage{minted}
\newmintedfile{js}{linenos}
\newmintinline[txt]{text}{}
\begin{document}
\jsfile{scratch_test.js}
\txt{scratch_test.js}
\end{document}
There may be some edge cases where \newmintinline
commands don't give exactly the same behavior as \mintinline
, but this seems to work fine.
Thanks Geoffrey,
It works, I was mistaken.
Simon
On Apr 12, 2022, at 4:59 PM, Geoffrey Poore @.***> wrote:
I think this will do what you want (there is no Pygments lexer called inlinetext):
\documentclass{beamer}
\usepackage{minted} \newmintedfile{js}{linenos} \newmintinline[txt]{text}{}
\begin{document}
\jsfile{scratch_test.js} \txt{scratch_test.js}
\end{document} There may be some edge cases where \newmintinline commands don't give exactly the same behavior as \mintinline, but this seems to work fine.
— Reply to this email directly, view it on GitHub https://github.com/gpoore/minted/issues/327#issuecomment-1097397429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV7CXXIJZ4UQFG25TVPZ5LVEYE5DANCNFSM5TIDRWDQ. You are receiving this because you authored the thread.
Macros defined with
\newmintinline
do not read their args as verbatim. We end up not being able to write something common such as\inlinetext{scratch_test.js}
because a "not in math mode" error occurs. Using the underscore package helps but prevents us from writing\jsfile{scratch_test.js}
without generating errors.It'd be great to have both use cases implemented without using the underscore package!