5

I tried to change the font size of titles using titlesec, I want all my document in normalsize, and I have an error. Please help me.

The error description is:

Runaway argument?
./Thesis.tex:13: Paragraph ended before \ttl@format@ii was complete.
<to be read again>

This is my code:

\documentclass[10pt, a4paper]{article}

\usepackage{fontspec}
\setmainfont{Arial}
\usepackage{lipsum}
\usepackage[ampersand]{easylist}

\usepackage{titlesec}
\titleformat{\section}{\normalsize}
\titleformat{\subsection}{\normalsize}
\titleformat{\subsubsection}{\normalsize}

\usepackage{tikz}

\setlength{\hoffset}{.46cm}
\setlength{\oddsidemargin}{13.08pt}
\setlength{\evensidemargin}{0cm}
\setlength{\marginparwidth}{0cm}
\setlength{\topmargin}{-7mm}
\setlength{\marginparsep}{0cm}
\setlength{\headheight}{8mm}
\setlength{\headsep}{4.6mm}
\setlength{\textheight}{24cm}
\setlength{\footskip}{8mm}
\setlength{\textwidth}{15.5cm}

\usepackage{fancyhdr}
\pagestyle{fancy}
 \lhead{\footnotesize{Text}\\ \footnotesize{Text}}%
 \chead{}%Vac
 \rhead{\footnotesize{Text}}
 \lfoot{\footnotesize{Text}\\       \footnotesize{Text}}%
 \cfoot{}
 \rfoot{\footnotesize{Text}}

 \renewcommand{\headrulewidth}{0.4pt}%
 \renewcommand{\footrulewidth}{0.4pt}

\usepackage[pass]{geometry}

\begin{document}

\begin{titlepage}

\begin{center}

\begin{huge} \textbf{TEXT}\end{huge}\\
\vspace*{.4cm}
\begin{Large} \textbf{TEXT}\end{Large}\\
\vspace*{.4cm}
\begin{LARGE} \textbf{TEXT}\end{LARGE}\\
\vspace*{1.5cm}


\begin{tikzpicture}[scale=2.5]

\definecolor{rucv}{rgb}{.88,0.077,.1}
\definecolor{bucv}{rgb}{.001,.086,.55}

\draw(2.6,.58)node[color=bucv][font=\fontsize{20}{20}\sffamily\bfseries]{TEXT};

\draw(2.6,.3)node[color=bucv][font=\fontsize{20}{20}\sffamily\bfseries]{T\Large{EXT} \huge{T}\Large{EXT}};

\end{tikzpicture}

\vspace*{1cm}

\begin{LARGE} \textbf{"TEXT}\end{LARGE}\\
\vspace*{.5cm}
\begin{LARGE} \textbf{
TEXT"}\end{LARGE}\\
\vspace*{1cm}
\begin{large} TEXT:\end{large}\\
\vspace*{.6cm}
\begin{LARGE} \textbf{TEXT}\end{LARGE}\\
\vspace*{.8cm}
\begin{large}Elaborado por:\end{large}\\
\vspace*{.4cm}
\begin{Large} \textbf{Text}\end{Large}\\
\vspace*{.8cm}
\begin{large}Text:\end{large}\\
\vspace*{.4cm}
\vspace*{2cm}
\begin{Large} \textbf{TEXT}\end{Large}\\
\vspace*{.4cm}
\begin{Large} \textbf{2013}\end{Large}\\
\vspace*{.4cm}

\end{center}
\end{titlepage}


\tableofcontents
\newpage
\section{TITLE}
\section{TITLE}
\subsection{Subtitle}
\subsection{Subtitle}
\section{TITLE}
\lipsum
\subsection{Subtitle}
\subsection{Subtitle}
\subsubsection{Title}
\begin{easylist}
& Title
& Title
&& Subtitle
&&& Title
& Title
\end{easylist}

\subsubsection{Title}
\subsection{Subtitle}
\section{TITLE}
\subsection{Subtitle}
\subsubsection{Title}

\end{document}
3
  • 1
    If you load titlesec with the [tiny] option you will get all headings in the text size (except \chapter). Also, you might want to look into using the geometry package for your margins.
    – Alan Munn
    Jun 26, 2013 at 21:26
  • 1
    Use \titleformat*, not \titleformat. (See the manual.) Jun 26, 2013 at 21:29
  • I got it, with tiny and *, thanks you so much.
    – Isai
    Jun 26, 2013 at 21:35

1 Answer 1

6

There are two ways to achieve what you are doing (combining my and Torbjørn's comments.)

As a package option

The titlesec package has an option [tiny] which sets all headings (except \chapter) in the text font.

\usepackage[tiny]{titlesec}

In this case you don't need any \titleformat* commands to change the size.

Use \titleformat*

There are two versions of the \titleformat command. The short form version (which is what you want here) is in fact \titleformat*; the long form version is \titleformat, which is why you got the error you did, since the command without the * is looking for up to 7 arguments.

\titleformat*{\section}{\normalsize}
\titleformat*{\subsection}{\normalsize}
\titleformat*{\subsubsection}{\normalsize}
1
  • 2
    Or with \usepackage{sectsty} and \allsectionsfont{\normalsize}
    – egreg
    Jun 26, 2013 at 22:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .