[texhax] Problem configuring headers

Jerry jerry at seibercom.net
Fri Jun 14 18:33:58 CEST 2013

I admit that I am not quite sure what I am doing. I spend a lot of time
creating legal documents using Word. Word has a nice legal template. I
am trying to use LaTEX but it isn't easy. It is too bad that LaTEX
doesn't have a native "legal" document class.

Anyway, what I am trying to do is get the Chapter name, actually the
"Article" name and the article number and title in the left side
heading. I can get the article's number but not its title.

Second, and I am not sure if this is possible, in the right side
header, I want the section name & number, plus the subsection name and
number ONLY if there is one. The way I have it configured now, I get
the section repeated twice if there is no subsection. The subsection
number should be printed on a line below the section number, which surprisingly is actually working..

I would really appreciate it if someone can tell me where I can find
out how to accomplish this. I need to have this approximately 50 page
report completed by this Tuesday.

\usepackage[width=8.50in, height=11.00in, left=1.00in, right=1.00in, top=1.00in, bottom=1.00in]{geometry}

% change chapter to article and center it

% Swap plain for fancy when using "chapter" since chapter sets the document style to plain
\let\ps at plain\ps at fancy % :\Let plain be exactly the same as fancy

%Format section numbering

\setcounter{secnumdepth}{4}	% Number subsubsections
\setcounter{tocdepth}{4}	% Add subsubsection to TOC

% Change chapter vertical spacing
\def\ttl at mkchap@i#1#2#3#4#5#6#7{%
    \ttl at assign\@tempskipa#3\relax\beforetitleunit
    \vspace{\@tempskipa}%<<<<<< REMOVE THE * AFTER \vspace
    \ifcase#5 \global\@afterindentfalse\fi
    \ttl at assign\@tempskipb#4\relax\aftertitleunit
    \ttl at topmode{\@tempskipb}{%
        \ttl at select{#6}{#1}{#2}{#7}}%
    \ttl at finmarks  % Outside the box!
    \@ifundefined{ttlp@#6}{}{\ttlp at write{#6}}}

%Attempt to control dangling paragraphs

\title{Code of Ordinances}


% Switch to the Times New Roman Font

% Create the title page.
\includegraphics[scale=0.75]{../img/Stem_Logo_1200x1200} \\[72pt]
{\Huge The Charter \\
and \\
General Ordinances of the \\
Town \textsuperscript{of} Stem \\
{\large June 17, 2013} \\ }

\fancyfoot[r]{{\footnotesize \textbf{Contents:\ \thepage}}}
\fancyfoot[l]{{\footnotesize \textbf{06-17-2013}}}
\fancyfoot[c]{\textbf{{\footnotesize Charter and General Ordinances of Stem}}}

\fancyhf{} % Will clear the headers if uncommented
\fancyhead[L]{{\footnotesize \chaptername~\thechapter \chaptermark{} }}
\fancyhead[R]{{\footnotesize Section: \thesection \\ Subsection: \thesubsection}}
\fancyfoot[r]{{\footnotesize \textbf{Page \thepage\ of \pageref{LastPage}}}}
\fancyfoot[c]{{\footnotesize \textbf{Charter and General Ordinances of Stem}}}
\fancyfoot[l]{{\footnotesize \textbf{June 17, 2013}}}
\setcounter{section}{0} % Set the section counter at 0
\setcounter{page}{1}	% Set the page number to 1

\labelformat{section}{section~#1}	% used for \vref
\labelformat{chapter}{article~#1}	% used for \vref
\labelformat{enumi}{item~#1}	% used for \vref
\labelformat{enumii}{item~#1}	% Used for \vref

\chapter{The Town \textsuperscript{of} Stem}

\chapter{Act to Incorporate the Town of Stem}
\section{Corporate Limits}

\chapter {Mayor and Board of Commissioners}
\section {Composition of Board of Commissioners.}
\subsection {Organization of Board; Oaths of Office.}
\subsection {Compensation of Mayor, Councilmen and Town Employees.}
\subsubsection{Travel Reimbursement}

\chapter {Administrative Offices}
\section {Mayor}

%% The rest of the document is truncated


Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.

More information about the texhax mailing list