Journal home page
General information
Submit an item
Download style files
Copyright
Contact us
logo for The PracTeX Journal TUG logo

Ask Nelly:
      How can I have the footnote counter reset for each page?
      How can I have a mixed equation/page reference?

The Editors

Abstract


Ask Nelly is a question and answer column. Nelly is the quiet person who sits at the back corner desk, who knows a lot, and when asked any question is always ready with a patient answer. If Nelly doesn't know the answer, Nelly will know an expert who has the answer. Feel free to Ask Nelly about any aspect of LaTeX, TeX, Context, etc.


tpjlogo

Q: Dear Nelly: In my document I use many footnotes. Is there a way  to reset the  footnote counter whenever I begin a new page?

A: There are several packages performing this task. I will mention only one which, in my opinion is both the best and the simplest to use, namely perpage. As a bonus, this package can reset any counter, not only the footnote counter. The package can fe found on the CTAN and is loaded with a simple \usepackage command.  Then  you put a command  \MakePerPage{footnote}. If you want to apply the procedure to another counter, you just substitute footnote  with the name of the respective counter. By default, on each page, the counter restarts from 1. If you you would rather like to restart with another value, you can do that by using a command like  \MakePerPage[2]{footnote}, which will force the counter to start with the value 2 on each page. Of course, this usually make sense only if you redefine  the footnote counter to use symbols rather than numbers. More information can be found in the documentation of the package.

The above question was answered by  Paul Blaga, , a member of the editorial board of this journal.

tpjlogo

Q: Dear Nelly: I'm writing  a book with a large number of  numbered equation. Is there a way  to  refer  both to an equation and to the page on which the equation lies?

A: Yes, there is. You have to load the package varioref  (you can find it on CTAN, it belongs to the tools bundle), which provides, among other commands, the command \vref, whose syntax is identical to the syntax of the \ref command. The effects varies:

  • If the reference and the label are on the same page, \vref acts exactly as \ref;
  • If between the page with the reference and the page with the label there is a difference of just one unit, then after the result of the command \ref (well, \vref, actually)  there is  inserted one of the following comments:
    • "on the preceding page", if the label is on the previous page;
    • "on the following page", if the label is on the next page;
    • "on the facing page", if the numbering of pages is normal (arabic), the "twoside" option is active and the reference is on the left page and the label on the right page or the other way around.
  • If between the page with the reference and the page with the label there is a difference of more than one unit, than after the result of the command \ref  there is inserted the comment "on the page" followed by the number of the page containing the label.

The above question was answered by  Paul Blaga, , a member of the editorial board of this journal.

tpjlogo


Page generated June 9, 2010 ; TUG home page; join TUG/renew membership; webmaster; facebook; x; mastodon.