Problem: The \pageref{} at the end does not work. IDs for headings work just fine. (I’m using \pageref{} internally, via a filter, for the print version of my book.) [Bla bla bla.]{#foo} ··· For more information, consult \pageref{foo}. Solution: \multilabel{foo} Bla bla bla. ··· For more information, consult \pageref{foo}. Lua filter that implements \multilabel{}. Feedback welcome. -- Problem: \pageref{} does not work with \hypertarget{} -- Work-around: \phantomsection\label{foo}\hypertarget{foo}{} -- https://tex.stackexchange.com/questions/376805/the-page-number-of-a-hypertarget function RawInline(el) if (el.format == "tex") then local inner = string.match(el.text, "\\multilabel{([^{}]*)}") if (inner ~= nil) then if FORMAT == "latex" then return pandoc.RawInline("tex", "\\phantomsection\\label{" .. inner .. "}\\hypertarget{" .. inner .. "}{}") else return pandoc.Span( {pandoc.Str("")}, -- list of inlines pandoc.Attr(inner) ) end end end return nil -- no change end -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c8121aed-b564-44c3-8289-ede0ee7046bd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.