2

If you're using fancyhdr, you can do it as follows: \documentclass{article} \usepackage{fancyhdr} \usepackage{mathptmx} \usepackage{lipsum} % for mock text \usepackage{showframe} % to show the page blocks \newcommand{\Makeheader}{\parbox[b]{\textwidth}{\lipsum[1][1-5]}} \AtBeginDocument{% \settoheight{\headheight}{\Makeheader}% \addtolength{\...


1

This code produces the output that meets your three requirements. Main changes: (1) Uses imakeidx which allows easy redefinition of the index environment and, best of all, only requires one compilation. (2) Eliminate the boxes of the chapters numbered with zero, including the index, while keeping the layout of the chapter heading. \documentclass[11pt]{book} ...


1

This is an issue with an outdated newlfm class. However, it's fairly easy to recreate the layout provided by the template. And, as a personal preference, the code is far more clear in terms of the layout if you avoid using newlfm (which hasn't been updated in more than a decade). \documentclass{article} \usepackage{charter} % Use the Charter font for the ...


1

Here is an update on the answer by @egreg. It takes the \headrule into account. \documentclass{article} \usepackage{fancyhdr} \usepackage{mathptmx} \usepackage{lipsum} % for mock text \usepackage{showframe} % to show the page blocks \newcommand{\Makeheader}{\parbox[b]{\textwidth}{\lipsum[1][1-5]}} \AtBeginDocument{% \settoheight{\headheight}{\vbox{% ...


1

\subsection by default sets a right mark, too. If the subsection should never be in page header, you can redefine \subsectionmark to do nothing: \renewcommand\subsectionmark[1]{} Example: \documentclass{article} \newcommand{\maintitle}{MAIN TITLE} \newcommand{\docname}{My Document} % tabular package \usepackage{tabularx} % header / footer \...


1

gregoriotex sets \hyphenpenalty for internal reasons to -200. A negative \hyphenpenalty means that LuaTeX should consider a line ending with a hyphen as better than a line non-hyphenated line. Since in a centered context like your header, there are no other reasons not to make lines longer, LuaTeX will hyphenate whenever possible. You can avoid this by ...


1

My suggestion would be to not use longtable, as it seems to destroy the marks, even if you get them out of the \parbox. So I would just set each entry separately in a one-row tabular. The headers on each page can be added with \afterpage. Also I would recommend not using horizontal and vertical lines. I think this would give a cleaner layout. But to stay ...


Only top voted, non community-wiki answers of a minimum length are eligible