Hello everybody, I have footnotes repeatedly cross-referencing to a portion of text spanning various pages. Is it possible to automatize the process so that I get page numbers hinting to the portion of text at issue?
\documentclass{book}
\begin{document}
\chapter{Foreword}
% Portion of text at issue begins here
This is the first page of the foreword
\clearpage
This is the second page of the foreword
% Portion ends here
\chapter{Epilogue}
This is the epilogue\footnote{See pages %Insert here command which spawns page numbers
}
\end{document}
\documentclass{book}
\usepackage{blindtext}
\begin{document}
\chapter{Foreword}
% Portion of text at issue begins here
\label{start}
\blindtext[9]
\label{end}
\chapter{Epilogue}
This is the epilogue\footnote{See
pages \pageref{start} to \pageref{end}}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Thanks Johannes_B, it works wonderfully. If you know a more elegant way to achieve the same result, please let me know, but as far as I'm concerned I'm satisfied with your hint.
\documentclass{report}%JB just for the example
\usepackage{blindtext}
\usepackage[english]{babel}
\usepackage{varioref}
\usepackage{nameref}
\begin{document}
\chapter{Foreword}
\label{start}
\blindtext[9]
\label{end}
\chapter{Epilogue}
This is the epilogue See pages \pageref{start} to \pageref{end}
You can find the foreword on \vpagerefrange{start}{end}
See the section on \nameref{chap:sugarSpice}
\vpagerefrange{singlepagestart}{singlepageend}.
\chapter{Sugar and Spice}
\label{chap:sugarSpice}
\label{singlepagestart}
\blindtext%[7]%JB: not any more on one page, try it out
\label{singlepageend}
See the section on \nameref{chap:sugarSpice}
\vpagerefrange{singlepagestart}{singlepageend}.
\clearpage
See the section on \nameref{chap:sugarSpice}
\vpagerefrange{singlepagestart}{singlepageend}.
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.