TeX - LaTeX Asked by kjsfld on February 16, 2021
I’ve created a revision history table in my document to track a high-level description of the various changes. The footer also lists the revision number so every page has an instant identifier of what version of the document it is.
Unfortunately, the version number in the footer is manually updated.
Q) Is there a way to have the footer automatically reference the latest revision number?
My footer currently says
fancyfoot[C]{footnotesize thepage \ [document_name] 2.2.0 \ today }
I am using fancyhdr
.
The revision history is currently maintained in a table and looks like this where the description of the changes of each revision is on a new line.
begin{longtable}{| m{1.5cm} | m{3.5cm} | m{5.0cm} | m{8.0cm} |}
Issue No. & Issue Date & Approver & Description of changes \ hline
endfirsthead
1.0.0 & [date] & [approver] &
[description of 1.0.0]
\ hline
1.1.0 & [date] & [approver] &
[description of 1.1.0]
\ hline
2.0.0 & [date] & [approver] &
[description of 2.0.0]
\ hline
2.1.0 & [date] & [approver] &
[description of 2.1.0]
\ hline
2.2.0 & [date] & [approver] &
[description of 2.2.0]
\ hline
I would like the footer to automatically know to reference the latest rev number (so when I create an entry for 2.2.1, 2.3.0, or 3.0.0, the footer is automatically updated as opposed to requiring me to update both the table and the footer).
I saw some posts about the vhistory
package but I didn’t see anything mentioning a capability to smartly reference an entry in the vhistory
table. Does vhistory
actually have that capability (and if so, how do I initiate the referencing)?
Editing to include a MWE per campa’s request:
% !TeX spellcheck = en_US
documentclass{article}
usepackage{hyperref}
usepackage{longtable}
usepackage{pdflscape}
usepackage{fancyhdr}
usepackage{array}
begin{document}
title{my title}
author{team name}
date{today}
maketitle
thispagestyle{fancy}
pagestyle{fancy}
fancyfoot[C]{footnotesize thepage \ document name 2.2.0 \ today }
begin{center}
begin{landscape}
begin{longtable}{| m{1.5cm} | m{3.5cm} | m{5.0cm} | m{8.0cm} |}
hline
Issue No. & Issue Date & Approver & Description of changes \ hline
endfirsthead
1.0.0 & [date] & [approver] &
[description of 1.0.0]
\ hline
1.1.0 & [date] & [approver] &
[description of 1.1.0]
\ hline
2.0.0 & [date] & [approver] &
[description of 2.0.0]
\ hline
2.1.0 & [date] & [approver] &
[description of 2.1.0]
\ hline
2.2.0 & [date] & [approver] &
[description of 2.2.0]
\ hline
end{longtable}
end{landscape}
end{center}
end{document}
I am looking for a way to reference the largest number in the table. Would it be easier if I reversed the direction of the rev history (i.e. put 2.2.0 at the top and display the changes in reverse chronological order)? Is there some way to smartly reference the highest number of the rev history? Would I need to change from a table to some other format (which is an option if it provides a better solution)?
Thanks.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP