起始代码如下。我想要第一个文本列的悬挂缩进:
梅威瑟:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{paracol}
\usepackage{parskip}
\setlength{\parindent}{15pt}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{paracol}
\usepackage{parskip}
\setlength{\parindent}{15pt}
\usepackage{CJKutf8}
\begin{document}
\section*{Random Text}
\begin{paracol}{2}
%\hangindent
Person 1: "\blindtext"
%\hangafter
\switchcolumn \noindent
Person 2: "\blindtext"
\end{paracol}
\end{document}
后续行中的随机文本需要与第一行的开头引号对齐。这应该一直持续到我指示它以新行结束为止。
答案1
也许您可以使用 KOMA-Script 包的标签环境。
\documentclass[parskip=true]{scrartcl}
\usepackage{blindtext}
\usepackage{paracol}
\addtokomafont{labelinglabel}{\bfseries}
\begin{document}
\section*{Random Text}
\begin{paracol}{2}
\begin{labeling}{Person 1}
\item[Person 1] \blindtext
\end{labeling}
\switchcolumn
\begin{labeling}{Person 2}
\item[Person 2] \blindtext
\end{labeling}
\end{paracol}
\end{document}
答案2
这对你有用吗?我只是用这个description
列表。
版本 1
\documentclass{article}
\usepackage{blindtext}
\usepackage{paracol}
\usepackage{parskip}
\begin{document}
\section*{Random Text}
\begin{paracol}{2}
\begin{description}
\item[Person 1] \blindtext
\end{description}
\switchcolumn
\begin{description}
\item[Person 2] \blindtext
\end{description}
\end{paracol}
\end{document}
版本 2
在这里我添加了enumitem
和calc
包。
\documentclass{article}
\usepackage{blindtext}
\usepackage{paracol}
\usepackage{parskip}
%% Important here
% http://tex.stackexchange.com/questions/9760
% http://tex.stackexchange.com/questions/7008
% http://tex.stackexchange.com/questions/217722
% http://tex.stackexchange.com/questions/33817 <-- very relevant
\usepackage{calc}
\usepackage{enumitem}
\setlist[description]{
leftmargin=18mm,
itemindent=0mm,
labelwidth=\leftmargin-\labelsep
}
\begin{document}
\section*{Random Text}
\begin{paracol}{2}
\begin{description}
\item[Person 1] \blindtext
\end{description}
\switchcolumn
\begin{description}
\item[Person 2] \blindtext
\end{description}
\end{paracol}
\end{document}
版本 3 — 我认为的最佳解决方案
\documentclass{article}
\usepackage{blindtext}
\usepackage{paracol}
\usepackage{parskip}
\usepackage{calc}
%% Important here
% http://tex.stackexchange.com/questions/9760
% http://tex.stackexchange.com/questions/7008
% http://tex.stackexchange.com/questions/217722
% http://tex.stackexchange.com/questions/33817 <-- very relevant
\usepackage{enumitem}
\setlist[description]{
leftmargin=\widthof{\normalsize\textbf{Person 99}},
style=nextline
}
\begin{document}
\section*{Random Text}
\begin{paracol}{2}
\begin{description}
\item[Person 1] \blindtext
\end{description}
\switchcolumn
\begin{description}
\item[Person 2] \blindtext
\end{description}
\end{paracol}
\end{document}