% EXPLANATION AND EXAMPLES OF NEWCOMMANDS % CREATED FOR THE NMM WORKSHOP AT PZI % COULD YOU PLEASE TRANSLATE THE EXPLANATIONS IN YOUR NATIVE LANGUAGE \section{flexcommentbox} \subsection{use} This command creates a box that can be moved around the page. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CODE BLOCK USING THE PACKAGE LSTLISTING % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THIS IS THE CODE FOR THE COMMAND AND % % INCLUDED AS EXAMPLE % % SPECIAL CHARACTERS ESCAPED % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \codeline{language=TeX}{\\flexcommentbox\{.5\\paperwidth\}\{.5\\paperheight\}\{.5\\textwidth\}\{\\color\{white\}content here\}} \codeline{language=TeX}{\\flexcommentbox\{1\}\{2\}\{3\}\{4\}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{itemize} \item \textbf{1} is the X position \item \textbf{2} is the Y position \item \textbf{3} is the width \item \textbf{4} is what is inside (not outside) the box \end{itemize} Height adjusts to the content of the box. \subsection{macro code} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % CODE BLOCK USING THE PACKAGE LSTLISTING % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THIS IS THE CODE FOR THE COMMAND AND % % INCLUDED AS EXAMPLE % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \lstset{language=TeX} \begin{lstlisting} \newcommand\flexcommentbox[4] {% \deffootnote[1.5em]{1.5em}{1em}{\textsuperscript{}} \footnotetext{ \setlength\fboxsep{10pt}% \vspace{#2} \makebox[.5\textwidth][l]{ \hspace{#1} \parbox{#3}{ \vspace{-1\textheight} \colorbox{white}{% {\small \parbox{#3}{ \smallskip #4 % \smallskip } } } } } } } \end{lstlisting} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newpage \thispagestyle{empty} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % HERE THE EXAMPLE IS INCLUDED AS COMMAND % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % X POSITION Y POSITION WIDTH \flexcommentbox{.1\textwidth}{.3\textheight}{\textwidth} {\color{white}\codeinline{language=TeX}{\\flexcommentbox\{.1\\textwidth\}\{.2\\textheight\}\{.5\\textwidth\}\{\}}} % X POSITION Y POSITION WIDTH \flexcommentbox{.5\textwidth}{-.2\textheight}{.8\textwidth} {\color{white}\codeinline{language=TeX}{\\flexcommentbox\{.5\\textwidth\}\{-.2\\textheight\}\{.5\\textwidth\}\{\}}} \flexcommentbox{.2\textwidth}{.3\textheight}{.5\textwidth} {This is a test} \renewcommand\flexcommentbox[4] {% \deffootnote[1.5em]{1.5em}{1em}{\textsuperscript{}} \footnotetext{ \setlength\fboxsep{15pt}% \vspace{#2} \makebox[.5\textwidth][l]{ \hspace{#1} \parbox{#3}{ \vspace{-1\textheight} \colorbox{red}{% {\small \parbox{#3}{ \smallskip #4 % \smallskip } } } } } } } \flexcommentbox{.2\textwidth}{.3\textheight}{.5\textwidth} {This is a test}