Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For some text (\blindtext below), I would like to add 20pt to the left and right page margin, and I would like the text to be raggedright (no hyphenation).

The first try below does not add 20pt to the right margin. The second try below does not apply raggedright.

\documentclass{article}
\usepackage{blindtext}

\begin{document}
\setlength{\parindent}{0pt}
TEXT LEFT \hfill TEXT RIGHT

\begingroup\raggedright\leftskip=20pt \blindtext \par\endgroup
\par\vspace{20pt}

\begingroup\raggedright\leftskip=20pt\rightskip=20pt \blindtext \par\endgroup
\end{document}

enter image description here

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You have to add 20pt to the value of \@rightskip and \rightskip set by \raggedright; with your setting you lose the flexibility of \rightskip necessary for getting a ragged right effect.

\documentclass{article}
\usepackage{blindtext}

\begin{document}
\setlength{\parindent}{0pt}
TEXT LEFT \hfill TEXT RIGHT

\begingroup\raggedright\leftskip=20pt \blindtext \par\endgroup
\par\vspace{20pt}

\begingroup\raggedright
\leftskip=20pt
\advance\csname @rightskip\endcsname 20pt \advance\rightskip 20pt
\blindtext \par\endgroup
\end{document}

enter image description here

share|improve this answer
    
That's awesome, by the way, thank you so much. –  Frank Seifert Feb 12 '13 at 21:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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