New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14526 for NEMO/trunk/doc/latex/global/highlighting.tex – NEMO

Ignore:
Timestamp:
2021-02-22T17:37:38+01:00 (3 years ago)
Author:
nicolasmartin
Message:

Modify \nlst LaTeX macro for better efficienty
Only one line is needed now to include the highlighted source code, the caption and the cross-reference

\newcommand{\nlst}[1]{
   \begin{listing}
      \newmintedfile{fortran}{../../../namelists/#1}
      \caption{\forcode{&#1}}
      \label{lst:#1}
   \end{listing}
}
File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/global/highlighting.tex

    r14257 r14526  
    2929 
    3030%% Namelists inclusion 
    31 \newcommand{\nlst}[1]{\forfile{../../../namelists/#1}} 
    32 %\newcommand{\nlst}[1]{ 
    33 %   \begin{listing} 
    34 %      \newmintedfile{fortran}{../../../namelists/#1} 
    35 %      \caption{\forcode{&#1}} 
    36 %      \label{lst:#1} 
    37 %   \end{listing} 
    38 %} 
     31\newcommand{\nlst}[1]{ 
     32   \begin{listing} 
     33      \newmintedfile{fortran}{../../../namelists/#1} 
     34      \caption{\forcode{&#1}} 
     35      \label{lst:#1} 
     36   \end{listing} 
     37} 
Note: See TracChangeset for help on using the changeset viewer.