[Tex/LaTex] wrong with this description list

descriptionmath-mode

The below snippet is supposed to show a list of items and some associated values which I've stored as new commands. Unfortunately, what happens instead is a mess. I've included everything I think might be relevant, though I'm not sure how to actually display the resulting garble. Maybe it's something to do with using math mode for subscripts?

What I get is nothing like what I was expecting:
enter image description here

I want the descriptions to be inline with the \paragraph{} block. I'm not sure why R1 and the garble of R1 and R2 are like they are, or why the values appear to have situated themselves as a jumble after R1 in "Actual Component Values."

I'm a complete beginner to LaTeX and I don't even know where to begin … what's happening here and how do I fix it?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}   %https://en.wikibooks.org/wiki/LaTeX/Mathematics
\usepackage{siunitx} % Provides the \SI{}{} and \si{} command for typesetting SI units
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{cite}
.
.
.
\newcommand{\cOneTrue}{.875 nF}
\newcommand{\rOneCalc}{18.189 k\Omega}
\newcommand{\rOneTrue}{6.187 k\Omega}
\newcommand{\rTwoTrue}{12.079 k\Omega}
\newcommand{\rNetTrue}{18.266 k\Omega}
.
.
.
\subsection{Low Pass Filter}
\paragraph{Calculated Necessary Resistance:}
    \begin{description}
        \item[\(R_1\)]      \rOneCalc
    \end{description}
\paragraph{Actual Component Values: }
    \begin{description}
        \item[\(C_1\)]      \cOneTrue
        \item[\(R_1\)]      \rOneTrue
        \item[\(R_2\)]      \rTwoTrue
        \item[\(R_{net}\)]  \rNetTrue
    \end{description}

Best Answer

When you process your document (after suitable completion) you get an eeror message:

! Missing $ inserted.
<inserted text> 
                $
l.18         \item[\(R_1\)]      \rOneCalc

which gives you a hint about the problem. With your current definitions, you need math-mode for your \cOneCalc, \rOneTrue,... commands (and probably will need to add spaces, and fix the font for the "k" also). However, the best thing to do here is to use siunitx, which you are already loading, to get the proper spacing and fonts:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}   %https://en.wikibooks.org/wiki/LaTeX/Mathematics
\usepackage{siunitx} % Provides the \SI{}{} and \si{} command for typesetting SI units
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{cite}

\newcommand{\cOneTrue}{\SI{.875}{\nano\farad}}
\newcommand{\rOneCalc}{\SI{18.189}{\kilo\ohm}}
\newcommand{\rOneTrue}{\SI{6.187}{\kilo\ohm}}
\newcommand{\rTwoTrue}{\SI{12.079}{\kilo\ohm}}
\newcommand{\rNetTrue}{\SI{18.266}{\kilo\ohm}}

\begin{document}

\subsection{Low Pass Filter}
\paragraph{Calculated Necessary Resistance:}
\begin{description}
\item[\(R_1\)] \rOneCalc
\end{description}

\paragraph{Actual Component Values: }
\begin{description}
\item[\(C_1\)] \cOneTrue
\item[\(R_1\)] \rOneTrue
\item[\(R_2\)] \rTwoTrue
\item[\(R_{\text{net}}\)] \rNetTrue
\end{description}

\end{document}

enter image description here

As a side note, instead of defining a dedicated command for each specific value

\newcommand{\rOneCalc}{\SI{18.189}{\kilo\ohm}}
\newcommand{\rOneTrue}{\SI{6.187}{\kilo\ohm}}
\newcommand{\rTwoTrue}{\SI{12.079}{\kilo\ohm}}
\newcommand{\rNetTrue}{\SI{18.266}{\kilo\ohm}}

perhaps you would be better off (I'm not sure and it depends on the actual document needs) defining a command, such as in the following example:

\documentclass{article}
\usepackage{siunitx}

\newcommand{\MyKO}[1]{\SI{#1}{\kilo\ohm}}

\begin{document}

\MyKO{18.189}
\MyKO{6.187}
\MyKO{12.079}
\MyKO{18.266}

\end{document}
Related Question