I'm writing up my bachelors thesis. I have used the appendix{} command i.e.,
\newpage\chead{Appendix}\begin{appendices}\numberwithin{equation}{section}
and I have a lot of sections in the appendix. The section where I reference mathematical concepts is no problem as I'm just writing and adding equations and defintions. I do have a section where I add PDF files of MATLAB code I generated for the paper. When I add the boxed in PDF figure, its not where it should be. This is the code:
\newpage\rhead{Matlab Code}\section{Matlab Code}\label{sec:MatlabCode}
% Appendix: Penalty Function --------------------------------------------------------
\subsection{Penalty Function}\label{code:MatlabPenalty}
\begin{figure}
\centering
\setlength\fboxsep{0pt}
\setlength\fboxrule{0.5pt}
\fbox{\includegraphics[trim=0.5cm 2.5cm 2.25cm 2.0cm,clip=true,scale=0.6]{MLB_Code_Penalty}}
\caption{"Penalty Function"}
\end{figure}
The figure is displaced. I've not had this problem when I just added an appendix by simply creating a new section{}. Any Advice.
\frameinstead of\fbox. – Martin Schröder May 03 '13 at 11:34matlab-prettifierpackage; see this answer. – jub0bs Apr 28 '14 at 17:10