Tessera” post=92621Scrivendo `\titleformat{\chapter}{\filright\normalfont\huge\bfseries}{\number}{5pt}{}` la risposta è `Missing number, treated as zero \chapter{Introduction}`
Scrivendo `\titleformat{\chapter}{\filright\normalfont\huge\bfseries}{ababa}{5pt}{}` Latex compila e prima di ogni titolo di capitolo c’è scritto ababa…Non so se è una sciocchezza o possa servire per capire come fargli prendere il numero al posto delle parole….
Il numero corrente del capitolo può essere visualizzato con [tt]\thechapter[/tt] (è un contatore). Quindi, se ho ben capito: `
\documentclass[a4paper,12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{setspace} %per l'interlinia – interlinea
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{geometry} %nel caso debba riadattare i margini
\usepackage{titlesec} %formato titoli capitoli
\titleformat{\chapter}
{\filright\normalfont\huge\bfseries}
{\thechapter}
{10pt}
{}
\usepackage{fancyhdr} %aggiungere l'abstract alla modalità book
\newcommand{\fncyblank}{\fancyhf{}}
\newenvironment{abstract}
{\cleardoublepage\fncyblank\null \vfill\begin{center}
\bfseries \abstractname \end{center}}
{\vfill\null}
\usepackage{tocloft} %aggiungere punti collegamento a tableofcontent
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\begin{document}
\pagestyle{headings}
\doublespacing
\begin{titlepage}
…
\end{titlepage}
\newpage
\thispagestyle{empty}
\begin{abstract}
… …
\end{abstract}
\newpage
\setcounter{page}{1}
\tableofcontents
\chapter{Introduction}
\label{0}
… … …
\chapter{Conclusion}
\label{1}
… … … …
\end{document}
` dovrebbe produrre il risultato che vuoi. 5pt di spazio mi sembravano un po’ pochi, per quello ho raddoppiato. Ma fai tu.
Ciao
Claudio