1

This is an example page, with a custom footer, containing two different text blocks in the bottom right and bottom left, temporarily using package textpos:

\documentclass[12pt,twoside]{article}
\usepackage[absolute,overlay]{textpos}
  \setlength{\TPHorizModule}{1mm}
  \setlength{\TPVertModule}{1mm}

\begin{document}

Beginning of document.

\begin{textblock}{80}(150,260)
Right text
\end{textblock}

\begin{textblock}{80}(12,260)
Left text
\end{textblock}

\newpage

New page of document.

\end{document}

The resulting bottom of the page should be:

                                  <page number>
                           <some custom empty space>
     Left text                                                      Right text

Note that the page number is above. This is the first page, an odd page. I would like:

  • to swap the positions of "Right text" and "Left text" for the even pages;
  • not to create a textblock for each page, but define a standard layout to be applied;
  • to exclude this layout in some custom pages.

Package fancyhdr would be ideal for this, but IIUC the page number, the left and right fields are on the same line in the footer. I would like instead to put a custom space between the page number and "Right text" and "Left text".

It doesn't matter which package, between textpos and fancyhdr (or another one) is used. How to accomplish this?

  • With a KOMA class you could create layers. You can certainly do some trickery with fancyhdr and simply "shift" the centered footer. How long will the left/right text be (paragraphs or one-liners)? – TeXnician Dec 5 '18 at 12:01
  • @TeXnician I would keep the number in the default footer, and rather downshift the text. One of the two texts is as in the bottom of the page in this answer, so three short lines and an image; the other one is a one liner, a few words. – BowPark Dec 5 '18 at 14:58
0

With fancyhdr, the following workaround is possible:

\documentclass[12pt,twoside]{article}

\usepackage{fancyhdr}

\fancypagestyle{logo}{
  \fancyhf{}
  \renewcommand{\headrulewidth}{0pt}
  \fancyfoot[C]{\thepage}
  \fancyfoot[LE,RO]{
  \vspace{1cm}
  Text 1
  }
  \fancyfoot[RE,LO]{
  \vspace{1cm}
  Text 2
  }
}

\pagestyle{logo}

\begin{document}

The following footer will be repeated in each odd page:

\newpage

The following footer will be repeated in each even page:

\newpage

\pagestyle{empty}

The following page has no footer.

\end{document}

Adjust \vspace{1cm} as desired, but monitoring the log during compilation to avoid the Overfull warning.

enter image description here enter image description here enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.