Deyan Ginev edited section_Code_Listings_We_will__.tex  almost 9 years ago

Commit id: 4546ad93041828aa1c83a95e6557cfbd32afcf37

deletions | additions      

       

An example setup which you can add to your header.tex file is:  \begin{figure} \begin{figure}\label{lst:setup}  \begin{lstlisting}  \usepackage{listings}  \lstset{ % 

moretexcs={lstset,color}  }  \end{lstlisting}  \label{lst:setup}  \end{figure}  Useful to keep in mind: definitions in your header.tex file are global to your article, while macros introduced in a paragraph are only local to that paragraph. That applies even to global commands such as \verb|\gdef|, as Authorea processes each paragraph independently of its surroundings.