[luatex] LuaLaTeX + FanycyHdr issue

jung.jinki at gmail.com jung.jinki at gmail.com
Tue Apr 16 09:08:55 CEST 2019


Hello LuaTeX users,

I am trying to implement dynamic FanyHdr in Lua.
There is an odd error I am getting as follow :
(/Volumes/program/usr_local/texlive/2018/texmf-dist/tex/generic/oberdiek/gettit
      lestring.sty)) (./fancy_lua.out) (./fancy_lua.out)
     ABD: EverySelectfont initializing macros ABD: EveryShipout 
initializing macros
     ! Undefined control sequence.
     <argument> \undefinedpagestyle
     l.30 \pagestyle{mystyleeight}
     ?
Since macro version is working, I was expecting no error in Lua.
I need your help one this.

Regards,
onionsjk


----- Lua version code 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}

\fancypagestyle{mystyle3}{
\fancyfoot[C]{mystle-three - \thepage}
}

\fancypagestyle{mystyle8}{
\fancyfoot[C]{mystyle-eight - \thepage }
}

\pagestyle{mystyle8}
the page should be mystlye-eight

\newpage
\pagestyle{mystyle3}
the page should be mystlye-three

\newpage
\pagestyle{mystyle8}
the page should be mystlye-eight

\end{document}

----- code end -----



----- macro version code 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}

\fancypagestyle{mystyle3}{
\fancyfoot[C]{mystle-three - \thepage}
}

\fancypagestyle{mystyle8}{
\fancyfoot[C]{mystyle-eight - \thepage }
}

\pagestyle{mystyle8}
the page should be mystlye-eight

\newpage
\pagestyle{mystyle3}
the page should be mystlye-three

\newpage
\pagestyle{mystyle8}
the page should be mystlye-eight

\end{document}

----- code end -----






More information about the luatex mailing list