[luatex] LuaLaTeX + FanycyHdr issue

jung.jinki at gmail.com jung.jinki at gmail.com
Wed Apr 17 11:22:47 CEST 2019


sorry I attach Lua version. see below.
 From other source, I learned that fancyhdr is a
grouped environment and as soon as Lua code exit
all information get lost.
So I modified the code to start group and complete and
the code is working as I expected. I will post working sample
as it is ready. Thank you.

-------------------- lua version begin ---------------------

\documentclass{article}
\usepackage{calc}
\usepackage{color}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{fancyvrb}
\usepackage{hyperref}
\usepackage{ifthen}
\usepackage{listings}
\usepackage{luacode}
\usepackage{luatexko}
\usepackage{pgf}
\usepackage{tikz}
\usepackage[paper=A3,pagesize]{typearea}

\begin{document}

\pagestyle{fancy}

\begin{luacode*}
         tex.print([[ \fancypagestyle{mystyleeight}{ ]])
         tex.print([[ \fancyfoot[C]{mystyle-eight \thepage} ]])
         tex.print([[ } ]])
         tex.print([[ \fancypagestyle{mystylethree}{ ]])
         tex.print([[ \fancyfoot[C]{mystyle-three \thepage} ]])
         tex.print([[ } ]])
\end{luacode*}

\pagestyle{mystyleeight}
page should be mystlye-eight

\newpage
\pagestyle{mystylethree}
page should be mystlye-three

\newpage
\pagestyle{mystyleeight}
page should be mystlye-eight

\end{document}

-------------------- lua version end ---------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20190417/2966eab7/attachment.html>


More information about the luatex mailing list