0

I am listing some nomenclature with the following part of code:

\documentclass[12pt]{article}

\newlength{\nomenlabelindent}
\setlength{\nomenlabelindent}{4em}
\newenvironment{nomenclature}{%
\newcommand\entry[2]{%
   \hangindent\nomenlabelindent\noindent\makebox[\nomenlabelindent][l]{##1\quad}\ignorespaces##2\par}%
   \section*{NOMENCLATURE}}{\par\addvspace{12pt}}

\begin{document}

\begin{nomenclature}
    \entry{$\rho$}  {Density} 
    \entry{$T$}  {Temperature} 
    \entry{$v$}{Volume}
    \entry{$t$}{time}
    \entry{$\Gamma$}{Number flux density}
    \entry{$\sigma$}{Sp. Charge density}
\end{nomenclature}

\end{document}

The Output is as:

enter image description here

Question: I want to add one more column on the right side to show the respective units of each entry. This should also have a defined indentation. For reference:

enter image description here

Thanks in advance and any help would be greatly appreciated.

2 Answers 2

1

New code without tabular:

\documentclass{article}

\begin{document}
    \hspace*{1cm} \text{\Large \bfseries Nomenclature}
    \bfseries
    \begin{tabbing}
        \hspace*{1cm} \= \hspace*{5cm} \= \hspace*{2cm} \kill
        \parbox{\textwidth}{$\rho$}    \> \parbox{\textwidth}{Density}
        \> \parbox{\textwidth}{ kg/m$^3$} \\
        \parbox{\textwidth}{$T$} \> \parbox{\textwidth}{Temperature}
        \> \parbox{\textwidth}{°C} \\
        \parbox{\textwidth}{$v$}   \> \parbox{\textwidth}{Volume}
        \> \parbox{\textwidth}{m$^3$} \\
        \parbox{\textwidth}{$t$} \> \parbox{\textwidth}{Time}
        \> \parbox{\textwidth}{sec} \\
        \parbox{\textwidth}{$\Gamma$}  \> \parbox{\textwidth}{Number flux density}
        \> \parbox{\textwidth}{unit} \\
        \parbox{\textwidth}{$\sigma$}   \> \parbox{\textwidth}{Sp. Charge density}
        \> \parbox{\textwidth}{unit} \\     
    \end{tabbing}
    
\end{document}

Output:

enter image description here

If you dont want table in boldface comment the third (\bfseries) line after \begin{document}.

1
  • Thanks, Raffaele.
    – Rahman
    Commented Feb 14, 2022 at 20:27
0

Try this code:

\documentclass{article}
\usepackage{array}

\begin{document}
    
    \begin{tabular}{ >{}l >{\bfseries}l  > {\bfseries}l }
        \multicolumn{3}{c}{\bfseries \huge Nomenclature}\\
        \hline
        $\rho$ & Density & kg/m$^3$\\
        $T$ & Temperature &°C\\
        $v$ & Volume &m$^3$ \\
        $t$ & time & sec \\
        $\Gamma$ & Number flux density & unit\\ 
        $\sigma$ & Sp. Charge density & C/m$^2$ \\
    \end{tabular}
    
\end{document}

Output:

enter image description here

1
  • Thanks, Raffaele. Is there a way without using 'tabular' environment? This doesn't go well with my Template.
    – Rahman
    Commented Feb 14, 2022 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .