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.

Here is my problem. I need some text to have a reduced margin. Unfortunately, none of the suggested methods of doing this appear to be compatible with microtype protrusion. Is this a bug? Is there a better method? How do I fix this?

Thanks!

=======example tex======
%preamble
\usepackage{chngpage}

%change margin environment
\newenvironment{changemargin}[2]{
 \begin{list}{}{
    \setlength{\topsep}{0pt}
    \setlength{\leftmargin}{#1}
    \setlength{\rightmargin}{#2}
    \setlength{\listparindent}{\parindent}
    \setlength{\itemindent}{\parindent}
    \setlength{\parsep}{\parskip} }
    \item[]} {\end{list}}

%document

``So'' the quotes in the first line will be margin kerned (protruded) just like it should be.

\begin{adjustwidth}{1em}{1em}
``So'' the quotes to the left in this line will \emph{not} be margin kerned (protruded) just like it should be. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious.
\end{adjustwidth}

\begin{changemargin}{1em}{1em}
``So'' the quotes to the left in this line will \emph{not} be margin kerned (protruded) just like it should be. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious.
\end{changemargin}

\begin{quote}
``So'' the quotes to the left in this line will \emph{not} be margin kerned (protruded) just like it should be. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious.
\end{quote}

====================
share|improve this question
    
Welcome to tex.sx! If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). –  Caramdir May 6 '11 at 3:02
    
Alas, you have to insert line breaks yourself; at present, you have a few very long lines. –  Ryan Reich May 6 '11 at 3:56
    
Thanks for cleaning it up for me and the advice! –  Swamidass May 7 '11 at 17:26

1 Answer 1

See this question. The protrusion is only disabled for the first character of the paragraph, due to the \item (which is hidden in the case of quote and adjustwidth).

The answers to that question give some possible solutions, or for simply increasing the margins you can use TeX primitives:

{\leftskip 1em\rightskip 1em%
``So'' the quotes to the left in this line will be margin kerned (protruded)...\par}

Note, the values of \leftskip and \rightskip are looked at at the end of the paragraph, so you need to include the \par inside the group and before the closing }.

share|improve this answer
    
Thanks for the answer! The link to the other questions suggests defining the \protrudeleft command, and this solution works okay for me (though it is a pain to look for the right places to put it). I can't get your leftskip/rightskip method to work...it doesn't change the margins. Do you know if there is away to fix that? –  Swamidass May 7 '11 at 17:36
    
@Swamidass: see edited answer :-) –  Lev Bishop May 7 '11 at 18:48
    
Okay I can get it to work now! For those who find this question, try using this environment to change margins. \newenvironment{changemargin}[2]{\begingroup\leftskip#1\rightskip#2}{\par\endgro‌​up} –  Swamidass May 8 '11 at 4:23

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.