1

I have a hack for fitting as much text as possible in a 2-line parbox using \textls (microtype package). Here is the code:

\documentclass{article}

\usepackage[latin1]{inputenc}
\usepackage[cyr]{aeguill}
\usepackage[T1]{fontenc}

\usepackage[babel=true]{microtype}

\usepackage[french]{babel}

\usepackage[french=guillemets]{csquotes}
\MakeAutoQuote{«}{»}

\begin{document}

\fontfamily{qag}\fontsize{6pt}{6.6pt}\selectfont

\newlength{\mytextheight}
\newcount\foo

\def\mytext{CA«S»TILLA 2000, vert foncé et or (millésime 1995)}

\foo=0
\loop
\settoheight{\mytextheight}{\parbox{70pt}{\textls[\foo]{\mytext}}}
\advance \foo -5
\ifdim \mytextheight>10pt
\repeat

\parbox{70pt}{\mytext}      

\vspace{4mm}

\parbox{70pt}{\textls[\foo]{\mytext}}

\end{document}

For some reason the space before the closing guillemet is different from the one after the opening guillemet, which looks ugly. How may I correct this? Thanks for any idea. enter image description here

9
  • don't put % after literal integers. Commented Nov 20, 2020 at 17:49
  • I get ! Package csquotes Error: Invalid argument. from your example file Commented Nov 20, 2020 at 17:52
  • compiles just fine here Commented Nov 20, 2020 at 17:52
  • removed all % Commented Nov 20, 2020 at 17:53
  • I see what it is you have used \usepackage[latin1]{inputenc} specifying the file is in the legacy 8bit encoding but as posted to this site it (like every post here) is in UTF-8 so you need to remove the inputenc line Commented Nov 20, 2020 at 17:54

1 Answer 1

1

One solution is as follows:

\DeclareFontFamily{U}{wncyr}{}
\DeclareFontShape{U}{wncyr}{m}{n}{<->wncyr10}{}
\DeclareFontShape{U}{wncyr}{m}{it}{<->wncyi10}{}
\DeclareFontShape{U}{wncyr}{m}{sc}{<->wncysc10}{}
\DeclareFontShape{U}{wncyr}{b}{n}{<->wncyb10}{}

\DeclareTextCommand{\guillemotleft}{T1}{%
  {\hbox{\fontencoding{U}\fontfamily{wncyr}\selectfont\symbol{"3C}}}%
}
\DeclareTextCommand{\guillemotright}{T1}{%
  {\hbox{\fontencoding{U}\fontfamily{wncyr}\selectfont\symbol{"3E}}}%
}

It replaces aeguill and the hboxes avoid the weird-looking space before the closing guillemet. enter image description here

You must log in to answer this question.

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