0

I'm writing a 'book' for the development of a project and want to put the relevant variables within a chapter at the beginning of that chapter. So, I'm trying to modify the \description list as follows. This works fine:

\begin{description}[labelwidth=1cm]
    \itemsep-2pt
    \item[KE]{Kinetic Energy}
    \item[$C_p$]{Heat Capacity}
\end{description}

but since I'm using it everywhere, I'd like to make it a macro where all I need to add are the items (not the labelwidth, or itemsep values; something more like this:

\begin{myNomenclature}
        \item[KE]{Kinetic Energy}
        \item[$C_p$]{Heat Capacity}
\end{myNomenclature}

I'm using \description because it bolds the non-mathematical variables.

Thanks for any suggestions I can try.

  • Why not use a longtable? – leandriis Feb 3 at 17:53
  • Thanks, but longtables are too difficult to deal with when you're putting similar structures with different content. While longtables have their places, it doesn't fit here. Besides, some of my listings are long and will likely need to be broken across multiple columns; with the list approach, I can do it whenever I need to without too much effort. I do appreciate the consideration though. Cheers – Dave Feb 4 at 2:17
2
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{enumitem}
\usepackage{blindtext}
\newenvironment{myNomenclature}{
    \begin{description}[labelwidth=1cm]
        \setlength{\itemsep}{-2pt}
}{
\end{description}
}

\begin{document}
    \blindtext

    \begin{myNomenclature}
        \item[KE]{Kinetic Energy}
        \item[$C_p$]{Heat Capacity}
    \end{myNomenclature}
\blindtext
\end{document}

like this?

enter image description here

| improve this answer | |
  • 1
    Perfect! Thanks! – Dave Feb 4 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.