- Questo topic ha 3 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 17 anni, 2 mesi fa da .
-
Topic
-
Ho ridefinito tableofcontents e section, e creato ‘intermedia’:
`\documentclass[a4paper,twoside,10pt]{article}
%% Inizio definizione lingua
\usepackage[italian]{babel}
\usepackage{ucs}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
%% Fine definizione lingua
\usepackage{helvet}
\renewcommand{\rmdefault}{\sfdefault}
\renewcommand\familydefault{\sfdefault}
% Formato dei titoli di sezione (bold, sans-serif)
\usepackage[bf,sf]{titlesec}\usepackage{xtab}
\usepackage{lastpage}
\usepackage[unicode, colorlinks=true, linkcolor=black, pdfstartview=FitH]{hyperref}
%% Estensione dei file grafici
\DeclareGraphicsExtensions{.pdf, .gif, .jpg, .jpeg, .png}
\usepackage[a4paper, left=1.5cm, right=1.5cm, bottom=2cm, top=2cm ,bindingoffset=0cm]{geometry}\makeatletter
\renewcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
}
\renewcommand\section{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{fancy}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil\vspace{30mm}
\secdef\@Intermedia\@spart}\def\@Intermedia[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{section}%
\addcontentsline{toc}{section}{\thesection\hspace{1em}#1}%
\else
\addcontentsline{toc}{section}{#1}%
\fi
\markboth{}{}%
{\raggedleft
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\Huge \bfseries \nobreakspace\thesection
\par
\vskip 20\p@
\fi
\LARGE \bfseries #2\par}%
\@endpart}
\def\@spart#1{%
{\centering
\interlinepenalty \@M
\normalfont
\Huge \bfseries #1\par}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@tempswa
\twocolumn
\fi}
\makeatother\begin{document}
\section{Generalità}`
Il documento intero viene regolarmente compilato solo se dopo ‘\begin{document}’ c’è almeno una lettera unicode prima della prima ‘section’. Ad esempio, se la prima sezione è ‘Generalità’, ottengo il seguente errore:`./SSCM_-_U0250—0307B_IT_C66.tex:264: Token not allowed in a PDF string (Unicode),(hyperref) removing `\begingroup' on input line 264. Token not allowed in a PDF string (Unicode),(hyperref) removing `\begingroup'
./SSCM_-_U0250—0307B_IT_C66.tex:264: Token not allowed in a PDF string (Unicode),(hyperref) removing `\-command' on input line 264. Token not allowed in a PDF string (Unicode),(hyperref) removing `\-command'
./SSCM_-_U0250—0307B_IT_C66.tex:264: Token not allowed in a PDF string (Unicode),(hyperref) removing `\utf@viii@undeferr' on input line 264. Token not allowed in a PDF string (Unicode),(hyperref) removing `\utf@viii@undeferr'
./SSCM_-_U0250—0307B_IT_C66.tex:264: Token not allowed in a PDF string (Unicode),(hyperref) removing `\endgroup' on input line 264. Token not allowed in a PDF string (Unicode),(hyperref) removing `\endgroup'`Si accettano commenti anche malevoli… ma sarebbero più graditi i suggerimenti per capire dove sta l’inghippo…
- Devi essere connesso per rispondere a questo topic.