LaTeX Resources

Some LaTeX files

Appendix

Add \preappendix before and \postappendix after.

for sections in the appendix use \subsection instead of \section.

\makeatletter


\newcommand\preappendix{%

\appendix

\newcommand{\hbAppendixPrefix}{\Alph{subsection}}


\renewcommand{\thefigure}{\hbAppendixPrefix\arabic{figure}}

\setcounter{figure}{0}

\renewcommand{\thetable}{\hbAppendixPrefix\arabic{table}}

\setcounter{table}{0}

\renewcommand{\theequation}{\hbAppendixPrefix\arabic{equation}}

\setcounter{equation}{0}

\counterwithin{figure}{subsection}

\counterwithin{table}{subsection}

\counterwithin{equation}{subsection}

% \singlespacing

\renewcommand{\thesubsection}{\Alph{subsection}}

\section*{Appendix}\label{sec:Appendix}\addcontentsline{toc}{section}{Appendix}\appendix

}


\newcommand\postappendix{%

% For endfloats

% \newcommand{\hbAppendixPrefix}{\arabic{subsection}}

\renewcommand{\thefigure}{\arabic{figure}}

\setcounter{figure}{0}

\renewcommand{\thetable}{\Roman{table}}

\setcounter{table}{0}

\renewcommand{\theequation}{\arabic{equation}}

\setcounter{equation}{0}

}

\makeatother

Figures in Separate File. - Using "endfloats"

Original file: "<FileName>.tex"

Figures file name: "<FileNameFigs>.tex"


The original file with creates "<FileName>.fff" with all the figures. These are all added at the end of "<FileName>.tex" unless stopped by "\def\processfigures{}", with this, most of the links are now broken. Therefore "\externaldocument" is required.


With the new figures file "<FileNameFigs>.tex", pretty much just need "\input{<FileName>.fff}".

\usepackage{endfloat}

\makeatletter

\def\processfigures{} % Stops Figures from being appended

\makeatother


\usepackage{xr}

\externaldocument{<FileNameFigs>}

\usepackage{endfloat}

% \makeatletter

% \def\processfigures{} % Stop

% \makeatother


\usepackage{xr}

\externaldocument{<FileName>}


...


\begin{document}

\setcounter{page}{x}

\input{<FileName>.fff}

\end{document}

Disclaimer

The content posted on this website are for personal use only. The material is intended for educational purposes only.No part of this may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without prior written permission of the author.The author accepts no liability in any event including (without limitation) negligence for any damages or loss of any kind, including (without limitation) direct, indirect, incidental, special or consequential damages, expenses or losses arising out of, or in connection with your use or inability to use the information in the material. Use this material at your own discretion.