Re: Numeri di pagina in maiuscoletto con memoir

#66479
Up
0
Down
::

samiel” post=65511Vorrei ottenere i numeri in maiuscoletto in frontmatter usando la classe memoir.
Ho il seguente codice:
`\makeatletter
\DeclareRobustCommand{\@fakesc}[1]{%
\begingroup$\m@th$\fontsize{\sf@size}{\f@baselineskip}\selectfont#1\endgroup}
\newcommand{\@scroman}[1]{\@fakesc{\@Roman{#1}}}
\pdfstringdefDisableCommands{\let\@fakesc\@firstofone}
\renewcommand\frontmatter{%
\cleardoublepage
\@mainmatterfalse
\pagenumbering{scroman}}
\makeatother`
Ora, io uso hyperref e la stringa
\pdfstringdefDisableCommands{\let\@fakesc\@firstofone}
mi dà errore. Disabilitandola, la compilazione va a buon fine,
ma ottengo una sfilza di:
`Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `math shift' on input line 570.`
Cosa devo correggere? O memoir offre un modo più lineare
di ottene questo risultato che (finora) non ho individuato nel manuale?

Grazie
M

PS
Anche in un altro contesto ho dovuto modificare del codice
a causa di \pdfstring. Ma memoir proprio non lo digerisce?

Il seguente esempio non mi dà alcun errore:
`\documentclass{memoir}
\usepackage{lipsum,hyperref}
\makeatletter
\DeclareRobustCommand{\@fakesc}[1]{%
\begingroup\check@mathfonts\fontsize{\sf@size}{\f@baselineskip}\selectfont#1\endgroup}
\newcommand{\@scroman}[1]{\@fakesc{\@Roman{#1}}}
\pdfstringdefDisableCommands{\let\@fakesc\@firstofone}
\renewcommand\frontmatter{%
\cleardoublepage
\@mainmatterfalse
\pagenumbering{scroman}}
\makeatother
\begin{document}
\frontmatter
\tableofcontents*
\chapter{Introduzione}
\lipsum
\mainmatter
\chapter{A}
\lipsum
\end{document}`
(Nota \check@mathfonts è solo più efficiente di $\m@th$ e non ha alcuna influenza sul tuo eventuale problema).

Ciao
Enrico

Go to top