负缩进?

负缩进?

特定段落的负缩进是否可行,还是需要使用其他命令?即,第一行应从边距内开始。

是否可以构建类似的命令\noindent,将(段落的)第一行刷新为任意值,或者是否已经存在负缩进,或者是否存在易于实现的解决方案?

答案1

您可以简单地使用\hspace*{-3cm}blablabalbabal

答案2

只需设置\parindent为负值,例如

\setlength{\parindent}{-1em}

如果要保留\parindent其他段落的原样,请进行本地更改,例如

\bgroup
\setlength{\parindent}{-1em} 
PARAGRAPH
\egroup

答案3

我们可以\parindent局部设置该参数,强制在同一组中开始一个段落。组结束时将恢复原来的 值\parindent,但已使用不同的值。注意 后面\negpar不能跟空行。

\documentclass{article}

\newcommand{\negpar}[1][-1em]{%
  \ifvmode\else\par\fi
  {\parindent=#1\leavevmode}\ignorespaces
}

\begin{document}

Some text with normal indentation. And other text to fill the 
paragraph over a couple of lines or maybe three, just add 
nonsense text forever and ever and beyond for years.

\negpar
Some text with negative indentation. And other text to fill the 
paragraph over a couple of lines or maybe three, just add 
nonsense text forever and ever and beyond for years.

Some text with normal indentation. And other text to fill the 
paragraph over a couple of lines or maybe three, just add 
nonsense text forever and ever and beyond for years.

\negpar[-2em]
Some text with negative indentation. And other text to fill the 
paragraph over a couple of lines or maybe three, just add 
nonsense text forever and ever and beyond for years.

Some text with normal indentation. And other text to fill the 
paragraph over a couple of lines or maybe three, just add 
nonsense text forever and ever and beyond for years.

\end{document}

在此处输入图片描述

相关内容