无法使符号列表正确对齐

无法使符号列表正确对齐

我使用之前答案中的一些代码快速创建了一个手动数字列表,但我无法使其正确对齐。第二部分会前后跳转几个字符,使其看起来很奇怪。

\nonumchap{List of Symbols}
\newcommand{\tab}[1]{\hspace{.2\textwidth}\rlap{#1}}

E \tab{Young's Modulus [MPa]}

F \tab{Force [N]}

$f_n$ \tab{Natural Frequency [Hz]}

I \tab{Moment of Inertia [m$^4$]}

k \tab{Spring Constant [N/m]}

L \tab{Length [m]}

m \tab{mass [kg]}

t \tab{thickness [m]}

V \tab{Volume [m$^3$]}

答案1

% arara: pdflatex 

\documentclass{report}
\usepackage{siunitx}

\begin{document}
\chapter*{List of Symbols}
\begin{tabbing}
\hspace*{2.5cm}\= \kill % adapt this length to your needs!
$E$ \> Young's Modulus in \si{\mega\pascal} \\
$F$ \> Force in N \\
$f_\mathrm{n}$ \> Natural Frequency in Hz\\
$I$ \> Moment of Inertia in \si{\metre^4} \\
k \> Spring Constant in \si{\newton\per\metre} \\
$L$ \> Length in m \\
$m$ \> Mass in kg \\
$t$ \> Thickness in m \\
$V$ \> Volume in \si{\cubic\metre}
\end{tabbing}
or maybe even nicer:
\begin{tabbing}
\hspace*{2.5cm}\= \hspace{4.5cm}\= \kill
$E$ \> Young's Modulus \> \si{\mega\pascal} \\
$F$ \> Force \> N \\
$f_\mathrm{n}$ \> Natural Frequency \> Hz\\
$I$ \> Moment of Inertia \> \si{\metre^4} \\
k \> Spring Constant \> \si{\newton\per\metre} \\
$L$ \> Length \> m \\
$m$ \> Mass \> kg \\
$t$ \> Thickness \> m \\
$V$ \> Volume \> \si{\cubic\metre}
\end{tabbing}
\end{document}

在此处输入图片描述

答案2

\documentclass{report}
\usepackage{amsmath,tabularx}
\usepackage{siunitx}

\begin{document}
\section*{List of Symbols}
\noindent
\begin{tabularx}{\linewidth}{@{} l X @{}}
$E$  &  Young's Modulus in \si{\mega\pascal} \\
$F$  &  Force in N \\
$f_\text{n}$  &  Natural Frequency in Hz\\
$I$  &  Moment of Inertia in \si{\metre^4} \\
k    &  Spring Constant in \si{\newton\per\metre} \\
$L$  &  Length in m \\
$m$  &  Mass in kg \\
$t$  &  thickness in m and this text can be really long it will automatically be broken
        into lines\\
$V$  &  Volume in \si{\cubic\metre}
\end{tabularx}

\bigskip\noindent
\begin{tabularx}{0.6\linewidth}{@{} l X l @{}}
$E$  &  Young's Modulus            & \si{\mega\pascal} \\
$F$  &  Force                      & \si{\newton} \\
$f_\text{n}$  &  Natural Frequency & \si{hz}\\
$I$  &  Moment of Inertia          & \si{\metre^4} \\
k    &  Spring Constant            & \si{\newton\per\metre} \\
$L$  &  Length                     & \si{\metre} \\
$m$  &  Mass                       & \si{\kilo\gram} \\
$t$  &  thickness and this text can be really 
        long it will automatically be broken
        into lines                 & \si{\metre}\\
$V$  &  Volume                     & \si{\cubic\metre}
\end{tabularx}
\end{document}

在此处输入图片描述

相关内容