# How can I use the linegoal package with LuaTeX?

It seems like \linegoal isn't working correctly with LuaTeX:

With pdfTeX the output is fine:

Is there a way get \linegoal working with lualatex? Or is there an alternative?

MWE:

% !TeX TS-program = lualatex
\documentclass[twocolumn]{article}

\usepackage{linegoal}

\usepackage{blindtext}

\begin{document}
Hello \fbox{\parbox{\linegoal}{World}}

\blindtext[5]
\end{document}


Pkg linegoal needs an update. This fixes the issue for luatex:

\let\pdfsavepos\savepos
\let\pdflastxpos\lastxpos
\let\pdflastypos\lastypos

\documentclass[twocolumn]{article}

\usepackage{linegoal}

\usepackage{blindtext}

\begin{document}
Hello \fbox{\parbox{\linegoal}{World}}

\blindtext[5]
\end{document}

• You could \RequirePackage{luatex85} – Joseph Wright Jan 23 '20 at 13:52
• @JosephWright Yes, of course. Just wanted to point out the specific items in linegoal that need to be fixed. – AlexG Jan 23 '20 at 13:55