6

I'm trying to get a block of text to be aligned 2.55cm from the left of the page. I'm sure there's a better way of doing this, but it would be nice to get an answer anyway.

When I type:

\hspace{2.55cm} text text text text text text ... text

I get an output that has the first line 2.55cm from the left but the following lines are aligned with the left of the page, naturally. So I tried using the \hspace{2.55cm} command at the point in the text where I want there to be an indent (i.e. the start of every line in the output). But when I do this, I get the same output with only the first line indented by 2.55cm and the following lines aligned with the left of the page. Why is this - and how do I fix it?

  • 2
    Well, what you try to do doesn't sound like a good idea. Could you please post a Minimal Working Example showing what you have, and explain precisely what is your intention? Because I have a feeling that you're mis-using some of the concepts of LaTeX -- which happens quite often, but still, it's better to change it, isn't it? ;) – yo' Oct 28 '13 at 20:45
  • Do you want all lines in a paragraph indented like that? – Sigur Oct 28 '13 at 20:46
  • @Sigur yes I do, I basically want every new line to be indented from the left by 2.55cm. – Danger Fourpence Oct 28 '13 at 20:49
  • But only for a part of the document, right? I suggest you to adapt the quote environment. – Sigur Oct 28 '13 at 20:50
  • Every new line? and 2.55cm from left margin of the typeblock is? \parindent 2.55cm (or: \setlength{\parindent}{2.55cm}) and start a new paragraph with each line. Or this is in an environment..? Or do you mean every line in the output..? – jon Oct 28 '13 at 20:51
8

Using the changepage package, one can locally adjust the margins of text in a page. To achieve this, we use the environment, adjustwidth.

\begin{adjustwidth}{<leftmargin>}{<rightmargin>}
<content>
\end{adjustwidth}

enter image description here

\documentclass{article}
\usepackage{changepage}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
    \begin{adjustwidth}{2.5cm}{}
    \lipsum[1-2]
    \end{adjustwidth}
\lipsum[1-2]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.