Deyan Ginev edited section_Code_Listings_We_will__.tex  almost 9 years ago

Commit id: 0d44cbfab01adca4212c3725a41d6a47672eedc4

deletions | additions      

       

We will be illustrating all of our examples with code listings in this tutorial, so it makes sense to first show how to use them.  An example setup that which  you should can  add to your Header header.tex  file is: \begin{figure}  \begin{lstlisting}  \usepackage{listings} 

}  \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.