4

How can I write a text section in latex in the right bottom side of the page with a nice font ? It is for some thanks text.

Now I have:

    \vfill
{\sffamily
\begin{flushright}
    \begin{tabular}{l}
    TEXTTEXTTEXTTEXTTEXT\\
    \\
    TEXTTEXTTEXTTEXTTEXT\\
\\
TEXTTEXTTEXTTEXTTEXT\\
\\
TEXTTEXTTEXTTEXTTEXTTEXT\\
    \end{tabular}
\end{flushright}
}
2
  • 1
    Do you want it in the bottom-right of the text block, or the right part of the footer?
    – Werner
    Jan 28, 2014 at 5:22
  • Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Feb 3, 2014 at 21:51

2 Answers 2

6

While your question did not mention it explicitly, I gleaned from your example the sense that you would like some left-aligned text in the lower right-hand corner, in a different font style.

\documentclass{article}
\usepackage{lipsum}
\usepackage[usestackEOL]{stackengine}
\thispagestyle{empty}
\begin{document}
\lipsum[1-2]
{\raggedleft\vfill\itshape\Longstack[l]{%
  Thanks so much\\
  for the wonderful gift.\\
  I've always wanted an
  apple corer.\\ \\
  Regards,\\
  Joe Pommes
}\par
}
\end{document}

enter image description here

3

There is a neat package called textpos that helps you to place anything absolutely on the page.

Loading the package

Include it in your preamble. You need to pass the option absolute for absolute positioning to work.
\usepackage[absolute]{textpos}

If you want to use relative positioning later you may always switch between the two modes using: \TPoptions{absolute=false} and \TPoptions{absolute=true}
But you need to pass this package option for absolute positioning to work. Enabling it later using \TPoptions{absolute=true} will result in an error message.

Defining the grid

Now you need to define a grid:
\TPGrid[horizontalBorder,verticalBorder]{numRows}{numColumns}

Here is an example grid:
\TPGrid[20mm,10mm]{5}{5}

An A4 Page of paper with a padding of top:10mm, bottom: 10mm, left: 20mm, right: 20mm and a five by five grid inside

Placing boxes

You may enable debug view of the grid with this instruction:
\TPShowGrid{numRows}{numColumns}
Ensure that the numRows and numColumns match

In our case we want a 1 by 1 grid without any border:
\TPGrid[0mm,0mm]{1}{1}

It might be helpful to enable debug view of our boxes:
\TPoptions{showboxes=true}

Now you can start positioning your textblock:

\begin{textblock}{widthInGridCells}[originXAsFractionOfBoxWidth,originYAsFractionOfBoxHeight](XInGridCells,YInGridCells)
    Textcontent
\end{textblock}

Lets talk about the options:

  • widthInGridCells (How wide our box is. Approximate its width based on your content)
  • XInGridCells (Where the x coordinate of the origin of our box should be placed. We want to place it all the way in the bottom right corner. As our grid is only one cell wide we put a 1 here)
  • YInGridCells (Where the y coordinate of the origin of our box should be placed. We want to place it all the way in the bottom right corner. As our grid is only one cell high we put a 1 here)
  • originXAsFractionOfBoxWidth (Where the origin of our box is supposed to be. (0,0) is the top left corner and (1,1) the bottom right corner.) We want out origin to be all the way to the right of the box. Therefore we put a 1 here.
  • originYAsFractionOfBoxHeight (Where the origin of our box is supposed to be. (0,0) is the top left corner and (1,1) the bottom right corner.) We want out origin to be all the way to the bottom of the box. Therefore we put a 1 here.

\begin{textblock}{0.25}[1,1](1,1) will now put the origin of our box in the bottom right corner of the page. We specified our origin to be the bottom right corner of our box. The box is 1/4 of our page wide

Example bottom right with page padding:

\TPGrid[10mm,10mm]{1}{1}
%\TPShowGrid{1}{1}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{0.25}[1,1](1,1)
    \rule{5cm}{0.12mm}\\
    Signum, Date
\end{textblock}

Example bottom left with page padding:

\TPGrid[10mm,10mm]{1}{1}
%\TPShowGrid{1}{1}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{0.25}[0,1](0,1)
    \rule{5cm}{0.12mm}\\
    Signum, Date
\end{textblock}

Example page center no page padding:

\TPGrid[0mm,0mm]{1}{1}
%\TPShowGrid{1}{1}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{0.25}[0.5,0.5](0.5,0.5)
    \rule{5cm}{0.12mm}\\
    Signum, Date
\end{textblock}

Example bottom starting after 1/3 of the page with vertical padding


\TPGrid[0mm,10mm]{3}{3}
%\TPShowGrid{3}{3}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{1}[0,1](1,3)
    \rule{5cm}{0.12mm}\\
    Signum, Date
\end{textblock}

Theres also textblock* for absolute units you max calculate using the calc package

\begin{textblock*}{widthAsUnit}[originXAsFractionOfBoxWidth,originYAsFractionOfBoxHeight](XAsUnit,YAsUnit)
    Textcontent
\end{textblock*}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .