我需要让输出中的定义左对齐,对齐方式为 1.5 厘米的制表符(因此不在符号下方)。当我使用\hangindent
或 时flushleft
,它会左对齐,但会丢失制表符。我刚开始使用 LaTeX。我甚至尝试使用\par
,但无法弄清楚。
\documentclass{article}
\usepackage{tabto}
\begin{document}
\begin{itemize}
\item[] $\sigma_i$ \linebreak \tabto{1.5cm} Ionic conductivity [$\frac{mho}{m}$] for water, [15, p. 26].
\item[] $\phi$ \linebreak \tabto{1.5cm} Phase advance associated with complex earth reflection coefficient used in (155).
\item[] $\phi_{g,c}$ \linebreak \tabto{1.5cm} Phase shift [rad] of effective reflection coefficient for earth or counterpoise reflection, used in (156).
\item[] $\phi_{kg,c}$ \linebreak \tabto{1.5cm} Knife-edge diffraction phase shift [rad] for earth or counterpoise reflection, from (138).
\item[] $\phi_{Tg,c}$ \linebreak \tabto{1.5cm}Total phase shift [rad] of effective reflection coefficient for earth or counterpoise reflection, from (157).
\item[] $\psi$ \linebreak \tabto{1.5cm} Grazing angle shown in Figures 8 and 9.
\item[] $|_c$ \linebreak \tabto{1.5cm} Expression evaluated for specific conditions such as climate or time block in (267).
\end{itemize}
\end{document}
答案1
以下示例将环境的左边距局部设置itemize
为1.5cm
。符号被放入 的可选参数中\item
,但左对齐。
\samepage
用于防止符号及其说明的行内出现分页符。允许在符号前出现分页符。这样,符号列表可以长达几页,并且分页符位于符号之间。
\documentclass{article}
\begin{document}
\begingroup
\setlength{\leftmargini}{1.5cm}
\def\Item[#1]{%
\par\nopagebreak[2]% 0 to 3
\item[\hbox to \labelwidth{#1\hss}]\mbox{}\\%
}
\begin{itemize}
\samepage
\Item[$\sigma_i$]
Ionic conductivity [$\frac{mho}{m}$] for water, [15, p. 26].
\Item[$\phi$]
Phase advance associated with complex earth reflection coefficient
used in (155).
\Item[$\phi_{g,c}$]
Phase shift [rad] of effective reflection coefficient for earth or
counterpoise reflection, used in (156).
\Item[$\phi_{kg,c}$]
Knife-edge diffraction phase shift [rad] for earth or counterpoise
reflection, from (138).
\Item[$\phi_{Tg,c}$]
Total phase shift [rad] of effective reflection coefficient for earth
or counterpoise reflection, from (157).
\Item[$\psi$]
Grazing angle shown in Figures 8 and 9.
\Item[$|_c$]
Expression evaluated for specific conditions such as climate or time
block in (267).
\end{itemize}
\endgroup
\end{document}
评论:
或者,可以使用环境
description
。但是,标签中的字体默认为粗体。可以通过添加 来覆盖\mdseries
。可以将内联数学的美元添加到宏中
\Item
。然而,这会使 TeX 编辑器更难(实际上不可能)识别数学。
顺便说一句,不要使用硬编码的数字来引用图表和引文,而应该使用 LaTeX 命令,例如\label
、\ref
和\cite
。这样,如果文本发生变化,数字就会自动更新。
答案2
tabularx
我认为使用环境比使用环境更好itemize
。
观察使用\si
(包提供的宏siunitx
)来格式化科学单位。
% !TEX TS-program = pdflatex
\documentclass{article}
\usepackage{tabularx} % for 'tabularx' env. and '\extrarowheight' macro
\usepackage{siunitx} % for '\si' macro
\begin{document}
\noindent
\setlength\extrarowheight{1ex}
\begin{tabularx}{\textwidth}{@{}lX@{}} % X column for descriptive material
$\sigma_i$
& Ionic conductivity [\si{mho\per\meter}] for water [15, p.~26].\\
$\phi$
& Phase advance associated with complex earth reflection
coefficient used in (155).\\
$\phi_{\si{\gram},c}$
& Phase shift [\si{\radian}] of effective reflection coefficient
for earth or counterpoise reflection, used in (156).\\
$\phi_{\si{\kilo\gram},c}$
& Knife-edge diffraction phase shift [\si{\radian}] for earth or
counterpoise reflection, from (138).\\
$\phi_{\si{\tera\gram},c}$
& Total phase shift [\si{\radian}] of effective reflection
coefficient for earth or counterpoise reflection, from (157).\\
$\psi$
& Grazing angle shown in Figures 8 and 9.\\
$|_c$
& Expression evaluated for specific conditions such as climate
or time block in (267).\\
\end{tabularx}
\end{document}
附录:如果左侧列的宽度必须正好是 1.5 厘米,我建议您在代码中替换l
为:p{1.5cm}
\noindent
\begingroup
\setlength\extrarowheight{1ex}
\setlength\tabcolsep{0pt}
\begin{tabularx}{\textwidth}{p{1.5cm}X} % 1st col. exactly 1.5cm wide
$\sigma_i$
& Ionic conductivity [\si{mho\per\meter}] for water [15, p.~26].\\
... % remainder of tabular material
\end{tabularx}
\endgroup