段落写作

段落写作

如何实现如下图所示的排版?我特别想知道如何在 Latex 中编写段落。第2章(等)好像字体要大一点,如何实现每段的缩进?

我将非常感激一个类似于下图所示的文本结构的最小工作示例。

在此处输入图片描述

答案1

您可以使用description列表来执行此操作。

\chapter{title}
\section{title}
\section{title}
\section{Structure}
\begin{description}
\item[Chapter 2] lipsum*[2]

\item[Chapter 3] lipsum*[3]
\end{description}

在此处输入图片描述

答案2

Sigur 的答案是正确的解决方案。它干净利落地完成了工作,但总是走捷径有什么乐趣呢?

这里有两种(有些更复杂)方法来实现相同的效果,但无需任何环境,可以轻松包含自动编号标签,甚至将其添加到目录中。这些原因可能比“为了好玩”更一致……其他原因可能是您需要几个类似描述的编号段落和/或具有可以在任何地方混合的不同样式。玩得开心。

姆韦

\documentclass{scrartcl}
% page layout (optional)
\pagestyle{plain}\parskip.3em
% dummy example text 
\def\dummytext{This is a long dummy sentence that mean 
nothing and take only some more that one line. }
\begin{document}

\section{Kinky use of \texttt{\textbackslash paragraph}}

% ===== settings =====
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\makeatletter
\renewcommand*\l@paragraph{\@dottedtocline{4}{2em}{5em}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex\hangindent3em}{-1em}%
{\normalsize\sffamily\bfseries}}
\makeatother

\renewcommand\theparagraph{Chapter \arabic{paragraph}}

% ===== Check of TOC results ======
{\footnotesize
\renewcommand\contentsname{\hrulefill}
\tableofcontents\hrulefill
}


% ===== Use examples ======= 
\setcounter{paragraph}{1} % Omit Chapter 1
\paragraph{} \dummytext\par          % Numbered label 
\dummytext                           % Normal paragraph whitin the pseudo-list 

\paragraph[\mbox{}]{}  \dummytext            % Numbered label in TOC 
\paragraph*{Annex A}  \dummytext\dummytext   % Custom label
\paragraph[description]{The Last Chapter}    % Custom numbered label in TOC  
\dummytext\dummytext


\section{Autonumbered macro \texttt{\textbackslash chapdescr}}

% ===== definition =====
\newcounter{chapterdescr}\setcounter{chapterdescr}{1}
\def\chapdescr{%
\addtocounter{chapterdescr}{1}\par\noindent%
\hangindent3em\textbf{\sffamily Chapter \arabic{chapterdescr}}\hskip1em}

% ===== Use examples ======= 
\chapdescr    \dummytext\par
There are no option here, nor special paragraph skips nor 
entries in TOC.  You can use also normal paragraphs 
whitin the pseudo-description lists. 
\chapdescr    \dummytext\dummytext

\end{document}

相关内容