2

I often use the extract package to automatically generate an external file with all the url of a Beamer presentation using \begin{extract}...\end{extract} outside frames and it works well. However my documents use \includegraphics or \input{Tikz}that I wrap in a \resizebox{\textwidht}{!}. I'd like to create an extract of all my graphs in a separate document. Using \begin{extract}...\end{extract} for all the graph does not seem smart in this case. I tried \extractline but it does not seem to work. How shall you I do ? I could directly use the images but they come form different folders.

\documentclass{beamer}
\usepackage{lipsum}
\usepackage[active,generate=images.tex,extract-cmd=section]{extract}
\begin{document}
\begin{frame}  
\begin{center}      

\extractline        \includegraphics[\textwidth]{example-image-a}
    \end{center}
\end{frame}

\begin{frame}  
    \begin{center}      
\extractline        \includegraphics[\textwidth]{example-image-b}
    \end{center}
\end{frame}

\begin{frame}  
\lipsum
\end{frame}

\begin{frame}  
    \begin{center}      
\extractline \includegraphics[\textwidth]{example-image-c}
    \end{center}
\end{frame}

\begin{frame}  
    \begin{center}      
\extractline        \includegraphics[\textwidth]{example-image-d}
    \end{center}
\end{frame}


\end{document}
  • I found a partial solution. I create a new command \NewCom that wrapped the figure. I can use \usepackage[active,generate=ExtractFile.tex,,extract-cmdline=NewCom]{extract} to extract all the figures wrapped in \NewCom. There must be a more clever way to proceed. – Julien-Elie Taieb Jan 29 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.