字典模板如何按字母顺序排列

字典模板如何按字母顺序排列

我正在使用 Overleaf 作为编辑器,并偶然发现了他们的字典模板。当我编写自己的条目时,它们不会像字典那样按字母顺序排列。

问:如何\entry{}按照上述词典模板的字母顺序对 s 进行排序?

梅威瑟:

\documentclass[10pt,a4paper,twoside]{article} % 10pt font size, A4 paper and two-sided margins
\usepackage[top=3.5cm,bottom=3.5cm,left=3.7cm,right=4.7cm,columnsep=30pt]{geometry} % Document margins and spacings
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{palatino} % Use the Palatino font
\usepackage{microtype} % Improves spacing
\usepackage{multicol} % Required for splitting text into multiple columns
\usepackage[bf,sf,center]{titlesec} % Required for modifying section titles - bold, sans-serif, centered
\usepackage{fancyhdr} % Required for modifying headers and footers
\fancyhead[L]{\textsf{\rightmark}} % Top left header
\fancyhead[R]{\textsf{\leftmark}} % Top right header
\renewcommand{\headrulewidth}{1.4pt} % Rule under the header
\fancyfoot[C]{\textbf{\textsf{\thepage}}} % Bottom center footer
\renewcommand{\footrulewidth}{1.4pt} % Rule under the footer
\pagestyle{fancy} % Use the custom headers and footers throughout the document

\newcommand{\entry}[4]{\markboth{#1}{#1}\textbf{#1}\ {(#2)}\ \textit{#3}\ $\bullet$\ {#4}}  % Defines the command to print each word on the page, \markboth{}{} prints the first word on the page in the top left header and the last word in the top right

\begin{document}


%   Section A

\section*{A}

\begin{multicols}{2}

\entry{Aardvark}{ahrd-vahrk}{Noun}{A nocturnal badger-sized burrowing mammal of Africa, with long ears, a tubular snout, and a long extensible tongue, feeding on ants and termites. Also called antbear.}

% . . . 

\entry{Azobenzene}{az-oh-ben-zeen}{Noun}{A synthetic crystalline organic compound used chiefly in dye manufacture.}

\end{multicols}

%  Section B

\section*{B}

\begin{multicols}{2}

\entry{Babble}{bab-uh l}{Verb}{Talk rapidly and continuously in a foolish, excited, or incomprehensible way.}

% ......

\entry{Bystander}{bahy-stan-der}{Noun}{A person who is present at an event or incident but does not take part.}

\end{multicols}

\end{document}

相关内容