1

I'm using fancyhdr for the header.

I want to decrease the indentation of the text in it (header - italic text):

Now is like in the image

enter image description here

but I would like to have the same indentation in both (header and main matter- \titleformat= 0.15 cm). Any suggestion?

this is my code:

\documentclass[12pt,a4paper,twoside]{article}
\usepackage[vmargin={25mm,25mm},hmargin={25mm,25mm},includefoot,headheight=15pt]{geometry}

\linespread{1.3}
\usepackage[utf8x]{inputenc}
\usepackage[main=english,portuguese]{babel}
\setlength{\parindent}{0.65cm} % indentation
\usepackage{indent first}

\usepackage{titlesec}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{}
\fancyhead[LE,RO]{\thepage}

%sections format

\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\thesection\arabic{subsection}}

\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{0.15cm}{}
\titleformat{\subsection}
{\normalfont\large\bfseries}{\hspace{0.65cm}\thesubsection.}{0.15cm}{}
\titleformat{\subsubsection}
{\normalfont\bfseries}{\hspace{1.65cm}\thesubsubsection.}{0.15cm}{}

%mainmatter
\begin{document}
\section{Introduction}
\end{document}

Thanks in advance

  • 2
    Welcome to TeX.SX! You are much more likely to get a fast and useful answer if you can show us the code you use to produce the image and not only the output. Please provide a MWE, so we can investigate your problem in more detail and don't have to resort to guessing. Can you also be more precise about what "indentation" you are talking about? – moewe Oct 7 '15 at 10:26
  • @moewe I hope that now is easier to help me! Thanks for you advice – Nuno Bustorff Oct 8 '15 at 10:22
  • 1
    Unfortunately, that is not an MWE. A MWE is code one can copy and immediately run on one's PC. Please see I've just been asked to write a minimal example, what is that? on how to create a proper MWE. I am also still not sure what "indentation" you are on about. Can you make that more precise as well, please? – moewe Oct 8 '15 at 10:26
  • Now I think that the indentation is precise and the MWE is correct @moewe. Thanks again – Nuno Bustorff Oct 8 '15 at 10:36
  • Aha! I'm beginning to understand what it is you want changed... – moewe Oct 8 '15 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.