Skip to content

Commit

Permalink
Small footnote fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gucci-on-fleek committed May 26, 2022
1 parent 9f09606 commit 5e4bdf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/manual/lwc-manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,6 @@ \subsection{Footnotes}

If there are footnotes (or any other type of inline \tex{insert}) present in the moved line, \lwc/ will move both the \q{footnote mark} and the \q{footnote text} such that both are on the same page. However, this may lead to an odd blank space at the bottom of the page since \lwc/ needs to move both the line and its footnotes. Footnotes cause the same page-breaking issues in unmodified Plain~\TeX{} and \LaTeX{}, so this is mostly unavoidable.

Please note that \lwc/ does \bold{not} move footnotes in \ConTeXt{} \mkxl/ due to limitations with the \LuaMetaTeX{} engine.

\section{Stability}

The documented interfaces of \lwc/ can be considered stable: I'm not planning on removing or modifying any existing options or commands in any way that would break documents.
Expand Down Expand Up @@ -691,7 +689,7 @@ \section{Short last lines}

\item \Lwc/ only attempts to expand paragraphs; it never attempts to shrink them. See the \emph{TUGboat}~article\cite[article] §15.3 for further discussion. \githubissue{33}

\item \Lwc/ can only expand paragraphs that fit completely on a page. This is unavoidable due to the one-page-at-a-time model: you can't modify the bottom half of a paragraph since its top half has already shipped out, and you can't expand the top half of a paragraphs since that can't remove orphans. This only causes issues if your document has paragraphs so long that a page only has two half-paragraphs and zero whole paragraphs.
\item \Lwc/ can only expand paragraphs that fit completely on a page. This is unavoidable due to the one-page-at-a-time model: you can't modify the bottom half of a paragraph since its top half has already shipped out, and you can't expand the top half of a paragraph since that can't remove orphans. This only causes issues if your document has paragraphs so long that a page only has two half-paragraphs and zero whole paragraphs.

\item Sometimes a \woo/ cannot be eliminated because no paragraph has
enough stretch. Sometimes this can be remediated by
Expand All @@ -712,6 +710,8 @@ \section{Short last lines}
however, this is both \acronym{NP}-complete\cite[plass] and
impossible to solve in a single pass. Very rarely would such a
system remove widows or orphans that \lwc/ cannot.

\item \Lwc/ does not move footnotes in \ConTeXt{} \mkxl/ due to limitations with the \LuaMetaTeX{} engine. \Lwc/ may also have issues moving footnotes when a single footnote is so long that it spans multiple pages.
\stopitemize

\section{Contributions}
Expand Down
4 changes: 4 additions & 0 deletions source/lua-widow-control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,10 @@ local function get_inserts(last_line)
n = n.next
end

if #selected_inserts ~= 0 then
info("Moving footnotes on page " .. pagenum())
end

return selected_inserts
end

Expand Down

0 comments on commit 5e4bdf4

Please sign in to comment.