3

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}

====================
lockstep
  • 250,273

1 Answers1

4

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 }.

Lev Bishop
  • 45,462
  • 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 07 '11 at 17:36
  • @Swamidass: see edited answer :-) – Lev Bishop May 07 '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\endgroup}

    – Swamidass May 08 '11 at 04:23