Is it possible in for the TOC to put the word PAGE above the page numbers?
ALso, in the
\listoffigures
and \listoftables
I have to put the word FIGURE or TABLE before the table or figure number. Is this possible?TIA
Regards,
Evyn
\listoffigures
and \listoftables
I have to put the word FIGURE or TABLE before the table or figure number. Is this possible?NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass[demo,english]{article}
\usepackage{babel,blindtext,graphicx,tocloft,calc}
%%% put figure and table name before number in respective list
\renewcommand{\cftfigpresnum}{\figurename~}
\renewcommand{\cfttabpresnum}{\tablename~}
%%% adjust space for formatting figure and table number in respective list
\setlength{\cftfignumwidth}{\widthof{\figurename}+2.3em}
\setlength{\cfttabnumwidth}{\widthof{\tablename}+2.3em}
%%% for demo only %%%%%%%%%%%%%%%%%%%%%
\def\demofig{\begin{figure}\centering\includegraphics{foo}\caption{I'm figure \thefigure}\end{figure}}
\def\demotab{\begin{table}\centering\caption{I'm table \thetable}\begin{tabular}{ll}a&b\\c&d\end{tabular}\end{table}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%% add "page" before first toc entry
\addtocontents{toc}{\protect\hfill{}page\par}
\tableofcontents
\listoffigures
\listoftables
%%% demo document
\Blinddocument
\demofig\demofig\demofig\demofig\demofig\demofig\demofig\demofig\demofig\demofig\clearpage
\demotab\demotab\demotab\demotab\demotab\demotab\demotab\demotab\demotab\demotab\clearpage
\end{document}
Code: Select all
\documentclass[a5paper]{article}
\usepackage{afterpage}
\begin{document}
\tableofcontents
\addtocontents{toc}{~\hfill\textbf{Page}\par}
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\addtocontents{toc}{\protect\afterpage{~\hfill\textbf{Page}\par\medskip}}
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\addtocontents{toc}{\protect\afterpage{~\hfill\textbf{Page}\par\medskip}}
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\end{document}
Code: Select all
\addtocontents{lof}{\protect\afterpage{{FIGURE}~\hfill{Page}\par\medskip}} %command to enable second page "PAGE" in
\addtocontents{lof}{\protect\afterpage{~\hfill \par\medskip}} %command to enable second page "PAGE" in toc, together with package{afterpage}, doesn't work well for third page toc
\noindnet
could have been tested in 10 seconds. Now i had to spend a few minutes building a new testcase. Code: Select all
\documentclass[a5paper]{article}
\usepackage{afterpage}
\input{multido}
\usepackage{capt-of}
\begin{document}
\pagestyle{headings}
\tableofcontents
\listoffigures
\addtocontents{lof}{\protect\afterpage{\noindent{FIGURE}~\hfill{Page}\par\medskip}} %command to enable second page "PAGE" in
\addtocontents{lof}{\protect\afterpage{~\hfill \par\medskip}}
\multido{\i=1+1}{20}{\captionof{figure}{some caption}}
\addtocontents{toc}{~\hfill\textbf{Page}\par}
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\addtocontents{toc}{\protect\afterpage{~\hfill\textbf{Page}\par\medskip}}
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\addtocontents{toc}{\protect\afterpage{~\hfill\textbf{Page}\par\medskip}}
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\section{foo}bar\clearpage
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.