
我正在寫一篇論文,想要定義一些關鍵術語。現在,我只是透過 itemize 來完成此操作並使用縮排的小項目符號點。看起來不錯,但我想 LaTeX 的優點之一是我可以夢想更大並找到更多美學選擇。
然而,當我在谷歌上搜尋「LaTeX 中的單字定義環境」時,我得到了與數學相關的主題的專門搜尋結果。對於我可以以與周圍文字偏移的方式定義術語的環境,你們中有人有好的建議嗎?
這就是我現在所做的:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
Many terms are important, including surprising ones. In this treatise, we use the word \textit{potato}, like so:
\begin{itemize}
\item Potato. Species of ghost native to Mexico.
\end{itemize}
Therefore, we propose that potatoes be dug up and reburied in accordance with proper rites.
\end{document}
但我更喜歡這樣的東西:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
Many terms are important, including surprising ones. In this treatise, we use the word \textit{potato}, like so:
Potato. Species of ghost native to Mexico.
% Where the above is nicely indented, offset from the rest of the paragraph, so readers can easily find it.
Therefore, we propose that potatoes be dug up and reburied in accordance with proper rites.
\end{document}
答案1
……縮排得很好,與段落的其餘部分偏移,因此讀者可以輕鬆找到它。
enumitem
在我看來,環境的清單格式化功能description
可以做到這一點:
\documentclass{article}
\usepackage{enumitem}
\newlist{worddefs}{description}{1}
\setlist[worddefs]{font=\sffamily\bfseries, labelindent=\parindent, leftmargin=6em, style=sameline}
\begin{document}
Many terms are important, including surprising ones. In this treatise, we use the word \textit{potato}, like so:
\begin{worddefs}
\item[Potato.] Species of ghost native to Mexico.
\item[Potato.] Species of ghost native to Mexico. Species of ghost native to Mexico.
Species of ghost native to Mexico. Species of ghost native to Mexico.
\item[Potatomato.] Species of ghost native to Mexico.
\end{worddefs}
Therefore, we propose that potatoes be dug up and reburied in accordance with proper rites.
\end{document}