4

(I’m using the microtype package.)

I wanted to justify the last line of a footnote because it was very close to be full. Here is what it looked like:

enter image description here

The first two lines are from the same footnote, the third is from the following one.


  1. I tried \linebreak, which justified it the way I wanted but created a blank line in between my two footnotes:

enter image description here

  1. Then, I used \setlength{\parfillskip}{0pt plus\dimexpr\textwidth-2\parindent} instead, found in this answer. It does justify the line, and without adding a blank line; but it works as if the microtype package wasn’t loaded, i.e. without exdentation, in that case:

enter image description here

While this is better, it clashes with how justification is done in the rest of the document.


Does anyone know a way to get the same justification as 1. but without the blank line? (Like in 2.)

MWE (compiled with LuaLaTeX):

\documentclass{article}

\usepackage{microtype}

\begin{document}

Lorem ipsum\footnote{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper [...] non, mi.} dolor sit amet, consectetur adipiscing elit. % 1) last line not full

Lorem ipsum\footnote{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper [...] non, mi.\linebreak} dolor sit amet, consectetur adipiscing elit. % 2) last line full in microtype style but followed by a blank line

Lorem ipsum\footnote{{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper [...] non, mi.} \setlength{\parfillskip}{0pt plus\dimexpr\textwidth-2\parindent}} dolor sit amet, consectetur adipiscing elit. % 3) last line full but not in microtype style

Lorem ipsum\footnote{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper [...] non, mi.} dolor sit amet, consectetur adipiscing elit. % 4) same as 1), to show there is no blank line after 3)

\end{document}

1 Answers1

2

I see two solutions: (1) barbara's suggestion to add \parfillskip=0pt would work for normal paragraphs, however footnotes are ended with a strut box, which prevents right protrusion. For cases like this, microtype provides the command \rightprotrusion. (2) You could also undo the extra vertical space that \linebreak adds. So:

\documentclass{article}
\usepackage{microtype}
\begin{document}
Lorem ipsum\footnote{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, 
   adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula 
   massa, varius a, semper [\ldots] non, mi\parfillskip=0pt \rightprotrusion{.}} 
dolor sit amet, consectetur adipiscing elit.

Lorem ipsum\footnote{Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper [\ldots] non, mi.\linebreak\vspace{-\baselineskip}} dolor sit amet, consectetur adipiscing elit. \end{document}

Robert
  • 14,181
  • 1
  • 52
  • 77