1

How to align multiple sentences vertically in one footnote? For example, in the screenshot below I need to make the three texts and their numbers aligned vertically:

As in this screenshot i need to make the three texts and their numbers aligned vertically

MWE:

\documentclass[20pt]{extarticle}

\begin{document}

This is some examples\footnote{\label{subtypes examples}  1 - text\\ 2 - text\\  3 - text}
\end{document}
Maged
  • 13
  • Try \parbox, tabular or enumerate. See also https://tex.stackexchange.com/questions/354710/list-in-footnote-in-list. – John Kormylo Aug 05 '18 at 23:41
  • Welcome to TeX.se. Instead of posting a screenshot from your editor, please add the code of your minimal document (which is good) directly to the question. You can format code by selecting it and clicking on the {} icon when editing the question. – Alan Munn Aug 05 '18 at 23:45

2 Answers2

3

Assuming you really want a list, then I would use a proper enumerate structure. Here I've defined a new enumerate list fnenum which aligns with the footnote number.

\documentclass[20pt]{extarticle}
\usepackage{enumitem}
\newlist{fnenum}{enumerate}{1}
\setlist[fnenum]{label={\arabic*~--~},before=\vspace{-\baselineskip},nosep,labelsep=0pt}
\begin{document}

This is some examples\footnote{\label{subtypes examples}
\begin{fnenum}
\item An item
\item Another item
\item A third
\end{fnenum}}
\end{document}

output of code

Alan Munn
  • 218,180
1

Lazy hack:

The LaTeX standard classes (and the extsizes classes) use a box of 1.8 em to typeset the footnote number, and a paragraph indentation of 1 em. You can change the paragraph indentation to the same 1.8 em:

enter image description here

\documentclass[20pt]{extarticle}

\title{Title}
\author{Me}
\date{\today}

\begin{document}
\maketitle
This is some example text\footnote{\label{subtypes examples}%
\parindent1.8em
1 -- Text\par
2 -- Text\par
3 -- Text}
\end{document}
  • Thx, that was helpful – Maged Aug 06 '18 at 00:00
  • But what was the function of the percentage sign because it didn't work without it. excuse me i'm newbie – Maged Aug 06 '18 at 00:06
  • 1
    @Maged Because TeX treats single line breaks as spaces. Try typing a sentence with a line break (enter key) instead of a space; the printed output will be the same (see here for a more detailed explanation). If you don't put a % there, the line break is treated as a space, which is inserted before the 1 --, thus the misalignment. The % there is what we call a "end of line protection" and it basically comments the line break so TeX doesn't understand it as a space. – Phelype Oleinik Aug 06 '18 at 00:11