[texhax] redefine hyphenmins for a fragment of text
Aleksandar Zec
zealeksanman at gmail.com
Mon May 17 21:49:57 CEST 2010
2010/5/16 Pierre MacKay <pierre.mackay at comcast.net>:
> On 05/16/2010 09:37 AM, Aleksandar Zec wrote:
>>
>> Hi,
>>
>> Is there a simple way to arbitrary redefine \righthyphenmin and
>> \lefthyphenmin just for a part of the document?
>>
>
> Absolutely. you just do it. You may be able to isolate the change in a
> \begingroup . . . \endgroup pair but, if you can't you can always restore
> the old values explicitly.
>
> I just tried the \begingroup \endgroup trick, and it seems to do the job
> very nicely.
So it's that simple. Thanks! More tests show you're right; example
code included below. What confused me is that (it seems that)
sometimes babel or polyglossia settings related to hyphenmins cause
that this isolating doesn't have a desired effect (cf.
\setlocalhyphenmins).
For now I have only a very complicated example; if I isolate the
problem in a small piece of code I'll post it here.
\documentclass[12pt,twoside]{report}
\begin{document}
\righthyphenmin=3
\fbox{
\begin{minipage}{2cm}
1.\par
administration\par
2.\par
text text
administration\par
3.\par
text text
administration\par
\begingroup
\righthyphenmin=11
text text
administration\par
\endgroup
4.\par
text text
administration\par
5.\par
\righthyphenmin=3
text text
administration\par
\end{minipage}
}
\end{document}
Many thanks,
Aleks
More information about the texhax
mailing list