summaryrefslogtreecommitdiff
path: root/support/autolatex/sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/autolatex/sty
Initial commit
Diffstat (limited to 'support/autolatex/sty')
-rw-r--r--support/autolatex/sty/autolatex.sty109
1 files changed, 109 insertions, 0 deletions
diff --git a/support/autolatex/sty/autolatex.sty b/support/autolatex/sty/autolatex.sty
new file mode 100644
index 0000000000..1ed46faa42
--- /dev/null
+++ b/support/autolatex/sty/autolatex.sty
@@ -0,0 +1,109 @@
+% autolatex - autolatex.sty
+% Copyright (C) 1998-2013 Stephane Galland <galland@arakhne.org>
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; see the file COPYING. If not, write to
+% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+% Boston, MA 02111-1307, USA.
+%
+% Creation date: 2006-08-23
+% Modifications:
+%
+
+\global\edef\autolatex@package@ver{2013/12/23}
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{autolatex}[\autolatex@package@ver]
+
+\RequirePackage{graphicx}
+\RequirePackage{xkeyval}
+\RequirePackage{tikz}
+
+%----------------------------------------
+% IMAGES INCLUDING TEX EXPRESSIONS
+%----------------------------------------
+
+\define@key[autolatex]{withtex}{width}{%
+ \gdef\@autolatex@wtfig@width{#1}%
+}
+\define@key[autolatex]{withtex}{height}{%
+ \gdef\@autolatex@wtfig@height{#1}%
+}
+
+%-----
+%\DeclareGraphicsExtensionsWtex{coma separated extensions}
+\providecommand{\DeclareGraphicsExtensionsWtex}[1]{%
+ \xdef\@autolatex@wtfig@extensions{\zap@space#1 \@empty}%
+}
+\DeclareGraphicsExtensionsWtex{.pdftex_t,.pstex_t,.pdf_tex,.ps_tex}
+
+\providecommand{\@autolatex@wtfig@searchinpath}[1]{%
+ \IfFileExists{#1}{%
+ \protected@edef\@autolatex@wtfig@tmp{\protect\resizebox{\@autolatex@wtfig@width}{\@autolatex@wtfig@height}{\protect\input{#1}}}%
+ }{%
+ \@for\@autolatex@wtfig@pathtmp:=\Ginput@path\do{%
+ \ifx\@autolatex@wtfig@tmp\relax%
+ \IfFileExists{\@autolatex@wtfig@pathtmp#1}{%
+ \protected@edef\@autolatex@wtfig@tmp{\protect\resizebox{\@autolatex@wtfig@width}{\@autolatex@wtfig@height}{\protect\input{\@autolatex@wtfig@pathtmp#1}}}%
+ }{}%
+ \fi%
+ }%
+ }%
+}
+
+%-----
+%\includefigurewtex[width=xx,height=yy]{filename}
+\providecommand{\includefigurewtex}[2][width=\linewidth]{%
+ \begingroup%
+ \gdef\@autolatex@wtfig@width{!}%
+ \gdef\@autolatex@wtfig@height{!}%
+ \setkeys[autolatex]{withtex}{#1}%
+ %
+ \global\let\@autolatex@wtfig@tmp\relax%
+ \global\let\@autolatex@wtfig@ext\relax%
+ \global\let\@autolatex@wtfig@path\relax%
+ \filename@parse{#2}%
+ \ifx\filename@ext\relax%
+ \@for\@autolatex@wtfig@exttmp:=\@autolatex@wtfig@extensions\do{%
+ \expandafter\@autolatex@wtfig@searchinpath{#2\@autolatex@wtfig@exttmp}%
+ }%
+ \else%
+ \expandafter\@autolatex@wtfig@searchinpath{#2}%
+ \fi%
+ %
+ \ifx\@autolatex@wtfig@tmp\relax%
+ \errmessage{Package autolatex: File not found '#2', needed for figure inclusion.}%
+ \else%
+ \@autolatex@wtfig@tmp%
+ \fi%
+ %
+ \endgroup%
+}
+
+\global\let\includegraphicswtex\includefigurewtex
+
+%----------------------------------------
+% IMAGES WITH LAYERS
+%----------------------------------------
+
+%\includeanimatedfigure[width=xx,height=yy]{filename}
+\global\let\includeanimatedfigure\includegraphicswtex
+
+%----------------------------------------
+% IMAGES WITH LAYERS AND COMBINED TEX
+%----------------------------------------
+
+%\includeanimatedfigurewtex[width=xx,height=yy]{filename}
+\global\let\includeanimatedfigurewtex\includegraphicswtex
+
+\endinput