Technology computers-hardware

How to Offset a Paragraph in LaTeX

    • 1). Open a text editor, and type the following to define a trivial LaTeX document: <br /><br /><br /><br />\documentclass{article}<br /><br />\begin{document}<br /><br />\blindtext<br /><br />\\blindtext<br /><br />\\blindtext<br /><br />\end{document}<br /><br /><br /><br />.The "\\" command specifies a paragraph break, while the "\blindtext" command is used to randomly generate a paragraph of text in order to allow the layout of a page to be previewed.

    • 2). Add the following commands before and after the middle "\blindtext" command so that it now looks like this: <br /><br /><br /><br />\begingroup<br /><br />\blindtext<br /><br />\endgroup<br /><br /><br /><br />.This creates a grouping for this one paragraph of blind text so that the layout can be manipulated without affecting the rest of the document.

    • 3). Add the following command within the "\begingroup" and "\endgroup" commands to have the paragraph margins shifted four em spaces to the left and right: <br /><br /><br /><br />\begingroup<br /><br />\leftskip 4em<br /><br />\rightskip 4em<br /><br />\blindtext<br /><br />\endgroup.

Leave a reply