Ciao a tutti!
Ciao anche a te! Sai che frequento Sestri da quando ho due anni? Ci abita pure mio fratello (a S. Bartolomeo, per la precisione). Benvenuto!
E’ il mio primo post (che emozione!), ed in quanto tale desideravo sinceramente ringraziare tutti gli utenti e i contributori di questo forum perchè nei vari anni di utilizzo di LaTeX mi siete stati veramente utilissimi per risolvere i miei problemi!
Detto questo, ho aperto un nuovo thread perchè non sono riuscito a trovare una soluzione in rete. Il mio problema è il seguente:
Sto scrivendo la tesi, e per avere una buona impaginazione (soprattutto in linea con quella del mio istituto di ricerca) ho usato il seguente template (tolgo i commenti per evitare di occupare troppo spazio):
`
\documentclass[twoside,11pt]{Latex/Classes/PhDthesisPSnPDF}\hbadness=10000
\hfuzz=50pt\begin{document}
\renewcommand\baselinestretch{1.2}
\baselineskip=18pt plus1pt\include{PagTitle}
\setcounter{secnumdepth}{3} % organisational level that receives a numbers
\setcounter{tocdepth}{3} % print table of contents for level 3
\tableofcontents % print the table of contents
\mainmatter
\renewcommand{\chaptername}{} % uncomment to print only “1” not “Chapter 1”%\include{1/Introduzione}
%\include{2/StatoArte}
%\include{2/Motivazioni}
%\include{3/force_emg}
\include{4/Piattaforma}
%\include{5/experiments}
%\include{6/conclusions}\begin{small} % tiny(5) < scriptsize(7) < footnotesize(8) < small (9) \bibliographystyle{Latex/Classes/jmb} %Title is link if provided \renewcommand{\bibname}{Bibliografia} \bibliography{bibliografia,myBiblio} % adjust this to fit your BibTex file \end{small} \end{document}`
Mi pare di avere già visto un problema del genere in passato. Solo che non ricordo quale fosse la causa. 🙁
Puoi mandare anche il codice di quel capitolo? Basta quanto serve per le prime due pagine.
Già che ci sono faccio qualche commento alla classe che usi. Che l’impaginazione sia buona è assai discutibile: la gabbia è troppo spostata verso il basso.
Inoltre la classe è piena di errori, alcuni davvero bruttini. In rosso quello che c’è da cancellare, in blu sostituzioni da apportare. Come minimo! 🙂 Sulla parte riguardante i sommari non mi pronuncio.
`\ProvidesClass{Latex/Classes/PhDthesisPSnPDF}[2007/09/06 v2 PhD thesis class]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions\relax
\ifx\pdfoutput\undefined
\LoadClass[dvips, a4paper]{book}
\else
\LoadClass[pdftex, a4paper]{book}
\fi
\LoadClass[a4paper]{book}
\usepackage{amssymb}
\usepackage{graphics} % graphics….sostituito con graphicx per usare i files EPS.
\usepackage{graphicx}
%\usepackage{wrapfig} % to include figure with text wrapping around it
\usepackage[margin=10pt,font=small,labelfont=bf]{caption} % for improved layout of figure captions with extra margin, smaller font than text
\usepackage{fancyhdr} % for better header layout
\usepackage{eucal}
\usepackage[italian]{babel} % va nel documento principale
\usepackage[usenames, dvipsnames]{color}
\usepackage[perpage]{footmisc}
\usepackage[square, sort, numbers, authoryear]{natbib}
\usepackage{ifthen}
\usepackage{subfigure} % OBSOLETO
\usepackage{subfig}
\usepackage{multicol} % for pages with multiple text columns, e.g. References
\setlength{\columnsep}{20pt} % space between columns; default 10pt quite narrow
\usepackage[nottoc]{tocbibind} % correct page numbers for bib in TOC, nottoc suppresses an entry for TOC itself
%\usepackage{nextpage}
\usepackage[intoc]{nomencl} % load nomencl extension; include in TOC
%\nomrefpage % to include page numbers after abbrevations
\renewcommand{\nomname}{Glossary} % rename nomenclature
\renewcommand{\nomlabel}[1]{\textbf{#1}} % make abbreviations bold
\makenomenclature % used to be \makeglossary
\newcommand{\g}{\footnote{For all abbreviations see the glossary on page \pageref{nom}.}} % type “\g” to refer to glossary
%:————————– PDF/PS setup ———————–
\usepackage{ifpdf}
\ifpdf
\usepackage[ pdftex, plainpages = false, pdfpagelabels,
pdfpagemode = UseOutlines,
bookmarks,
bookmarksopen = true,
bookmarksnumbered = true,
breaklinks = true,
linktocpage,
pagebackref,
colorlinks = true, % was true
linkcolor = blue,
urlcolor = blue,
citecolor = red,
anchorcolor = green,
hyperindex = true,
hyperfigures
]{hyperref}
\hypersetup{citecolor=[rgb]{0,0.5,0.5}}
\hypersetup{linkcolor=[rgb]{0,0.5,0.5}}
\DeclareGraphicsExtensions{.png, .jpg, .jpeg, .pdf, .gif, .eps} %GIF doesn't work??
\usepackage[pdftex]{graphicx}
\pdfcompresslevel=9
\graphicspath{{frontmatter/figures/PNG/}{frontmatter/figures/PDF/}{frontmatter/figures/}}
\else
\usepackage[ dvips,
bookmarks,
bookmarksopen = true,
bookmarksnumbered = true,
breaklinks = true,
linktocpage,
pagebackref,
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = red,
anchorcolor = green,
hyperindex = true,
hyperfigures
]{hyperref}
\DeclareGraphicsExtensions{.eps, .ps}
\usepackage{epsfig}
\usepackage{graphicx}
\graphicspath{{frontmatter/figures/EPS/}{frontmatter/figures/}}
\fi
%:————————– page layout ———————–
%A4 settings
\ifpdf
\pdfpageheight=297mm
\pdfpagewidth=210mm
\else
\setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm}
\fi
\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}
%: Uncomment this secion for two-sided printing
% ——————————
\setlength{\oddsidemargin}{1.5cm}
\setlength{\evensidemargin}{0cm}
\setlength{\topmargin}{1mm}
\setlength{\headheight}{1.36cm}
\setlength{\headsep}{1.00cm}
\setlength{\textheight}{20.84cm}
\setlength{\textwidth}{14.5cm}
\setlength{\marginparsep}{1mm}
\setlength{\marginparwidth}{3cm}
\setlength{\footskip}{2.36cm}
\usepackage{geometry}
\geometry{outer=2.5cm,textwidth=14.5cm,
textheight=20.84cm,heightrounded,footskip=2.36cm}
%: section below defines fancy page layout options
% ——————————
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. #1 }}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[RO]{\bfseries\rightmark}
\fancyhead[LE]{\bfseries\leftmark}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}
\newenvironment{dedication}
{\begin{alwayssingle}
\pagestyle{empty}
\begin{center}
\vspace*{1.5cm}
{\LARGE }
\end{center}
\vspace{0.5cm}
\begin{quote} \begin{center}}
{\end{center} \end{quote} \end{alwayssingle}}
% ACKNOWLEDGEMENTS
%
% The acknowledgements environment puts a large, bold, centered
% “Acknowledgements” label at the top of the page. The acknowledgements
% themselves appear in a quote environment, i.e. tabbed in at both sides, and
% on its own page.
\newenvironment{acknowledgements}
{\pagestyle{empty}
\begin{alwayssingle}
\begin{center}
\vspace*{1.5cm}
{\Large \bfseries Acknowledgments}
\end{center}
\vspace{0.5cm}
\begin{quote}}
{\end{quote}\end{alwayssingle}}
% The acknowledgementslong environment puts a large, bold, centered
% “Acknowledgements” label at the top of the page. The acknowledgement itself
% does not appears in a quote environment so you can get more in.
\newenvironment{acknowledgementslong}
{\pagestyle{empty}
\begin{alwayssingle}
\begin{center}
\vspace*{1.5cm}
{\Large \bfseries Acknowledgements}
\end{center}
\vspace{0.5cm}\begin{quote}}
{\end{quote}\end{alwayssingle}}
%ABSTRACT
%
%The abstract environment puts a large, bold, centered “Abstract” label at
%the top of the page. The abstract itself appears in a quote environment,
%i.e. tabbed in at both sides, and on its own page.
\newenvironment{abstracts} {\begin{alwayssingle} \pagestyle{empty}
\begin{center}
\vspace*{1.5cm}
{\Large \bfseries Abstract}
\end{center}
\vspace{0.5cm}
\begin{quote}}
{\end{quote}\end{alwayssingle}}
%The abstractlong environment puts a large, bold, centered “Abstract” label at
%the top of the page. The abstract itself does not appears in a quote
%environment so you can get more in.
\newenvironment{abstractslong} {\begin{alwayssingle} \pagestyle{empty}
\begin{center}
\vspace*{1.5cm}
{\Large \bfseries Abstract}
\end{center}
\vspace{0.5cm} \begin{quote}}
{\end{quote}\end{alwayssingle}}
%The abstractseparate environment is for running of a page with the abstract
%on including title and author etc as required to be handed in separately
\newenvironment{abstractseparate} {\begin{alwayssingle} \pagestyle{empty}
\vspace*{-1in}
\begin{center}
{ \Large {\bfseries {\@title}} \par}
{{\large \vspace*{1ex} \@author} \par}
{\large \vspace*{1ex}
{{\@collegeordept} \par}
{{\@university} \par}
\vspace*{1ex}
{{\it \submittedtext} \par}
{\it {\@degree} \par}
\vspace*{2ex}
{\@degreedate}}
\end{center}}
{\end{alwayssingle}}
%Statement of originality if required
\newenvironment{declaration} {\begin{alwayssingle} \pagestyle{empty}
\begin{center}
\vspace*{1.5cm}
{\Large \bfseries Declaration}
\end{center}
\vspace{0.5cm}
\begin{quote}}
{\end{quote}\end{alwayssingle}}
%:————————– page numbers: roman+arabic ———————–
% ROMANPAGES
%
% The romanpages environment set the page numbering to lowercase roman one
% for the contents and figures lists. It also resets
% page-numbering for the remainder of the dissertation (arabic, starting at 1).
\newenvironment{romanpages}
{
\setcounter{page}{1}
\renewcommand{\thepage}{\roman{page}}
} % close romanpage env't
{\newpage\renewcommand{\thepage}{\arabic{page}}\setcounter{page}{1}}
`
Per avere numeri romani nelle pagine introduttive è sufficiente usare il comando \frontmatter:
`\documentclass{…}
…
\begin{document}
\frontmatter
\mainmatter
\end{document}`
Non serve un ambiente scritto a mano (romanpages) anche male.
Togli subito dal tuo documento \hbadness=10000 e \hfuzz=50pt e \baselineskip=18pt plus 1pt. Marsch! 🙂
Se proprio vuoi aumentare l’interlinea, usa \linespread prima di \begin{document} e non la ridefinizione di \baselinestretch:
`\linespread{1.2}`
In realtà non andrei oltre 1.1 che può anche essere accettabile viste le righe mooooolto lunghe.
Aggiungi anche
`\setlength{\headheight}{13.6pt}`
al tuo preambolo, visto che vuoi scrivere a corpo 11.
Ciao
Enrico