答案1
有以下三种方法可以实现此目的:
\documentclass{article}
\usepackage{lipsum}
\usepackage{scrextend}
\usepackage{enumitem}
\begin{document}
\noindent Text\vspace*{-\baselineskip}
\begin{addmargin}[40pt]{0pt}
\lipsum[11]
\end{addmargin}
\vskip1cm
\leftskip=40pt\noindent
\llap{\makebox[40pt][l]{Text}}\lipsum[11]
\vskip1cm
\begin{description}[font=\normalfont, leftmargin=40pt, labelwidth =\dimexpr40pt-\labelsep\relax]
\item[Text] \lipsum[11]
\end{description}
\end{document}
答案2
答案3
这是一个addmargin
可以嵌套和调整边距以及添加“标题”的实现:
\documentclass{article}
\usepackage[margin=1in,showframe]{geometry}% Just for this example
\usepackage{lipsum}
\usepackage{xgalley}
\ExplSyntaxOn
% http://river-valley.zeeba.tv/media/conferences/tug-2015/0302-Joseph-Wright/
\cs_new_eq:NN \SetAbsMargins \galley_margins_set_absolute:nn % {<left margin>}{<right margin>}
\cs_new_eq:NN \SetRelMargins \galley_margins_set_relative:nn % {<left margin>}{<right margin>}
\ExplSyntaxOff
\newcommand{\inserttitle}{}
\newenvironment{addmargin}[2][40pt]
{%
\renewcommand{\inserttitle}[1]{%
\noindent\makebox[0pt][r]{\makebox[#1][l]{\bfseries ##1}}%
\ignorespaces}%
\SetRelMargins{#1}{#2}\ignorespaces}
{\par}
\begin{document}
\sloppy% Just for this example
\begin{addmargin}{0pt}
\inserttitle{Text}
\lipsum[11]
\lipsum[12]
\begin{addmargin}[75pt]{20pt}
\inserttitle{More text}
\lipsum[11]
\end{addmargin}
\inserttitle{Text\ldots}
\lipsum[13]
\end{addmargin}
\end{document}
默认左边距宽度为 40pt。