In my master document I have (in TeXnicCenter):
\appendix
\input{Appendix1}
\newpage
\input{Appendix2}
etc.
And in my Appendix documents (I am using article class):
\section{Name of the Appendix}
\label{sec:Appendix1}
And then it appears as Appendix A, Appendix B, etc. in the document and in the TOC.
2- You can use the restatable
environment provided by thmtools
.
1- Since the environment generates an anchor, you can use the standard \label
, \ref
(\pageref
) mechanism for cross-referencing.
A complete example:
\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools, thm-restate}
\usepackage{hyperref}
\declaretheorem{theorem}
\begin{document}
\section{Test Section}
\begin{theorem}
Test theorem
\end{theorem}
\begin{restatable}[Fundamental Theorem of Algebra]{theorem}{fta}
\label{thm:FTA}
Every non-constant single-variable polynomial with complex coefficients has at least one complex root.
\end{restatable}
\appendix
\section[Proof of the Fundamental Theorem of Algebra]{Proof of Theorem~\ref{thm:FTA} (See page~\pageref{thm:FTA})}
\fta*
\begin{proof}
Assume...
\end{proof}
\end{document}
Now that the question has been edited, and the used document class is known, here's a solution using the vldb
document class (the link to the class can be found in the question):
\documentclass{vldb}
\usepackage{textcase}
\usepackage{thmtools,thm-restate}
\usepackage{hyperref}
\makeatletter
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
\let\@svsec\@empty
\else
\refstepcounter{#1}%
\edef\@svsec{%
\begingroup
%\ifnum#2>2 \noexpand\rm \fi % changed to next 29 July 2002 gkmt
\ifnum#2>2 \noexpand#6 \fi
\csname the#1\endcsname
\endgroup
\ifnum #2=1\relax .\fi
\hskip 1em
}%
\fi
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@
\begingroup
#6\relax
\@hangfrom{\hskip #3\relax\@svsec}%
\begingroup
\interlinepenalty \@M
\if@uchead
\MakeTextUppercase{#8}% HERE
\else
#8%
\fi
\par
\endgroup
\endgroup
\csname #1mark\endcsname{#7}%
\vskip -12pt %gkmt, 11 aug 99 and GM July 2000 (was -14) - numbered section head spacing
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7%
}%
\else
\def\@svsechd{%
#6%
\hskip #3\relax
\@svsec
\if@uchead
\uppercase{#8}%
\else
#8%
\fi
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7%
}%
}%
\fi
\@xsect{#5}\hskip 1pt
\par
}
\makeatother
\declaretheorem{theorem}
\begin{document}
\section{Test Section}
\begin{theorem}
Test theorem
\end{theorem}
\begin{restatable}[Fundamental Theorem of Algebra]{theorem}{fta}
\label{thm:FTA}
Every non-constant single-variable polynomial with complex coefficients has at least one complex root.
\end{restatable}
\appendix
\section[Proof of the Fundamental Theorem of Algebra]{Proof of Theorem~\ref{thm:FTA}}
\fta*
\begin{proof}
Assume...
\end{proof}
\end{document}
Explanation:
The problem is that vldb.cls
sets the section (and also part) titles in upper case and uses the old TeX \uppercase
command to this end; this will produce problems if special commands, such as \ref
, are inside the argument of \section
(or \part
) since \uppercase
don't recognize them as special commands and tretas them in the wrong way (the LaTeX command \MakeUppercase
will also behave bad in this regard). To correct this situation, one can redefine (or patch) the internal command \@sect
, to use \MakeTextUppercase
(from the textcase
package), instead of the problematic \uppercase
command. In the example code above, the change was signaled with % HERE
.
Best Answer
Here's a way to refer to starred sections (for the appendix, however!)
Redefine
\section
to step a counter for the starred version as well -- this can be fed tocleveref
with appropiatecref
-names.Alternatively, the command
\nameref
fromhyperref
package is clever enough itself to provide the correct name even for starred sections.Best, don't use starred sections here, this will remove the necessity of numbering them by hand.