Suppose that we have three .tex files in one folder called PhDThesis.tex, Synopsis.tex and conclusion.tex. There is also one bib-file called my_bibio.bib
In Synopsis we have a short description of PhDThesis. The conclusion is added both in Synopsis and in PhD_thesis.
We need to cite in Synopsis some total counts from PhD_thesis:
- chapters
- references (generated by biber)
- figures
- tables
- pages of full text (the last page of the PhD)
- pages of appendix (difference between 1st and last pages)
- pages of full text without appendix (the last page of conclusion)
At the same time it would be great to cite some Equations and Propositions in PhDThesis from Synopsis. Hyperref package using is desirable to refer on the PhDThesis from a beamer presentation. Some questions are described here
To avoid some unexpected further difficulties with hyperref I would prefer to see both a variant without hyperref and with this package.
I guess that we can use somehow xr package.
Here is a link about application of this package to cite some labeled equations, propositions e.c.t. It works good in MWE.
Here is a link about totalcount and totcount for counting of total numbers of tables&figures, and references, respectively.
totalcount package works good with xr, however I can not reference total value like \ref{I-totalfigures}
, \ref{I-totalpropositions}
or \ref{I-totaltables}
.
xr package doesn't want to work with totcount package at all! xr-hyperref doesn't want to work either, see please this page
One general solving is described here however I do not prefer to create a great number of counters and to have a complex way of theirs using.
Moreover I can't imagine how to save a difference of two \pagerefs
to form a total count of pages in appendix.
Current view of Synopsis with highlighted desirable values of counters. How to fill these values?
MWE
PhDThesis.tex
%\def\bibcite{\stepcounter{citenum}\oldcite}
%total count of figures and tables
% works good with xr package, however how to use this with xr package?!
\usepackage[figure,table]{totalcount}
% different from totcount, and not on CTAN. Found at
% http://www.mrunix.de/forums/showpost.php?p=257537&postcount=10
% Reference: http://www.latex-community.org/forum/viewtopic.php?f=5&t=9028
\begin{document}
\chapter{Approaches to the PhD problems} \label{chapt1}
\begin{figure}[ht]
\caption{First thesis figure}
\label{thesis-fig-first}
\end{figure}
\begin{figure}[ht]
\caption{Second thesis figure}
\label{thesis-fig-second}
\end{figure}
\begin{table}[ht]
\caption{First thesis table}
\label{thesis-tab-first}
\end{table}
\begin{table}[ht]
\caption{Second thesis table}
\label{thesis-tab-second}
\end{table}
\chapter{The core of PhD thesis} \label{chapt2}
\begin{propn}\label{thesis-prop-setminus}
$A \setminus B = C$
\end{propn}
\begin{propn}\label{thesis-prop-cup}
$A\cup B = C$
\end{propn}
\begin{equation}\label{thesis-eq-closure}
A = \overline{\overline{A}}
\end{equation}
\begin{equation}\label{thesis-eq-cap}
A\cap B = C
\end{equation}
Here we should mention two interesting papers \cite{firstPaper} and \cite{secondPaper}.
This document contains \totalfigures{} figures, \totaltables{} tables, and
%\total{citenum} reference (possibly with multiple citations). % does not want to work with xr package
\newpage
\include{conclusion}
\printbibliography
\newpage
\chapter{Appendix} \label{AppendixRef}
This is appendix
\label{thesis-app-last-page}
\end{document}
Synopsis.tex
\documentclass[a5paper,10pt,twoside,openany,article]{memoir}
\usepackage{amsmath, amsthm, amssymb}
\newtheorem{prop}{Proposition}
\usepackage{xr}
\externaldocument[I-]{PhDThesis}
%unfortunately hyperref variant does not want to work
%this example is taken from: https://tex.stackexchange.com/questions/41539/does-hyperref-work-between-two-files
%\usepackage{xr-hyper}
%\usepackage{hyperref}
%\externaldocument[I-]{docPhDThesis}[PhDThesis.pdf]% <- full or relative path
\begin{document}
Here we need to mention that there are XXX chapters, XXX references, XXX figures, and XXX tables, XXX propositions in PhDThesis. PhDThesis consists of \ref{I-thesis-app-last-page} total pages, and XXX pages of Appendix, and \ref{I-common-concl-last-page} pages without Appendix.
The following proposition has \ref{I-thesis-prop-cup} number in PhDThesis.
\begin{prop}
$A\cup B = C$
\end{prop}
Here we need to mention, that \eqref{syn-eq-cap} equation is equal to equation, which has \eqref{I-common-concl-eq-cap} number in common conclusion on page \pageref{I-common-concl-eq-cap} in PhDThesis. However the same equation has also \eqref{common-concl-eq-cap} number in common conclusion on page \pageref{common-concl-eq-cap} in Synopsis.
\begin{equation}\label{syn-eq-cap}
A\cap B = C
\end{equation}
\input{conclusion.tex}
\end{document}
conclusion.tex
This is a short description of PhDThesis results. The current part of the text is from the common conclusion of PhDThesis and Synopsis.
\begin{equation}\label{common-concl-eq-cap}
A\cap B = C
\end{equation}
\label{common-concl-last-page}
my_biblio.bib
@INCOLLECTION{firstPaper,
author = {FirstAuthor, Name},
title = {Interesting first paper}
}
@INCOLLECTION{secondPaper,
author = {FirstAuthor, Name},
title = {Interesting second paper}
}
UPT Finally, I cope with problems in real-life complex tex-file! Many thanks to Heiko Oberdiek, Werner, Piet van Oostrum and Ulrich Diez.
Additionally to this question we discussed a question about total literature counter, a question about saving the values of zref counter on the side of a client tex-file, and a question about counting appendices and chapters