pkubowicz / opendetex

Improved version of Detex - tool for extracting plain text from TeX and LaTeX sources
Other
236 stars 35 forks source link

Some part of the preamble (\cfoot and \pagenumbering) being counted as words #71

Open ale03068 opened 3 years ago

ale03068 commented 3 years ago

Input:

\documentclass[12pt,a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{float}
\usepackage{fancyhdr}
\usepackage{lastpage}

\hypersetup{hidelinks}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\cfoot{\thepage\ of \pageref{LastPage}}

\title{Essay}
\author{Jon}

\begin{document}

\maketitle
\tableofcontents

\pagenumbering{gobble}
\clearpage
\pagenumbering{arabic}

\section{yo}
hello world.

\end{document}

Expected output:

Essay
Jon
yo
hello world.

Real output:

of
Essay
Jon
gobble
arabic
yo
hello world.

The problem: "of" inside of \cfoot{\thepage\ of \pageref{LastPage}} should not be counted "gobble" and arabic" inside of \pagenumbering{} should not be counted