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:
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:
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 usesiunitx
, which you are already loading, to get the proper spacing and fonts:As a side note, instead of defining a dedicated command for each specific value
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: