Risposte nei forum create
-
AutoreRisposte
-
::
Mettendo da parte entrambi ii quesiti del precedente post,
il mio obiettivo è mantenere quell’aspetto con una fondamentale variante:
avere i numeri di pagina allineati a destra. Per rendere l’idea,
allego un indice la cui formattazione vorrei riprodurre

Ora, c’è un conflitto tra il codice prodotto da Pignalberi
e cioè il seguente per allineare i numeri a sinistra
`\usepackage{titletoc}
\contentsmargin{0pt}
\titlecontents{chapter}[4pc]
{\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage\quad\makebox[30pt][l]%
{\textsc{\romannumeral\thecontentslabel\ quad}}}}
{}
{}
{}`
e quello per riformattare l’indice e i titoli dei capitoli che ho prodotto nel post precedente.
Aggiungendo semplicemente i due codici viene fuori un’accozzaglia ingestibile:
`\documentclass[a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{cfr-lm}\usepackage{titlesec}
\renewcommand{\thechapter}{\scshape\roman{chapter}}
\titleformat{\chapter}[display]
{\normalfont\fontsize{11pt}{12pt}\selectfont}{\thechapter}{0pt}{}
%%{\normalfont\fontsize{11pt}{12pt}\selectfont}{\chaptertitlename\space \thechapter}{11pt}{}
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}
{\normalfont\fontsize{11pt}{12pt}\selectfont}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontsize{11pt}{12pt}\selectfont\itshape}{}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{3cm}\usepackage{titletoc}
\titlecontents{chapter}
[1.5em] % ie, 1.5em (chapter) + 2.3em
{}
{\contentslabel{2.3em}}
{\hspace*{-2.3em}}
{}
%{\titlerule*[1pc]{.}\contentspage}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% codice Pignalberi
\contentsmargin{0pt}
\titlecontents{chapter}[4pc]
{\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage\quad\makebox[30pt][l]%
{\textsc{\romannumeral\thecontentslabel\ quad}}}}
{}
{}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\begin{document}
\tableofcontents\chapter{Chapter 1 title}
Some text some text some text some text some text\section{Section a title}
Some text some text some text some text some text\section{Section b title}
Some text some text some text some text some text\chapter{Chapter 2 title}
Some text some text some text some text some text\section{Section c title}
Some text some text some text some text some text\section{Section d title}
Some text some text some text some text some text\chapter{Chapter 3 title}
Some text some text some text some text some text\section{Section e title}
Some text some text some text some text some text\section{Section f title}
Some text some text some text some text some text
\end{document}`
Purtroppo, la sezione del manuale dedicata a titletoc non è particolarmente ampia…
Come si può risistemare questo codice?grazie
m
::
Ho provato con questo codice:
`\documentclass[a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{cfr-lm}\usepackage{titlesec}
\renewcommand{\thechapter}{\scshape\roman{chapter}}
\titleformat{\chapter}[display]
{\normalfont\fontsize{11pt}{12pt}\selectfont}{\thechapter}{0pt}{}
%%{\normalfont\fontsize{11pt}{12pt}\selectfont}{\chaptertitlename\space \thechapter}{11pt}{}
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}
{\normalfont\fontsize{11pt}{12pt}\selectfont}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontsize{11pt}{12pt}\selectfont\itshape}{}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{3cm}\usepackage{titletoc}
\titlecontents{chapter}
[1.5em] % ie, 1.5em (chapter) + 2.3em
{}
{\contentslabel{2.3em}}
{\hspace*{-2.3em}}
{}
%{\titlerule*[1pc]{.}\contentspage}\begin{document}
\tableofcontents\chapter{Chapter 1 title}
Some text some text some text some text some text\section{Section a title}
Some text some text some text some text some text\section{Section b title}
Some text some text some text some text some text\chapter{Chapter 2 title}
Some text some text some text some text some text\section{Section c title}
Some text some text some text some text some text\section{Section d title}
Some text some text some text some text some text\chapter{Chapter 3 title}
Some text some text some text some text some text\section{Section e title}
Some text some text some text some text some text\section{Section f title}
Some text some text some text some text some text
\end{document}`
Le due cose che nell’indice non funzionano sono:
1) Come far sì che il numero della pagina non erediti il \fontnotesize del titolo, ma sia
di normali dimensioni, cioè come il testo? A meno di non eliminare il numero di pagina
del capitolo, come attualmente ho fatto…
2) Infine: come allineare i numeri (romani) dei capitoli a destra, e non come sono attualmente,
e cioè a sinistra?
::
In ogni caso ho trovato questo codice, che funziona per \chapter
`\usepackage{titletoc}
\contentsmargin{0pt}
\titlecontents{chapter}[4pc]
{\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage
\quad\makebox[30pt][l]{\textsc{\romannumeral
\thecontentslabel\quad}}}}
{}
{}
{}`
Non regola però anche, se immesse, le occorrenze di \section.
Lavorando con la classe \article tuttavia temo si debba modificare anche altro.
::
Sia pure con ritardo scandaloso, da alcuni giorni sono anch’io membro del GUIT !
Ma evidentemente da così poco che non mi fa ancora scaricare nulla.
Forse le procedure di accreditamento richiedono un certo tempo…. speriamo poco !!
Fra l’altro, come funziona la cosa? Io ho fatto la procedura e il bonifico:
arriva una conferma?m
::
Grazie per la soluzione! Decisamente più complessa della mia, molto artigianale,
consistente appunto nell’aggiunta del codice
`\markboth{\scshape indice dei nomi}{\scshape indice dei nomi}`
In ogni caso, anche adottando la classe book, con o senza l’opzione openany,
le testatine dell’indice continuavano ad essere sbaglaite.
Che vantaggi o comunque maggiore correttezza rappresenta la soluzione
che mi suggerisci rispetto a quella “”casereccia” che avevo adottato?grazie
m
::
Il supporto offerto da Github (che non è poi se non un fork di quello di Berlios)
implica che tu abbia gli otf; poi devi compilare con uno script gli altri formati
e quindi procedere all’installazione. Sinceramente, la prima volta che ci ho provato
mi è venuto il mal di testa, anche perché ho giocato sulla classica accoppiata
di Minion e Myriad. Una volta capito il sistema, basta solo avere un po’ di tempo.
La compilazione completa del font è infatti abbastanza lunga. Io però
ho il set completo dei caratteri ottici, che ovviamente non trovi in Acrobat Reader.
Ma come ti suggeriva OldClaudio, se “ti accontenti” di xelatex, in due minuti
hai tutto funzionantem
::
http://tex.stackexchange.com/questions/115823/titlesec-and-babel-incompatibility
Non vi si parla di ebraico, ma la soluzione è la stessa:
caricare \titleformat dopo \begindocument
Anche se non ho la più pallida idea delle ragioni di questo “bizzarro” comportamentom
::
Sì. ho controllato di aver inserito tutte le modifiche, mi sono però ricordato di aver modificato
il codice per le testatine come segue:
versione originale
`\renewcommand{\chaptermark}[1]{\markboth{\textsc{\footnotesize\thechapter. #1}}{\footnotesize\textsc{\thechapter. #1}}}
\renewcommand{\sectionmark}[1]{\markright{footnotesize\textsc\{\thesection\quad #1}}}
`
versione modificata
`\renewcommand{\chaptermark}[1]{\markboth{\footnotesize\textsc{#1}}{\footnotesize\textsc{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\footnotesize\textsc{#1}}}`
Forse ci ho infilato qualcosa che non va…
Comunque col codice \markboth{}{} la testina presenta solo il numero della pagina,
dovrei inserire manualmente il testo nella forma
`\markboth{\scshape indice dei nomi}{\scshape indice dei nomi}`
mPS Nel file di esempio l’indice era di una sola pagina, ho provato ad allungarlo per prova
e in effetti la testatina risulta sbagliata
::
Corretto l’errore causa fretta…
In ogni caso non va (già avevo provato), perché si riceve infallibilmente
`
! Package bidi Error: Oops! you have loaded package titlesec after bidi package
. Please load package titlesec before bidi package, and then try to run xelatex
on your document again.`
Quanto rompe ‘sto ebraico 😡
m
::
Giusto, così funziona:
`\renewcommand{\chaptermark}[1]{\markboth{\footnotesize\textsc{#1}}{\footnotesize\textsc{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\footnotesize\textsc{#1}}}`
devo dedurre che
`%\renewcommand{\sectionmark}[1]{\markright{\footnotesize\textsc{{#1}{}}}}`
contiene un {} di troppo?C’è solo un nuovo intoppo:
l’indice finale dei nomi continua a ereditare la testatina
del capitolo precedente, e infatti riporta “BIBILIOGRAFIA”.
Il preambolo è quello riportato qui
http://www.guitex.org/home/en/forum/5-tex-e-latex/92905-font-ebraico-e-imakeidx-relazioni-pericolosem
::
Questo però apre una serie di domande su babel e polyglossia. Leggo ad esempio:Well you can use babel with xelatex and in certain cases it is more
powerful, e.g. the french adaption of babel has much more typograpic
settings than the one from polyglossia.
You should in general _not_ use babel if you use a language which
needs another script (like russian) as it will switch fontencodings
and probably clash with fontspec.,
ma si tratta di un post molto vecchio e magari le cose sono cambiate.
Inoltre, posso “mescolarle” nello stesso documento?m
::
Installare l’Adobe Minion Pro (non “Mignon”) è abbastanza complesso, anche se
io l’ho messo su Linux e non so come funziona il mondo Apple. Esiste un supporto nel CTAN
http://www.ctan.org/tex-archive/fonts/minionpro/
e poi trovi due progetti più recenti a ampi a questi indirizzi:
https://github.com/sebschub/FontPro
http://developer.berlios.de/projects/minionpro/
se vuoi sfruttare appieno tutte le possibilità offerte da questo ricco font.
Questo de vuoi usarlo con pdflatex. Se invece ti “accontenti”
di usarlo con xelatex,allora la cosa si fa assai semplice…m
-
AutoreRisposte