0

I need to space the page number and the text in the footer: enter image description here

I tried with \vspace but it throws an error.

This is my code:

\documentclass[a4paper]{extarticle} \usepackage{moresize} \usepackage[letterpaper, margin=.9in]{geometry} \renewcommand\contentsname{Tabla Contenido} \renewcommand\figurename{Figura} \renewcommand\tablename{Tabla} % necessary packages and doc parameters \usepackage{graphicx, amssymb} \usepackage{url, hyperref} \usepackage{rotating} \usepackage{float} \usepackage{caption} \usepackage{array} \usepackage[table,xcdraw]{xcolor} \usepackage{afterpage} \usepackage{cancel} \usepackage{fix-cm} \usepackage[export]{adjustbox} \usepackage{setspace} \usepackage{wrapfig} \usepackage{multirow,array,graphicx} \usepackage{colortbl} \usepackage[english, spanish]{babel} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \usepackage{fancyhdr} \usepackage{xcolor} \usepackage{wallpaper} \usepackage{shapepar} \usepackage{tikz} \usepackage{newtxmath} \usepackage{amsmath} \usepackage[most]{tcolorbox} \usepackage{tabularx} \usepackage{lipsum} \usetikzlibrary{shapes} \usetikzlibrary{shapes.geometric} \usetikzlibrary {positioning} \usetikzlibrary {positioning,shapes.misc} \usetikzlibrary {backgrounds} \setlength\textwidth{6.5in} \setlength\textheight{8in} \begin{document} %footpage-------------------------------------------------------------------------------- \pagestyle{fancy} \fancyhead{}\fancyfoot{} \fancyfoot{\leavevmode\rlap{\parbox[t]{\textwidth}{\tiny\color{gray} \textcopyright \lipsum[1-2].}} \hfill} %Head-Footer-------------------------------------------------------------- \fancyfoot[r]{\leavevmode\rlap{\parbox[t]{\textwidth}{\tiny\color{gray} \textcopyright \lipsum[1-2].}} \hfill{\color{gray}\thepage}} %Table Content-------------------------------------------------------------------------------------------- \newpage \tableofcontents \clearpage %Presentación----------------------------------------------------------------------------------------------------------- \newpage \singlespacing \noindent \end{document} 

Thanks

7
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. And if you get an error message, please don't forget to show it (as code block copied from the log file). Commented Jan 3 at 16:44
  • Please don't use random tags. I cannot see any relation to xetex, overleaf, or latex3. But header-footer and maybe vertical-alignment or errors or compilation-error. Please read the tag descriptions or at least the short tag usage information. Commented Jan 3 at 16:53
  • The code is still not minimal. Please try to reduce the document preamble to the packages needed to reproduce the problem. Loading packages more than once makes also no sense (but often harm, when you try to change package options). Loading, e.g., url explicitly (without options) immediately before hyperref does also not make sense. And usually hyperref should be loaded as late as possible, e.g., after packages like float. Commented Jan 3 at 16:56
  • 1
    Instead of manipulating low level layout lengths like \textheight and \textwidth I recommend to use package geometry to setup text width and height and/or the margins. The package also allows to change the distance between head and text or text and footer. And because it is a standard package, I suggest also to read a LaTeX tutorial. Commented Jan 3 at 17:01
  • 1
    Can you explain the expected result or show a sketch of it? Sorry, but currently I don't understand what you want. Do you want a long text below or above the page number and shall there be a specific vertical or horizontal distance between this footer text and the page number? Or is the problem the width of the text in the page footer? Please add all relevant information to your question. Note also, that I get something different with your code: i.imgur.com/ZASFKat.png Commented Jan 3 at 17:06

1 Answer 1

1

It is still unclear, what you want, however, if you want the text below the page number, I would suggest to define it below the page number:

\documentclass{article}% letterpaper is already the default of article \usepackage[top=.9in,height=8in,width=6.5in]{geometry} \usepackage{fancyhdr} \usepackage{xcolor} \usepackage{lipsum} \begin{document} %footpage-------------------------------------------------------------------------------- \pagestyle{fancy} \fancyhead{}\fancyfoot{} %Head-Footer-------------------------------------------------------------- \fancyfoot[r]{\color{gray}{\thepage}\\[1ex] \parbox{\textwidth}{\tiny\textcopyright \lipsum[1-2].}} %Table Content-------------------------------------------------------------------------------------------- \tableofcontents \clearpage \lipsum \end{document} 

Text below page number in the footer

Feel free to change the length of \\[1ex] to adapt the distance to your needs.

BTW: It makes no sense to load article with option a4paper if you want letterpaper or visa versa it makes no sense to load geometry with option letterpaper if you want a4paper.

1
  • It works, thank you so much Commented Jan 3 at 19:34

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.