diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-07 22:51:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-07 22:51:06 +0000 |
commit | 187167fedfccae89ebeb38445a0ddb3b1df5afa6 (patch) | |
tree | e5919724d431b36eab01e1ca29651664c2ac48a0 /Master/texmf-dist/source/latex/easyfig | |
parent | d543752477df00db9845d783c27fd913a48c6f73 (diff) |
easyfig 1.1 (7may12)
git-svn-id: svn://tug.org/texlive/trunk@26247 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/easyfig')
-rw-r--r-- | Master/texmf-dist/source/latex/easyfig/easyfig.dtx | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/easyfig/easyfig.dtx b/Master/texmf-dist/source/latex/easyfig/easyfig.dtx index 02576e385b5..eecb3431ef5 100644 --- a/Master/texmf-dist/source/latex/easyfig/easyfig.dtx +++ b/Master/texmf-dist/source/latex/easyfig/easyfig.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment %<=*COPYRIGHT> -%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer.me> -%% --------------------------------------------------------------------------- +%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de> +%% ---------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. @@ -24,10 +24,10 @@ %<*driver> \ProvidesFile{easyfig.dtx}[% %<=*DATE> - 2011/10/31 + 2012/05/06 %<=/DATE> %<=*VERSION> - v1.0 + v1.1 %<=/VERSION> Easily include images as figures] \documentclass{ydoc} @@ -66,7 +66,8 @@ % Right brace \} Tilde \~} % % -% \changes{<+version+>}{<+date+>}{<+log+>} +% \changes{v1.0}{2011/10/31}{Initial release.} +% \changes{v1.1}{2012/05/06}{Fix of "placement" key and non-e-TeX fallback code.} % % \DoNotIndex{\newcommand,\newenvironment} % @@ -201,22 +202,23 @@ % \section{Examples} % % \subsubsection{Simple figure with an image and caption, automated label} -% A default label `|fig:tiger|' is used here. +% A default label `|fig:image|' is used here. % \par\smallskip\noindent -% \Macro\Figure['width=5cm,caption={A tiger}']{tiger} -% \Figure[width=5cm,caption={A tiger}]{tiger} +% \Macro\Figure['width=5cm,caption={An image}']{image} +% \Figure[width=5cm,caption={An image}]{image} % % \subsubsection{Simple figure with an image and caption, manual label} % Normal usage with a manual label. % \par\smallskip\noindent -% \Macro\Figure['width=5cm,caption={Second tiger},label=fig:mytiger']{tiger} -% \Figure[width=5cm,caption={Second tiger},label=fig:mytiger]{tiger} +% \Macro\Figure['width=5cm,caption={Second image},label=fig:myimage']{image} +% \Figure[width=5cm,caption={Second image},label=fig:myimage]{image} % % \subsubsection{Usage of other keys} % Adds a frame around the image which is rotated a little. +% The placement is fixed to top or bottom. % \par\smallskip\noindent -% \Macro\Figure['width=5cm,angle=10,caption={Another tiger},frame']{tiger} -% \Figure[width=5cm,angle=10,caption={Another tiger},frame]{tiger} +% \Macro\Figure['width=5cm,angle=10,position=tb,caption={Another image},frame']{image} +% \Figure[width=5cm,angle=10,placement=tb,caption={Another image},frame]{image} % % \StopEventually{} % \clearpage @@ -380,10 +382,11 @@ \unexpanded{#1},% \easyfig@expandonce\easyfig@default@end }% + }% + \@tempa + \edef\@tempa{% \noexpand\begin\easyfig@env% - \ifx\easyfig@placement\@empty\else - [\easyfig@placement]% - \fi + \easyfig@placement }% \@tempa \easyfig@captionabove{#2}% @@ -412,7 +415,7 @@ \expandafter\expandafter\expandafter\toks@ \expandafter\expandafter\expandafter{\expandafter\the\expandafter\toks@\expandafter,\easyfig@default@end}% \expandafter\@tempa\expandafter{\the\toks@} - \edef\@tempa{\noexpand\begin{\easyfig@env}}% + \edef\@tempa{\noexpand\begin\easyfig@env}% \expandafter\@tempa\easyfig@placement \easyfig@captionabove{#2}% \def\@tempa{\begin{adjustbox}}% |