[texhax] Soul + Babel + multiple languages conflict

Dmitrii Dimandt dmitriid at gmail.com
Thu Jul 31 10:04:06 CEST 2008


Hi all.

I'm using the excellent memoir class to typeset my document which is  
mostly in Russian

Reading through eye-opening and mind-boggling MemoirChapterStyles I  
decided to try and use one of the fancier styles (daleif1)

This, however, presented a problem.

The word "Chapter" is being automatically generated for each chapter.  
In Russian this word is "Глава". However, since Russian is  
included via babel, hyphenation rules are automatically applied to  
this word and soul fails with "Package soul Error: Reconstruction  
failed." and forms a black square after the chapter word

Since I really like the style, i would like to find a way to suppress  
hyphenation for this automatically generated word so that soul can  
work with it.

Is there way to do that?

Here's the code for the daleif1 style:

\usepackage{color,calc,graphicx,soul,fourier}
\definecolor{nicered}{rgb}{.647,.129,.149}
\makeatletter
\newlength\dlf at normtxtw
\setlength\dlf at normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline at chapter}
\newcommand\feline at chapter@marker[1][4cm]{%
\sbox\feline at chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline at chapter}}+\depthof{\usebox{\feline at chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline at chapter}}}{\usebox{\feline at chapter}}%
}
\newcommand\feline at chm[1][4cm]{%
\sbox\feline at chapter{\feline at chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1cm][r]{\usebox\feline at chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape 
\color{nicered}}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline at chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}
}
\makeatother
\chapterstyle{daleif1} 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20080731/f359cd72/attachment.html 


More information about the texhax mailing list