summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/upmethodology
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-29 15:40:51 +0000
committerKarl Berry <karl@freefriends.org>2013-06-29 15:40:51 +0000
commitca7ff804e960139b4f0780cc62bf624aa49dbeb5 (patch)
tree058cff67e7f0409293a60bb300aee3a1eb218bef /Master/texmf-dist/tex/latex/upmethodology
parentf947fc5dcc8614464257532183cf33dde5becf4d (diff)
upmethodology (30may13)
git-svn-id: svn://tug.org/texlive/trunk@31041 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/upmethodology')
-rw-r--r--Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty73
1 files changed, 69 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty
index fc12b75de3c..ebcd85c226e 100644
--- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty
+++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty
@@ -19,6 +19,7 @@
%
% Creation date: 2006-04-06
% Modifications (lastest first):
+% 2013-05-30 Add macro \includegraphicswtex, which is supporting 'pdftex_t' and 'pstex_t'.
% 2013-05-18 Replace the image extension 'pstex_t' by 'pdftex_t'.
% 2013-05-17 Define the default graphic extensions: pdf, png, jpg, jpeg, tiff, gif.
% Define the default graphic search path to the current directory.
@@ -52,7 +53,7 @@
% Bug fix: centering table's headers.
%
-\global\edef\upm@package@fmt@ver{2013/05/18}
+\global\edef\upm@package@fmt@ver{2013/05/30}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-fmt}[\upm@package@fmt@ver]
@@ -131,6 +132,7 @@
\RequirePackage{varioref}
\RequirePackage{txfonts}
\RequirePackage{relsize}
+\RequirePackage{keyval}
%----------------------------------------
% Exponent and indice
@@ -253,7 +255,68 @@
% IMAGES INCLUDING TeX EXPRESSIONS
%----------------------------------------
-\gdef\upm@figtex@remove@width@param#1{#1}
+% Private macros for \includegraphicswtex
+\providecommand{\upm@figtex@includewtex@extensions}{}
+\define@key{upmethodologyincludewtex}{width}{%
+ \gdef\upm@figtex@includewtex@width{#1}%
+}
+\define@key{upmethodologyincludewtex}{height}{%
+ \gdef\upm@figtex@includewtex@height{#1}%
+}
+
+%
+\newcommand{\upm@figtex@includewtex@searchinpath}[1]{%
+ \IfFileExists{#1}{%
+ \protected@edef\upm@figtex@includewtex@cmd{\protect\resizebox{\upm@figtex@includewtex@width}{\upm@figtex@includewtex@height}{\protect\input{#1}}}%
+ }{%
+ \@for\upm@figtex@includewtex@pathtmp:=\Ginput@path\do{%
+ \ifx\upm@figtex@includewtex@cmd\relax%
+ \IfFileExists{\upm@figtex@includewtex@pathtmp#1}{%
+ \protected@edef\upm@figtex@includewtex@cmd{\protect\resizebox{\upm@figtex@includewtex@width}{\upm@figtex@includewtex@height}{\protect\input{\upm@figtex@includewtex@pathtmp#1}}}%
+ }{}%
+ \fi%
+ }%
+ }%
+}
+
+%-----
+%\DeclareGraphicsExtensionsWtex{coma separated extensions}
+\providecommand{\DeclareGraphicsExtensionsWtex}[1]{%
+ \xdef\upm@figtex@includewtex@extensions{\zap@space#1 \@empty}%
+}
+\DeclareGraphicsExtensionsWtex{.pdftex_t,.pstex_t}
+
+%-----
+%\includefigurewtex{width=xx,height=yy}{filename}
+\providecommand{\includegraphicswtex}[2][width=\linewidth]{%
+ \begingroup%
+ \gdef\upm@figtex@includewtex@width{!}
+ \gdef\upm@figtex@includewtex@height{!}
+ \setkeys{upmethodologyincludewtex}{#1}%
+ %
+ \global\let\upm@figtex@includewtex@cmd\relax%
+ \filename@parse{#2}%
+ \ifx\filename@ext\relax%
+ \@for\upm@figtex@includewtex@exttmp:=\upm@figtex@includewtex@extensions\do{%
+ \upm@figtex@includewtex@searchinpath{#2\upm@figtex@includewtex@exttmp}%
+ }%
+ \else%
+ \upm@figtex@includewtex@searchinpath{#2}%
+ \fi%
+ %
+ \ifx\upm@figtex@includewtex@cmd\relax%
+ \errmessage{Package autolatex: File not found '#2', needed for figure inclusion.}%
+ \else%
+ \upm@figtex@includewtex@cmd%
+ \fi%
+ %
+ \endgroup%
+}
+
+%----------------------------------------
+% ENVIRONMENT FOR IMAGES INCLUDING TeX EXPRESSIONS
+%----------------------------------------
+
\gdef\upm@figtex@dyncaption@remove{}
\gdef\upm@figtex@figremove#1{%
\global\expandafter\let\csname FIG#1\endcsname\relax%
@@ -278,7 +341,7 @@
\newcommand{\upm@mfigurewtex}[5][ht]{
\begin{figure}[#1]%
\begin{center}%
- \resizebox{\upm@figtex@remove@width@param{#2}}{!}{\input{#3.pdftex_t}}%
+ \includegraphicswtex[width=#2]{#3}%
\caption{#4}%
\label{fig:#5}%
\end{center}%
@@ -288,7 +351,7 @@
\newcommand{\upm@mfigurewtexstar}[5][ht]{
\begin{figure*}[#1]%
\begin{center}%
- \resizebox{\upm@figtex@remove@width@param{#2}}{!}{\input{#3.pdftex_t}}%
+ \includegraphicswtex[width=#2]{#3}%
\caption{#4}%
\label{fig:#5}%
\end{center}%
@@ -299,6 +362,8 @@
%\mfigurewtex[position]{width}{filename}{caption}{label}
\def\mfigurewtex{\@ifstar\upm@mfigurewtexstar\upm@mfigurewtex}
+
+
%----------------------------------------
% TABLES
%----------------------------------------