Page Layoutfooter and section heading issue

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
lnsam22
Posts: 28
Joined: Thu Jan 13, 2011 6:47 pm

footer and section heading issue

Post by lnsam22 »

Hi All,

I have three problems.

Firstly, I'm using superscripts for my in-text citations in a paper I am writing. As a result, I need to have my footnotes in the regular alphabet, superscript-form. Can anyone tell me how to do this? because of my other problem, I've stated my preamble in the code below.

My second problem is that I need to have my section headings in 10 pt. I'm using fancyhdr since I need to put a period after each section number. I'm pretty sure this is the package I need to alter the font size, however, I don't know the command :? . Here's my code.

Code: Select all

\documentclass{article}
\usepackage{amsmath}%
\usepackage{amsfonts}%
\usepackage{amssymb}%
\usepackage{graphicx}
\usepackage{graphics,color}
\usepackage[superscript]{cite}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{sectsty}

    
\makeatletter
\def\@seccntformat#1{\csname the#1\endcsname.\quad}
\makeatother

\begin{document}
  \section{\normalsize{Does this work}}
    Section heading needs to be in 10 pt.  Here I tried to do this, but the numbering is still the same size.

  \section{What did you Do}   
\end{document}
My third problem is that the paper needs to be a particular width and height on the page. I have no idea how to go about altering the default settings. It needs to be "Text area (excluding running title) is 5 inches across and 7.7 inches
deep."

I hope here's the right discussion topic place, I'm not sure. If not, sorry in advance.
lnsam22
Last edited by lnsam22 on Tue Mar 01, 2011 2:20 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

footer and section heading issue

Post by Frits »

To solve your first problem, redefine the footnote like:

Code: Select all

\renewcommand{\thefootnote}{\alph{footnote}}
To get the section heading in the desired format you were on the right track. You only needed to edit the definition of the number of the section:

Code: Select all

...
\makeatletter
\def\@seccntformat#1{\normalsize{\csname the#1\endcsname.\quad}}
\makeatother

\begin{document}
  \section{\normalsize{Test}}
...

Your third problem can probably be solved with the geometry package
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

footer and section heading issue

Post by localghost »

Frits wrote:[…] To get the section heading in the desired format you were on the right track. You only needed to edit the definition of the number of the section:

Code: Select all

...
\makeatletter
\def\@seccntformat#1{\normalsize{\csname the#1\endcsname.\quad}}
\makeatother

\begin{document}
  \section{\normalsize{Test}}
...
[…]
Very bad style. This way entries in the ToC are also affected. Just look at another example.

Code: Select all

\section{\normalsize\textit{Test}}
And \normalsize is a switch which doesn't have arguments.
lnsam22 wrote:[…] I have three problems. […]
Since you need a custom page style with headers and modifications to your section (and perhaps other) headings, you should use the titlesec package which masters both. So you can drop fancyhdr and sectsty. The necessary redefinition of the footnote numbering has already been given and the geometry package will provide the right type area. A complete example could look like this.

Code: Select all

\documentclass[10pt,letterpaper,english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[centering,text={5in,7.7in}]{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage[superscript]{cite}
\usepackage{blindtext}

\renewcommand*{\thefootnote}{\alph{footnote}}

\newpagestyle{main}{%
  \headrule
  \sethead[\thepage][][\thesubsection.\quad\subsectiontitle]{\thesection.\quad\sectiontitle}{}{\thepage}
  \setfoot[][][]{}{}{}
}
\pagestyle{main}

\titleformat{\section}{\normalfont\normalsize\bfseries\filright}{\thesection.}{1em}{}
\titleformat{\subsection}{\normalfont\normalsize\bfseries\filright}{\thesubsection.}{1em}{}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries\filright}{\thesubsubsection.}{1em}{}


\begin{document}
  The quick brown fox jump over the lazy dog.\footnote{The quick brown fox jump over the lazy dog.}

  \medskip
  \blinddocument
\end{document}
Read the manuals of the involved packages to do necessary adaptations that fit your needs. The blindtext package is only for creating dummy text thus not part of the solution.


Thorsten
Post Reply