如何为文档的一半创建左侧部分

如何为文档的一半创建左侧部分

我想创建如下所示的文档。我该怎么做?

在此处输入图片描述

答案1

使用paracol. 这相当简单:

在此处输入图片描述

\documentclass{article}
\usepackage{paracol,lipsum}
\usepackage[margin=1in]{geometry}% Just for this example

\begin{document}

%\columnratio{0.5} 50/50 split between columns
\raggedright
\begin{paracol}{2}
  \textbf{Study Name (Number):}
  \switchcolumn
  MarginProbe System US Post-Market Study
  \switchcolumn*
  \textbf{Product:}
  \switchcolumn
  MarginProbe System
  \switchcolumn*
  \textbf{Indication:}
  \switchcolumn
  \underline{Intended Use:} \par
  \lipsum[2]
\end{paracol}

\columnratio{0.3}% First column takes up 30% of \textwidth
\begin{paracol}{2}
  \textbf{Study Name (Number):}
  \switchcolumn
  MarginProbe System US Post-Market Study
  \switchcolumn*
  \textbf{Product:}
  \switchcolumn
  MarginProbe System
  \switchcolumn*
  \textbf{Indication:}
  \switchcolumn
  \underline{Intended Use:} \par
  \lipsum[2]
\end{paracol}

\end{document}

答案2

您还可以使用descriptionlongtable环境:

在此处输入图片描述

labelwidth=5.0cm可以通过设置等或更改环境p{}中的设置来调整列的大小longtable以获得:

在此处输入图片描述


代码:description

\documentclass{article}
\usepackage{lipsum}
\usepackage{calc}
\usepackage{enumitem}

\begin{document}
\begin{description}[labelwidth=\widthof{\bfseries Study Name (Number):}, leftmargin=!, noitemsep]
  \item [Study Name (Number):]
      MarginProbe System US Post-Market Study
  \item [Product:]
      MarginProbe System
  \item [Indication:]
      \underline{Intended Use:} \par
      \lipsum[2]
\end{description}
\end{document}

代码:description带有列大小控制:

\documentclass{article}
\usepackage{lipsum}
\usepackage{calc}
\usepackage{enumitem}

\begin{document}
\begin{description}[labelwidth=5.0cm, leftmargin=!, noitemsep]
  \item [Study Name (Number):]
      MarginProbe System US Post-Market Study
  \item [Product:]
      MarginProbe System
  \item [Indication:]
      \underline{Intended Use:} \par
      \lipsum[2]
\end{description}
\end{document}

代码:longtable

\documentclass{article}
\usepackage{lipsum}
\usepackage{longtable}

\begin{document}
\raggedright
\begin{longtable}{@{}p{4.5cm} p{\dimexpr\linewidth-4.5cm-2\tabcolsep\relax}@{}}
  \textbf{Study Name (Number):} &
      MarginProbe System US Post-Market Study \\
  \textbf{Product:} &
      MarginProbe System \\
  \textbf{Indication:} &
      \underline{Intended Use:} \par
      \lipsum[2]
\end{longtable}
\end{document}

相关内容