Questions tagged [lastpage]

{lastpage} puts the label LastPage (\AtEndDocument) into the .aux file, allowing the user to refer to the last page of a document. This might be particularly useful in places like headers or footers.

88 questions
10
votes
1 answer

How to perform mathematical operation in latex?

I am new to LaTeX. I'm working on some sample LaTeX examples. The sample I want to create a progress bar in my document. My sample code is shown below. Any help would be…
PSK
  • 1,032
8
votes
2 answers

After recent update of MikTeX, ! Package totpages Error: Can't use both, lastpage and totpages

\documentclass[12pt, a4paper]{article} \usepackage{amsmath} \usepackage{adjustbox} % uses graphicx \usepackage[top=1.8cm,bottom=1.8cm,left=0.88cm,right=0.88cm]{geometry} \usepackage{fancyhdr} \usepackage{lastpage} %\usepackage[ % type={CC}, % …
CasperYC
  • 683
3
votes
1 answer

How to get second last page as a number without hyperref?

I'm trying to get the second last page as a number but without having to create a hyperlink to it. What I have now is: \def\leavesecond#1#2#3!{#2} \makeatletter \AtBeginDocument{% \expandafter\ifx\csname r@LastPage\endcsname\relax …
user80175
  • 33
  • 5
2
votes
1 answer

Writing value of LastPage to external file

How can I write the final value of LastPage (\pageref{LastPage}) to an external file (knowing that it needs 2-3 compiliations of the document)? (I need it to adapt a .cls file.) [Update 2016-01-29, 13:30] Found the following solution using the…
m42
  • 21
1
vote
2 answers

How can I control automatically the minimum number of lines(5 lines) in last page when it ends with reference list?

How can I control automatically the minimum number of lines(5 lines) in last page when it ends with reference list? \documentclass{article} \begin{document} Hello, here is some text without a meaning. This text should show what a printed text…
Uvaraj
  • 61
1
vote
1 answer

How can I correct the \pageref{LastPage} in this file?

I use packages lastpage and answer to make multiple choice. This is my code \documentclass[12pt,a4paper]{article} \usepackage{graphicx} \usepackage{fouriernc} \usepackage{amsmath,amssymb,amsthm} \usepackage{xparse} \usepackage[paperwidth=21cm,…
0
votes
0 answers

How can I control the minimum number of lines in last page?

How can I control the minimum number of lines(5 lines) in last page? \documentclass{article} \begin{document} Hello, here is some text without a meaning. This text should show what a printed text will look like at this place. If you read this…
Uvaraj
  • 61
0
votes
1 answer

Error with the lastpage package

Can somebody help me with this error: LaTeX /b/c12/cWarning:/b/c0/c Reference `lastpage' on page 1 undefined on input line 24. /b/c4/cOverfull/b/c0/c \hbox (9.14719pt too wide) has occurred while \output is active [][] ! Missing number, treated as…
rinaldi
  • 11