I'm writing a Latex file. But when I try to add the following code to the file, it just can't compile anymore:
\begin{lstlisting}[language=bash,caption={bash version}]
btcd --txindex --simnet --rpcuser=kek --rpcpass=kek
\end{lstlisting}
I get these errors:
Illegal parameter number in definition of \lst@insertargs.
<to be read again>
}
l.241 }
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
Illegal parameter number in definition of \lst@arg.
<to be read again>
}
l.241 }
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
Runaway argument?
! Paragraph ended before \lst@next was complete.
<to be read again>
\par
l.241 }
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
Here is the file:
\documentclass[ngerman, openany]{scrbook}
\usepackage[utf8]{inputenc}
\input{../shared/expl-cfg}
\input{expl/switch-cfg}
\begin{document}
\ifthenelse{\boolean{isPresentation}}{
\chapter{Wirtschaft von Kryptowährungen}
}{
\chapter{Analyse}\label{sec:analyse}
\section{Struktur des Lightning Network}
insert something here
\section{Funktionsweise des Lightning Networks}
insert something here
\section{Implementierung eines Lightning Networks in einem privaten Blockchain}
insert something here
\begin{lstlisting}[language=bash,caption={bash version}]
btcd --txindex --simnet --rpcuser=kek --rpcpass=kek
\end{lstlisting}
}
\end{document}
here is the ../shared/expl-cfg:
\typeout{This is twp-cfg, the common configuration file (JHf)}
\makeatletter
\usepackage{ifthen}
\usepackage{iftex}
\usepackage{listings}
Edit: Here is the switch-cfg file.
\csname SwitchCfgLoaded\endcsname
\let\SwitchCfgLoaded\endinput
\newboolean{isBook}
\newboolean{isPresentation}
\makeatletter
@ifclassloaded{scrbook}{
\setboolean{isBook}{true}
}{
@ifclassloaded{beamer}{
\setboolean{isPresentation}{true}
}{}
}
\ifthenelse{\boolean{isBook}}{
}{
\let\frontmatter\relax
\let\mainmatter\relax
\let\backmatter\relax
\let\chapter\section
\let\section\subsection
\let\subsection\subsubsection
\ifthenelse{\boolean{isPresentation}}{
\AtBeginSubsection[]{
\begin{frame}<beamer|handout>%
\begin{block}{}
\insertsubsectionhead
\end{block}
\end{frame}
}{}
}{}
}
How can I solve this issue? I get the same problem when using verbatim.
I am using Overleaf and LuaLaTeX as compiler.
expl/data/expl-poster.tex, and the first snippet by itself does not generate a problem for me, even with the same preamble. Please post a proper minimal working example – frabjous May 20 '22 at 12:24}): does the issue remain? If so, it depends from something in those files. Assuming that the code produces the error to begin with. – egreg May 20 '22 at 13:13ifthenpackage at least. Please test your code before you post. – frabjous May 20 '22 at 13:50\usepackage{ifthen}– AidenFive May 20 '22 at 13:57