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}

====================
2
  • 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, 2011 at 3:02
  • Alas, you have to insert line breaks yourself; at present, you have a few very long lines.
    – Ryan Reich
    May 6, 2011 at 3:56

1 Answer 1

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

3
  • 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, 2011 at 17:36
  • @Swamidass: see edited answer :-)
    – Lev Bishop
    May 7, 2011 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 8, 2011 at 4:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .