I am having a hard time formatting fancyhdr's header and footer. I have tried \small or \fontsize{6}{6}... I can't change it.  Here is my code :  \documentclass[12pt,twoside,draft]{book} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{titlesec}   % ************************** % Taille de la page et marges % **************************  \usepackage[paperheight=240mm,paperwidth=160mm, left=22mm, right = 20mm, top = 20mm, bottom = 22mm]{geometry}   % ************************** % En-têtes et pieds de page % **************************  \renewcommand{\headrulewidth}{0.3pt} \renewcommand{\footrulewidth}{0pt}  \renewcommand{\sectionmark}[1]{\markright{#1}}  \let\Subsubsectionmark\subsubsectionmark \def\subsubsectionmark#1{\def\Subsubsectionname{#1}\Subsubsectionmark{#1}}  \fancyhead[LO]{ \textsc{\Subsubsectionname}} \fancyhead[RO]{} \fancyhead[C]{} \fancyhead[LE]{} \fancyhead[RE]{\rightmark}  \fancyfoot[LO]{} \fancyfoot[LE]{\fontsize{6}{6} \thepage} \fancyfoot[C]{} \fancyfoot[RO]{\small \thepage} \fancyfoot[RE]{}    % ************************** % Alignement du headerfooter % **************************  \newlength\FHoffset \setlength\FHoffset{0mm} \addtolength\headwidth{2\FHoffset} \fancyheadoffset{\FHoffset} \newlength\FHleft \newlength\FHright \setlength\FHright{19mm}  \newbox\FHline \setbox\FHline=\hbox{\hsize=\paperwidth% \hspace*{\FHleft}% \rule{\dimexpr\headwidth-\FHleft-\FHright\relax}{\headrulewidth}\hspace*{\FHright}% } \renewcommand\headrule{\vskip-.7\baselineskip\copy\FHline}   % Font formatting packages  \usepackage{gensymb} \usepackage{anyfontsize}   \begin{document}   \end{document}     Does anyone have an idea how to do this? Thanks in advance !
122714
Basically, I want the header fonts to use a different (smaller) font size than the size I set using \documentclass. What should be the option I'd be using ?  \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[margin=1in, headsep=10pt]{geometry} \usepackage{fancyhdr} \pagestyle{fancy}  \fancyhead[L]{Personal Statement} % What other option should I use to get a custom font size ?
33387
I have a problem with the fancy package: I use the report documentclass and I have a chapter, a lot of text and then a new page starting with a section (or the next page has no chapter starting on that particular page).  The problem be, that what I defined for my header and footer is NOT on the chapter-page but only on the non-chapter page. How come? What did I miss?  Minimal example:  \documentclass[]{report}  \usepackage{lastpage} \usepackage{fancyhdr} % for use of \pageref{LastPage}  \fancypagestyle{IHA-fancy-style}{% \fancyhf{} %Clear header and footer \fancyhead[LE,RO]{\slshape \rightmark} \fancyhead[LO,RE]{\slshape \leftmark} \fancyfoot[C]{\thepage of \pageref{LastPage}} %Custom footer \renewcommand{\headrulewidth}{0.4pt} %Line at the header visible \renewcommand{\footrulewidth}{0.4pt}} %Line at the footer visible  \title{A short example}  \begin{document}  \maketitle \tableofcontents  \pagestyle{IHA-fancy-style} \chapter{A chapter} Look at the footer  \newpage \section{A section} Look at the footer  \end{document}   Take notice: No line on page 2 at the bottom - a line on page 3 at the bottom.  Any clues?
44462
See the code given below. Actually, I am looking for a tree of number 36.  Can somebody let me know what I did wrong?  \documentclass[12pt, a4paper]{article} \usepackage[a4paper,top=1 in,bottom=1 in,left=0.7 in,right=0.7 in]{geometry} \usepackage[utf8]{inputenc} \usepackage[misc]{ifsym} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{tikz} \usepackage{pst-tree} \psset{levelsep=1,treesep=1,nodesep=2pt} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{lastpage} \lhead{} \rhead{} \chead{} \rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}} \lfoot{} \cfoot{} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \begin{document} \preview \psTree{\TR{36}} \Tcircle{2} \psTree{\TR{18}} \Tcircle{2} \psTree{\TR{9}} \Tcircle{3} \Tcircle{3} \endpsTree \endpsTree \endpsTree \endpreview \end{document}
31551
How can I make the headings (with fancyhdr) extend to the full width of the text column?  The width of the text is larger than normal because it has been expanded using the geometry package. For this reason the right-aligned headings do not touch the right margin.  Here is a MWE:  \documentclass{article} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy}  \usepackage[margin=1in]{geometry}  \begin{document}  \lhead{Left} \chead{Center} \rhead{Right}  \lipsum \lipsum \end{document}
76700
I'm using the package fancyhdr to format my footers and headers, with my name in the header and a n of m pages format for the footer. Like so:  \pagestyle{fancy} \fancyhf{} % clear all header and footer fields \fancyhead[C]{Name} \fancyfoot[C]{\footnotesize Page \thepage\ of \pageref{LastPage}}   By default, the fancy page style only affects the pages after the first page. I know I can set the first page to the fancy page style using \thispagestyle, but I only want the first page to use the footer, not the header. Is there a way to create a custom style that just the first page will use?
33718
I am trying to write a recommendation letter with a fancy heading at the top of the first page, using fancyhdr. I copy my code below.  The results are that the first page looks good but subsequent pages do not. Subsequent pages omit the logo (as desired) but leave enough space for it, and the text starts from the same place on every page. Starting from the second page, I would like the text to start higher.  It seems that the only code which could cause the text to appear lower is within the \fancypagestyle{firstpage}{...}, and I use \thispagestyle{firstpage} with the intent that this should only affect the first page -- but this is not what happens when I compile and view my document.  I read related posts  and , and attempted to modify my code based on what I read there, but without achieving the results I was looking for.  Thank you very much.  LaTeX code (which compiles):   \documentclass[11pt]{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsmath} \usepackage{color,hyperref} \usepackage{graphics} \usepackage{times} \usepackage{fancyhdr} \usepackage{datetime}   \definecolor{darkblue}{RGB}{0,0,50} \hypersetup{colorlinks,breaklinks,             linkcolor=darkblue,urlcolor=darkblue,             anchorcolor=darkblue,citecolor=darkblue}   %%%%%%%%%%%%%%%%%%date in format Sunday, October 25, 2011$$$ \usdate \def\theday {\dayofweekname{\day}{\month}{\year}} \def\mydate {\theday , \today}  %%%%%%%%%%return address%%%%%%%%%% \def\myname     {Frank Thorne} \def\mydeptname     {Department of Mathematics} \def\myaffiliation  {University of South Carolina} \def\mystreet       {1523 Greene Street} \def\mycitystatezip {Columbia,\ SC\ \ 29208} \def\myphone        {{\it Phone:} (803)404-4057 (home)} \def\office     {(803)777-4224} \def\fax        {{\it Fax:}(803)777-3783} \def\email      {thorne@math.sc.edu} \def\url        {http://www.math.sc.edu/$\sim$thornef} % NOTE: use $\sim$ for tilde %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%margins%%%%%%%%%%%%%%%%%% \oddsidemargin   0in \evensidemargin  0in \topmargin  -0.75in \textwidth   6.5in \textheight  6.25in \headwidth  \textwidth \parindent      0ex %controls how the indentation of new paragraphs behaves \parskip        6pt %controls the space between paragraphs \headheight     1.25in \headsep    1in %This controls how far below the letterhead the text of the letter will begin    \addtolength{\textheight}{.5in} %%%%%%%%%%%%%%%%letterhead%%%%%%%%%%%%%%%% \fancyfoot{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}  %\thispagestyle{fancy} \fancypagestyle{firstpage}{ \fancyhf{} %%%usc logo \fancyhead[L]{\resizebox{2.5in}{!}{ %\includegraphics{USC_Linear.jpg} } \vspace{0.6in}}  %%%%%%%%%%return address on right%%%%%%% \fancyhead[R]{ \parbox[t]{3.1in}{ \footnotesize   \em \vspace{0.5in}                 \myname \\                 \mydeptname   \\                 \myaffiliation \\                 \mystreet \\                 \mycitystatezip \\                 \email \\ \\                  \mydate                 }\hspace{-1.3in} \vspace{0.2in}} }  \begin{document}  \thispagestyle{firstpage}  Blah blah blah.   Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.  Blah blah blah.    \hspace{.5\textwidth}\parbox[t]{2.95in}{             Sincerely,\\              Frank Thorne\\             Assistant Professor of Mathematics            }  \vfill      \end{document}
116425
I’m adding explanations for definitions in the margin paragraph. I have a macro which looks as follows (simplified):  \newcommand*\define[2]{%   \marginpar{{\sffamily\footnotesize\textbf{#1}: #2}}}   This works fine, but unfortunately it uses the baseline skip from the main text, which is of course much too large for the footnote-sized font.  So I tried changing the inter-line spacing, but to no avail. These are the two alternatives that I have tried:   Using \fontsize instead of \footnotesize:  \marginpar{{\sffamily\fontsize{8}{8}\selectfont\textbf{#1}: #2}}  Setting \baselineskip:  \marginpar{{%   \sffamily\footnotesize%   \setlength\baselineskip{1ex}%   \textbf{#1}: #2}}    Neither variant works (and I’ve tried other values: the inter-line spacing won’t budge). So here’s my question:  How do I re-assign the baseline skip for margin paragraphs?
121933
%---------------------------------------------------------------------------------------------------------- % \documentclass[11pt,a4paper,reqno,fleqn,xcolor=x11names]{book} % %---------------------------------------------------------------------------------------------------------- % % \usepackage{amsthm,amsmath,amsfonts} % \usepackage{titlesec} % \usepackage[dotinlabels]{titletoc} % more advanced but essential here \usepackage[english]{babel} %   \titleformat{\section}[frame] % {\bfseries\itshape\fontsize{12.8}{14}\selectfont}         {}{8pt} {\;\;\thesection\hskip 0.7em}  \begin{document}  \chapter{This is Chapter No 1}  \section{A titlesec section in a frame - too tall and not shaded}  \end{document}
75938
How to suppress the fancy header and footer on the first page? On other pages, they should be visible.
98615
I've done ab bit of web-searching and found nothing. Are there any attempts on using CSS for LaTeX formatting? For example:  body { font-family: Helvetica,Arial,sans-serif; } section { font-size: 16pt; } /* or: */ h1 { font-size: 16pt; }   I know that this approach is limited compared to the classic approach, but it could be a nice attempt. So are there any published papers or code pieces?  I'd like to write in the preamble of my LaTeX document: \usestylefile{foo.css} and have the text rendered as written in the given style file (and its linked style files).
13570
I'm writing a pretty long document, and at some point this happened with the table of contents:        I would like to be able to force a line break between 'complex' and 'space', either directly or by imposing suitable limits on line lengths or the separation between the lines and the numbers, or any such relevant lengths.  A minimal working example is below,   \documentclass[pdftex,11pt,twoside,a4paper]{report}  \usepackage[a4paper, left=3cm, right=3cm, top=3cm, bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern} % load a font with all the characters \usepackage[colorlinks,linkcolor=blue,final]{hyperref} \usepackage{tocloft}  \usepackage{lipsum}   %%% Headers \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{14pt}  \fancyhead[LE]{\thepage} \fancyhead[RE]{Electron dynamics in complex space and complex time} \fancyhead[LO]{\nouppercase{\leftmark}} \fancyhead[RO]{\thepage}  \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}   \begin{document}  \tableofcontents   \setcounter{page}{100} \chapter{Quantum orbits as trajectories through complex time and complex space} \lipsum[1-16]  \end{document}   including the headers in use in the document; obviously all of the non-lipsum packages are necessary in the larger document. How can I fix this ugliness?
30539
I have the following table:     \documentclass[a4paper,preprint,aps,                    unsortedaddress]{revtex4}     \usepackage[top=2.5cm,bottom=2.5cm,                 left=3.5cm,right=2.5cm]{geometry}     \usepackage{longtable,array,booktabs}      \ifdefined\mc        \renewcommand{\mc}{\multicolumn}     \else        \newcommand{\mc}{\multicolumn}     \fi      \begin{document}           \setlength\LTleft{-3.0cm}         \setlength\LTright{-2.0cm}          \scriptsize      \begin{longtable}{ l r @{--} p{1.3cm} &gt;{\centering}p{2.6cm}                         *{4}{p{1.25cm}} p{2.1cm}}                    %% headers and footers      \caption{Table} \\      \hline\hline     \endfirsthead      \mc{9}{c}{\tablename\ \thetable\ -- \emph{Continued from previous page}} \\      \hline     aaaaaaaaaaaaaaaaaaaaaaaa &amp; \mc{2}{c}{bbb--ccc} &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     \hline     \endhead      \hline     \mc{9}{r}{\emph{Continued on next page}} \\     \endfoot      \hline\hline     \endlastfoot      %% body of table          aaaaaaaaaaaaaaaaaaaaaaaa &amp; \mc{2}{c}{bbb--ccc} &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     aaaaaaaaaaaaaaaaaaaaaaaa &amp; bbb &amp; ccc &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     aaaaaaaaaaaaaaaaaaaaaaaa &amp; bbb &amp; ccc &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     aaaaaaaaaaaaaaaaaaaaaaaa &amp; bbb &amp; ccc &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\      \end{longtable}     \end{document}   which I would like to shift to the left by setting \setlength\LTleft{-3.0cm}  and \setlength\LTright{-2.0cm}. Furthermore, I have to apply \scriptsize for the table. However, none of these commands are working with revtex4. Could you please provide a solution to this problem? (This question is the same as in , but I cannot sign up with that username.)  If it is not possible, an alternative solution would also be useful for me. For this case, I attached the first page of my real table.
70342
I'm trying to adjust a simple template in Pages version 5.2 but can't for the life of my figure out how to change the existing layout such that the text spans the full width of the page.  I've turned on Show Layout and tried adjusting the left Document Margin to 0 but it's still indented by about 4.5cm and that throws the footer and header too far to the left.  The Ruler won't allow me to drag the slider any further left than the edge of the layout.  Changing the Column settings doesn't do it either. My Indents settings are all set to 0. I'm completely at a loss as to how to do this.  I've had no issue changing the top, bottom and right margins, but the left margin seems to have this welded in inset.  The following screen snap of the standard Business Letterhead template (with markup in red) indicates what I am trying to achieve.    My thinking is there is some weird margin applied, but I don't know where it is set. I can not move the blue tip (see image below)    How can the tip to the left be moved? Right now it is 'blocked'.
60154
Consider the Code below:  \documentclass[%     paper=A4,     twoside=true,     fontsize=12pt,     titlepage=true,     listof=totoc,     bibliography=totoc,     listof=flat,     open=right,     cleardoublepage=empty,     headsepline=true,     footsepline=false,     captions=tableheading,     numbers=noendperiod,     parskip=half-,     headings=normal]{scrbook} \usepackage[a4paper]{geometry} \geometry{     includehead=true,     hmarginratio=1:2,     vmarginratio=3:5,     textwidth=170mm,     textheight=230mm,     headheight=20pt,     footskip=15mm,     bindingoffset=6mm} \usepackage{showframe} \usepackage{blindtext} \usepackage[tocindentauto]{tocstyle} \usetocstyle{KOMAlike} \begin{document} \frontmatter \tableofcontents \cleardoublepage \mainmatter \blinddocument\blindtext \pagenumbering{Roman} \setcounter{page}{20} \appendix \blinddocument \end{document}   The roman pagenumbers in the table of contents are too wide. How to fix this?
121792
How do I make the space under footnotes disappear? And to space over the footnote's bar?    Code:  \documentclass[12pt,french]{report} \usepackage{mathptmx} \usepackage{helvet} \usepackage{courier} \usepackage[T1]{fontenc} \usepackage[cp1250]{inputenc} \usepackage[a4paper]{geometry} \geometry{verbose,margin=1in,headheight=12pt,headsep=25pt} \usepackage{fancyhdr} \pagestyle{fancy} \setlength{\parskip}{\medskipamount} \setlength{\parindent}{0pt} \usepackage{babel} \makeatletter \addto\extrasfrench{%    \providecommand{\og}{\leavevmode\flqq~}%    \providecommand{\fg}{\ifdim\lastskip&gt;\z@\unskip\fi~\frqq}% } \makeatother \usepackage{latexsym} \usepackage{pifont} \usepackage{color} \usepackage{float} \usepackage{textcomp} \usepackage{graphicx} \usepackage{setspace} \usepackage[unicode=true,  bookmarks=true,bookmarksnumbered=true,bookmarksopen=false,  breaklinks=true,pdfborder={0 0 0},backref=false,colorlinks=false]  {hyperref} \hypersetup{pdftitle={tito},  pdfauthor={abc},  pdfkeywords={kiko}} \usepackage{lipsum}  \makeatletter \usepackage{multicol} \usepackage{fancyhdr} \usepackage{multirow} \usepackage{longtable} \setcounter{secnumdepth}{4} \setcounter{tocdepth}{4} \usepackage{array} \newcommand{\ts}{\textsuperscript} \renewcommand\theparagraph{\alph{paragraph}.} \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%                                     {3.25ex \@plus1ex \@minus.2ex}%                                     {0.5ex \@plus .2ex}%                                     {\normalfont\normalsize\bfseries}} \renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{2em}}  \def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}  \def\@makechapterhead#1{% \vspace*{10\p@}% {\parindent \z@ {\reset@font \usefont{OT1}{phv}{m}{n} \LARGE Chapitre \thechapter\par\nobreak}% \par\nobreak \vspace*{30\p@} \interlinepenalty\@M \usefont{OT1}{ptm}{b}{n} {\raggedright \Huge #1}% \par\nobreak \vskip 20\p@ \hrule height 1pt \par\nobreak \vskip 45\p@ }}  \def\@makeschapterhead#1{% \vspace*{10\p@}% {\parindent \z@ {\raggedleft \reset@font \scshape \vphantom{\@chapapp{} \thechapter} \par\nobreak}% \par\nobreak \vspace*{30\p@} \interlinepenalty\@M \usefont{OT1}{ptm}{b}{n} {\raggedright \Huge #1}% \par\nobreak \par\nobreak \vskip 45\p@ }}  \lhead{\nouppercase\leftmark} \chead{} \rhead{} \lfoot{} \cfoot{\thepage} \rfoot{} \renewcommand{\footrulewidth}{0.4pt}  \pretolerance=10000 \hyphenpenalty=10000 \exhyphenpenalty=10000  \AtBeginDocument{   \def\labelitemi{\Pisymbol{psy}{183}}   \def\labelitemii{\(\rhd\)}   \def\labelitemiii{\(\rhd\)}   \def\labelitemiv{\(\ast\)} } \makeatother  \begin{document} \chapter{Chap} \lipsum[1]\footnote{\lipsum[1]} \lipsum[1-8] \end{document}
81269
I'm using the Madrid theme but I would like tu use images instead of colored backgrounds for the frametitle and the footline. This is what I have so far    I want to do the same thing I did for the frametitle in the footline. I've tried many things, the only one that has worked is   \setbeamertemplate{footline}[textline]{ \includegraphics[width=\paperwidth]{image}}   but I can't fill the width of the page nor move the image, and the text is covered by the image. This is an example of what i just described  \documentclass{beamer} \mode&lt;presentation&gt;{   \usetheme{Madrid}   \setbeamercolor{frametitle}{fg=yellow}   \setbeamercolor*{palette primary}{use=structure,fg=red}   \setbeamercolor*{palette secondary}{use=structure,fg=red}   \setbeamercolor*{palette tertiary}{use=structure,fg=red}   \setbeamerfont{frametitle}{size=\huge} } \usepackage{textpos} \usepackage{graphicx} \usepackage{tikz} \usepackage[export]{adjustbox}  \setbeamertemplate{footline}[text line]{ \includegraphics[width=\paperwidth]{foot_image}}  \addtobeamertemplate{frametitle}{ \begin{textblock*}{\paperwidth}(-30pt,0pt) \includegraphics[width=1.1\paperwidth,height=1.3cm]{frametitle_image} \end{textblock*} }  \title[Title]{\textbf{{\huge Big Title}}} \author[email]{Author} \institute[]{Department\\University} \setbeamertemplate{navigation symbols}{}  \begin{document}  \begin{frame}{Frametitle} slide 2 \end{frame} \end{document}   Which produces
18098
I have seen the options such as a4paper, a5paper, letterpaper, etc... to go in the square brackets after \documentclass, but what I want is 8.25 inches width by 10.75 inches height for one document and 6 inches width by 9 inches height for another one. How is this done?