我正在用LaTeX编写文档,遇到一行自动换行时遇到问题。我需要的是在文本环绕时缩进以使其与标签匹配(非常类似于\ item [Label:] Text函数,但我不能使用{description}上下文。有什么想法吗?

这发生在

\newcommand{\objectiveresheading}[1]{%
  {\parashade[.9]{sharpcorners{\textbf{\Large{Objective: }\large{#1}}}}}

最佳答案

有一个内部LaTeX宏可以执行此功能,称为\@hangfrom。这是一个例子:

\ documentclass {article}
\ usepackage {lipsum}
\ begin {document}
\ makeatletter
\ newcommand * \ objectiveresheading [1] {%
\ @hangfrom {\ Large \ bfseries目标:}%
{\ large \ bfseries#1 \ par}%
}
\ makeatother
\ objectiveresheading {\ lipsum [1]}
\ end {document}


请注意,换行的文本只能是一个段落。如果需要多个段落,则与列表环境更类似的内容会更好。

10-08 02:56