答案1
这是我的建议:使用paracol
包实现具有同步列的双列布局,使用booktabs
和tabularx
包实现文本宽度宽表,使用enumitem
包实现自定义description
环境,并使用自定义命令实现左列的小标题。
\documentclass{article}
%%%%% Smaller margins, no parindent and a small vertical white space between paragraphs %%%%%
\usepackage{geometry}
\usepackage{parskip}
%%%%% For a two column layout with synchronized columns, left column takes up 25% of the horizontal space %%%%%
\usepackage{paracol}
\columnratio{0.25}
%%%%% For tables as wide as the textwidth and horizontal lnes with a decent spacing %%%%%
\usepackage{booktabs}
\usepackage{tabularx}
%%%%% For the small "headers" in the left column %%%%%
\newcommand{\myheader}[1]{\bigskip%
\begin{leftcolumn*}%
\begin{tabularx}{\linewidth}{@{}X@{}}%
\toprule%
\textbf{#1}%
\end{tabularx}%
\end{leftcolumn*}%
\switchcolumn}
%%%%% For the customized description environment %%%%%
\usepackage{enumitem}
\setlist[description]{leftmargin=0.5cm,labelindent=0.5cm}
%%%%% For the dummy text. Do not use in real document %%%%%
\usepackage{lipsum}
\begin{document}
\begin{paracol}{2}[\section*{alias}]
\begin{rightcolumn}
\lipsum[4]
\begin{description}\itshape
\item[word] Here is the description text
\item[other word] Here is the other description
\end{description}
\end{rightcolumn}
\myheader{Syntax Description}
\begin{tabularx}{\linewidth}{@{}>{\itshape}lX@{}}
\toprule
text & longer description text that can also use up more than one line\\
\midrule
more text & another description\\
\midrule
third text & last description in this table\\
\bottomrule
\end{tabularx}
\myheader{Defaults}
\lipsum[4]
\end{paracol}
\end{document}