Risposte nei forum create
-
AutoreRisposte
-
::
Dopo aver visto alcune discussioni in rete, ho concluso che è più opportuno
inserire l’appendice nel \mainmatter. Un’ultima richiesta. Nell’indice del testo
che sto compilando il titolo dell’appendice finisce all’ultima riga. Non è bello
vedere il titolo da solo e i titoli delle sezioni nella pagina successiva.
Ma LaTeX non effettua un ottimo controllo di orfane e vedove?
A parte inserire in generale un \newpage, come si possono obbligare due righe successive
a restare unite nell’indice?
::
In questo caso però si produce un difetto nella numerazione delle sezioni
`\documentclass[a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{lipsum}\begin{document}
\tableofcontents\frontmatter
\chapter{Introduzione}\mainmatter
\chapter{Capitolo}
\section{Sezione 1}\chapter{Capitolo}
\section{Sezione 1}\appendix
\renewcommand{\thechapter}{}
\chapter{Titolo dell'appendice}
\section{Sezione 1}
\section{Sezione 2}
\backmatter
\end{document}`
::
Allora… si tratta di una tesi (non la mia che risale all’alba dei tempi)
in cui l’ultimo capitolo è appunto una appendice e (èare) deve capirsi
premettendo al titolo la riga con “Appendice”. Altrimenti (dicono)
si potrebbe pensare a un ultimo capitolo integrato nel testo.
Avevo già messo \backmatter dopo, ma così facendo risulta
“Appendice A” che non ha senso, perché è l’unica e non esiste
una Appendice B. A meno di non togliere la lettera A,
ma spulciando soluzione in rete non ne ho trovate di funzionanti
(almeno per me)m
22 Marzo 2017 alle 10:57 in risposta a: [RISOLTO] differenziare il font usato per i Titoli e corpo #110049::
Puoi usare titlesec
`\documentclass[a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{ebgaramond}
\usepackage[scaled=.90]{helvet}
\usepackage{lipsum}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\sffamily\huge\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
{\normalfont\sffamily\Large\bfseries}
{\thesection}{1em}{}\begin{document}
\chapter{Titolo capitolo}
\lipsum[1]
\section{Titolo sezione}
\lipsum[2]
\end{document}`m
::
Perché fare tutto a mano con risultati pessimi quando c’è ad esempio titlesec?
`\documentclass[a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{titlesec}\titleformat{\chapter}%
[hang]
{\huge \bfseries}
{\thechapter}
{1em}
{}\titleformat{\section}%
[hang]
{\Large\bfseries}
{\thesection}
{1em}
{}\begin{document}
\tableofcontents
\chapter{Titolo capitolo}
\section{Titolo sezione}
\end{document}`m
::
Grazie lo stesso!
Ho postato qui il quesito
http://tex.stackexchange.com/questions/356921/matching-punctuation-size-to-small-caps-with-recent-fontspecm
ADDENDUM
E al link ora è leggibile anche la soluzione,
codice per me inarrivabile dovuto all’infallibile egreg
che ringrazio anche quim
::
Sì, ho visto anche questa discussione:
http://tex.stackexchange.com/questions/290937/new-version-of-fontspec-gives-wordspace-error
ma lì la ridefinizione del font è semplice. In questo caso non ho idea del codice che serve
per ridefinire il font aggiungendo però il codice specifico per rendere carattere attivo l’apostrofo…m
::
La guida recita così:14.3
Interword space
While the space between words can be varied on an individual basis with the TEX prim-
itive \spaceskip command, it is more convenient to specify this information when
the font is first defined.
The space in between words in a paragraph will be chosen automatically, and gener-
ally will not need to be adjusted. For those times when the precise details are important,
the WordSpace feature is provided, which takes either a single scaling factor to scale
the default value, or a triplet of comma-separated values to scale the nominal value,
the stretch, and the shrink of the interword space by, respectively. (WordSpace={x} is
the same as WordSpace={x,x,x}.)
Note that TEX’s optimisations in how it loads fonts means that you cannot use this
feature in \addfontfeatures.L’uso sempra generale, infatti l’unico esempio della guida è:
`\fontspec{texgyretermes-regular.otf}%
[WordSpace = 0.3]`
Ma nel codice che ho riportato è usato proprio in \addfontfeatures, come evidentemente
non è (più) possibile fare. Nel medesimo codice, se capisco bene, tale caratteristica
è attribuita al solo maiuscoletto. E non ho idea se si possa mantenere in modo
così selettivo, ma aggiornando il codice alla caratteristiche attuali di fontspecm
::
Che idiota… non me n’ero proprio accorto.
Ma le pene non sono finite:
`! fontspec error: “not-in-addfontfeatures”
!
! The “WordSpace” font feature cannot be used in \addfontfeatures.
!
! See the fontspec documentation for further information.
!
! For immediate help type H.
!………………………………………..l.44 \textsc{quel ramo dell'ago di como}
? `
Da quello che ho capito si tratta di una caratteristica che non può usarsi
in questo modo, almeno secondo il manuale più recente di fontspecm
::
Qualcosa cmq l’ho costruita male:
`\documentclass[a4paper,12pt]{article}\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}\makeatletter
\let\horn@scshape\scshape
\def\scshape{\addfontfeature{Letters=UppercaseSmallCaps,Letters=SmallCaps,LetterSpace=2,WordSpace=1.2}%
\let\horn@apos\horn@@apos}\def\horn@apos{'}
\def\horn@@apos{\raisebox{-0.4ex}{\kern0.06em'}}% make ' (apostophe) active for the argument to chapter so we can lower it for small caps
\let\horn@chapter\chapter
\def\chapter{
\begingroup
\catcode`\'=\active\begingroup\lccode`\~=`\'\lowercase{\endgroup\def~{\protect\horn@apos}}
\horn@@chapter
}\def\horn@@chapter#1{%
\horn@chapter{#1}
\endgroup
}
\makeatother\begin{document}
QUEL RAMO DELL'AGO DI COMO
\textsc{quel ramo dell'ago di como}
\end{document}`
-
AutoreRisposte