Indent Word Wrap in LaTeX

I write a document in LaTeX and run into a problem when I have a line of text that wraps around. I need the text to wrap around when it wraps so that it matches the label (like the \ item [Label:] Text function, except that I can't use the context {description}. Any ideas?

This happens in context.

\newcommand{\objectiveresheading}[1]{% {\parashade[.9]{sharpcorners{\textbf{\Large{Objective: }\large{#1}}}}} 
+4
source share
2 answers

There is an internal LaTeX macro to execute this function named \@hangfrom . Here is an example:

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

Please note that wrapped text can only be one paragraph. If you need a few paragraphs, something that looks more like a list environment would be better.

+5
source

You can place the label in a numbered square, take the width of this window and use \hangindent and \hangafter to create an indented paragraph. To learn how to use \setbox , \wd , \hangindent and \hangafter , the best source is probably the horse's mouth: TeXbook.

0
source

Source: https://habr.com/ru/post/1299706/


All Articles