summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-02-21 23:13:39 +0000
committerKarl Berry <karl@freefriends.org>2010-02-21 23:13:39 +0000
commit9f745038d5a6cdd670d76719b21c4d0e38bc5cf5 (patch)
tree2d0bd15d022727fea5c46abb0a04e0efe5d9dbe8 /Master/texmf-dist
parent393a69f1b47ddf7c185311928456eb364cae586b (diff)
preview update (21feb09)
git-svn-id: svn://tug.org/texlive/trunk@17118 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/preview/preview.pdfbin111594 -> 181515 bytes
-rw-r--r--Master/texmf-dist/source/latex/preview/preview.dtx82
-rw-r--r--Master/texmf-dist/tex/latex/preview/prcounters.def4
-rw-r--r--Master/texmf-dist/tex/latex/preview/preview.sty22
-rw-r--r--Master/texmf-dist/tex/latex/preview/prtightpage.def36
5 files changed, 111 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/preview/preview.pdf b/Master/texmf-dist/doc/latex/preview/preview.pdf
index 59a0bcb37f8..12eadb24536 100644
--- a/Master/texmf-dist/doc/latex/preview/preview.pdf
+++ b/Master/texmf-dist/doc/latex/preview/preview.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/preview/preview.dtx b/Master/texmf-dist/source/latex/preview/preview.dtx
index e3961ba7a49..fd834c6f342 100644
--- a/Master/texmf-dist/source/latex/preview/preview.dtx
+++ b/Master/texmf-dist/source/latex/preview/preview.dtx
@@ -2,12 +2,12 @@
%% The preview style for extracting previews from LaTeX documents.
%% Developed as part of AUCTeX <URL:http://www.gnu.org/software/auctex>.
%
-% Copyright (C) 2001, 2002, 2003, 2004, 2005,
-% 2006 Free Software Foundation
+% Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006,
+% 2010 Free Software Foundation
%
% 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
+% the Free Software Foundation; either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
@@ -20,7 +20,7 @@
% Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
% Boston, MA 02110-1301 USA
% \fi
-% \CheckSum{1664}
+% \CheckSum{1758}
% \GetFileInfo{preview.sty}
% \date{\filedate}
% \author{David Kastrup\thanks{\texttt{dak@gnu.org}}}
@@ -31,7 +31,7 @@
% environments (most notably displayed formulas) from \LaTeX\ sources
% as graphics. This works with DVI files postprocessed by either
% Dvips and Ghostscript or dvipng, but it also works when you are
-% using PDF\TeX for generating PDF files (usually also postprocessed
+% using PDF\TeX\ for generating PDF files (usually also postprocessed
% by Ghostscript).
%
% Current uses of the package include the \previewlatex\ package for
@@ -124,6 +124,8 @@
% if possible.
% \item[|pdftex|] If this option is set, PDF\TeX\ is assumed as the
% output driver. This mainly affects the |tightpage| option.
+% \item[|xetex|] If this option is set, Xe\TeX\ is assumed as the
+% output driver. This mainly affects the |tightpage| option.
% \item[|displaymath|] will make all displayed math environments
% subject to preview processing. This will typically be the most
% desired option.
@@ -437,12 +439,12 @@
\NeedsTeXFormat{LaTeX2e} \def\reserved@a #1#2$#3:
#4${\xdef#1{\reserved@c #2#4 $}} \def\reserved@c #1 #2${#1}
\begingroup \catcode`\_=12
-\reserved@a\pr@version $Name: release_11_84 $ \ifx\pr@version\@empty
-\reserved@a\pr@version CVS-$Revision: 1.122 $ \endgroup \else
+\reserved@a\pr@version $Name: release_11_86 $ \ifx\pr@version\@empty
+\reserved@a\pr@version CVS-$Revision: 1.126 $ \endgroup \else
\def\next release_{} \lccode`\_=`.
\edef\next{\lowercase{\endgroup
\def\noexpand\pr@version{\expandafter\next\pr@version}}} \next \fi
-\reserved@a\next $Date: 2006/08/25 10:34:36 $
+\reserved@a\next $Date: 2010/02/14 16:19:00 $
\edef\next{\noexpand\ProvidesPackage{preview}%
[\next\space \pr@version\space (AUCTeX/preview-latex)]}
\next
@@ -588,6 +590,11 @@
% \begin{macrocode}
\DeclareOption{pdftex}{%
\let\pr@graphicstype\tw@}
+% \end{macrocode}
+% And so does the |xetex| option.
+% \begin{macrocode}
+\DeclareOption{xetex}{%
+ \let\pr@graphicstype\thr@@}
%</!active>
% \end{macrocode}
% \end{macro}
@@ -722,7 +729,7 @@
% called. You must not under any circumstances change |\box\pr@box|
% in any way that would add typeset material at the front of it,
% except for PostScript header specials, since the front of
-% |\box\pr@box| may contains stuff from \cmd{\AtBeginDvi}.
+% |\box\pr@box| may contain stuff from \cmd{\AtBeginDvi}.
% \cmd{\pr@ship@end} contains two types of code additions: stuff
% that adds to |\box\pr@box|, like the |labels| option does, and
% stuff that measures out things or otherwise takes a look at the
@@ -739,12 +746,15 @@
% be at the (1in,1in)~mark defined by \TeX. That way we can
% properly take ascenders into account. And the third reason is
% that \TeX\ treats a \cmd{\hbox} and a \cmd{\vbox} differently with
-% regard to the treating of its depth.
+% regard to the treating of its depth. Shifting \cmd{\voffset} and
+% \cmd{\hoffset} can be inhibited by setting |\pr@offset@override|.
% \begin{macrocode}
\pr@ship@end
{\let\protect\noexpand
- \voffset=-\ht\pr@box
- \hoffset=\z@
+ \ifx\pr@offset@override\@undefined
+ \voffset=-\ht\pr@box
+ \hoffset=\z@
+ \fi
\c@page=\pr@snippet
\pr@shipout
\ifpr@fixbb\hbox{%
@@ -1276,7 +1286,13 @@ Please complain to your document class author}%
% \begin{macrocode}
\def\pr@typeinfos{\typeout{Preview: Fontsize \f@size pt}%
\ifnum\mag=\@m\else\typeout{Preview: Magnification \number\mag}\fi
- \ifx\pdfoutput\@undefined \else
+ \ifx\pdfoutput\@undefined
+ \ifx\XeTeXversion\@undefined \else
+ % FIXME: The message should not be emitted if XeTeX does not produce
+ % PDF. There does not seem to be a primitive for that, though.
+ \typeout{Preview: PDFoutput 1}%
+ \fi
+ \else
\ifx\pdfoutput\relax \else
\ifnum\pdfoutput>\z@
\typeout{Preview: PDFoutput 1}%
@@ -1433,8 +1449,8 @@ Please complain to your document class author}%
%<counters>\def\pr@ckpt#1{{\let\@elt\pr@eltprint\edef\next{\cl@@ckpt}%
%<counters> \ifx\next\@empty\else\typeout{Preview: Counters\next#1}%
%<counters> \let\@elt\pr@eltdef\cl@@ckpt\fi}}
-%<counters>\g@addto@macro\pr@ship@start{\pr@ckpt:}
-%<counters>\g@addto@macro\pr@ship@end{\pr@ckpt.}
+%<counters>\pr@addto@front\pr@ship@start{\pr@ckpt:}
+%<counters>\pr@addto@front\pr@ship@end{\pr@ckpt.}
% \end{macrocode}
%
% \subsection{Debugging options}
@@ -1527,11 +1543,15 @@ Please complain to your document class author}%
% out to the console.
% \begin{macrocode}
%<tightpage>\ifnum\pr@graphicstype=\z@
-%<tightpage> \ifcase \ifx\pdfoutput\@undefined \@ne\fi
-%<tightpage> \ifx\pdfoutput\relax \@ne\fi
-%<tightpage> \ifnum\pdfoutput>\z@ \tw@\fi \@ne \or
-%<tightpage> \ExecuteOptions{dvips}\relax \or
-%<tightpage> \ExecuteOptions{pdftex}\relax\fi\fi
+%<tightpage> \ifcase
+%<tightpage> \ifx\XeTeXversion\@undefined
+%<tightpage> \ifx\pdfoutput\@undefined \@ne\fi
+%<tightpage> \ifx\pdfoutput\relax \@ne\fi
+%<tightpage> \ifnum\pdfoutput>\z@ \tw@\fi \@ne
+%<tightpage> \else \thr@@\fi
+%<tightpage> \or \ExecuteOptions{dvips}\relax
+%<tightpage> \or \ExecuteOptions{pdftex}\relax
+%<tightpage> \or \ExecuteOptions{xetex}\relax\fi\fi
%<tightpage>\global\let\pr@bbadjust\@empty
%<tightpage>\pr@addto@front\pr@ship@end{\begingroup
%<tightpage> \let\next\@gobble
@@ -1571,6 +1591,28 @@ Please complain to your document class author}%
%<tightpage> \advance\dimen@\pr@bb@iii
%<tightpage> \global\pdfpagewidth\dimen@
%<tightpage> \global\pdfhorigin-\pr@bb@i}}
+%<tightpage>\or
+%<tightpage> \g@addto@macro\pr@ship@end{\dimen@\ht\pr@box
+%<tightpage> \ifdim\dimen@<\z@ \dimen@\z@\fi
+%<tightpage> \advance\dimen@\pr@bb@iv
+%<tightpage> \dimen@ii=\dimen@
+%<tightpage> \voffset=-1in
+%<tightpage> \advance\voffset\dimen@
+%<tightpage> \advance\voffset-\ht\pr@box
+%<tightpage> \dimen@\dp\pr@box
+%<tightpage> \ifdim\dimen@<\z@ \dimen@\z@\fi
+%<tightpage> \advance\dimen@-\pr@bb@ii
+%<tightpage> \advance\dimen@\dimen@ii
+%<tightpage> \global\pdfpageheight\dimen@
+%<tightpage> \global\paperheight\dimen@
+%<tightpage> \dimen@\wd\pr@box
+%<tightpage> \ifdim\dimen@<\z@ \dimen@=\z@\fi
+%<tightpage> \advance\dimen@-\pr@bb@i
+%<tightpage> \advance\dimen@\pr@bb@iii
+%<tightpage> \global\pdfpagewidth\dimen@
+%<tightpage> \hoffset=-1in
+%<tightpage> \advance\hoffset-\pr@bb@i
+%<tightpage> \let\pr@offset@override\@empty}
%<tightpage>\fi
% \end{macrocode}
% Ok, here comes the beef. First we fish the 7~numbers from the file
diff --git a/Master/texmf-dist/tex/latex/preview/prcounters.def b/Master/texmf-dist/tex/latex/preview/prcounters.def
index be1ecc00eee..f7b5726716d 100644
--- a/Master/texmf-dist/tex/latex/preview/prcounters.def
+++ b/Master/texmf-dist/tex/latex/preview/prcounters.def
@@ -31,8 +31,8 @@
\def\pr@ckpt#1{{\let\@elt\pr@eltprint\edef\next{\cl@@ckpt}%
\ifx\next\@empty\else\typeout{Preview: Counters\next#1}%
\let\@elt\pr@eltdef\cl@@ckpt\fi}}
-\g@addto@macro\pr@ship@start{\pr@ckpt:}
-\g@addto@macro\pr@ship@end{\pr@ckpt.}
+\pr@addto@front\pr@ship@start{\pr@ckpt:}
+\pr@addto@front\pr@ship@end{\pr@ckpt.}
\endinput
%%
%% End of file `prcounters.def'.
diff --git a/Master/texmf-dist/tex/latex/preview/preview.sty b/Master/texmf-dist/tex/latex/preview/preview.sty
index 0969a17790f..30402981d45 100644
--- a/Master/texmf-dist/tex/latex/preview/preview.sty
+++ b/Master/texmf-dist/tex/latex/preview/preview.sty
@@ -26,12 +26,12 @@
\NeedsTeXFormat{LaTeX2e} \def\reserved@a #1#2$#3:
#4${\xdef#1{\reserved@c #2#4 $}} \def\reserved@c #1 #2${#1}
\begingroup \catcode`\_=12
-\reserved@a\pr@version $Name: release_11_84 $ \ifx\pr@version\@empty
-\reserved@a\pr@version CVS-$Revision: 1.122 $ \endgroup \else
+\reserved@a\pr@version $Name: release_11_86 $ \ifx\pr@version\@empty
+\reserved@a\pr@version CVS-$Revision: 1.126 $ \endgroup \else
\def\next release_{} \lccode`\_=`.
\edef\next{\lowercase{\endgroup
\def\noexpand\pr@version{\expandafter\next\pr@version}}} \next \fi
-\reserved@a\next $Date: 2006/08/25 10:34:36 $
+\reserved@a\next $Date: 2010/02/14 16:19:00 $
\edef\next{\noexpand\ProvidesPackage{preview}%
[\next\space \pr@version\space (AUCTeX/preview-latex)]}
\next
@@ -77,6 +77,8 @@
store}bind def end}}}}
\DeclareOption{pdftex}{%
\let\pr@graphicstype\tw@}
+\DeclareOption{xetex}{%
+ \let\pr@graphicstype\thr@@}
\begingroup
\catcode`\*=11
\@firstofone{\endgroup
@@ -271,8 +273,10 @@ Please complain to your document class author}%
}%
\pr@ship@end
{\let\protect\noexpand
- \voffset=-\ht\pr@box
- \hoffset=\z@
+ \ifx\pr@offset@override\@undefined
+ \voffset=-\ht\pr@box
+ \hoffset=\z@
+ \fi
\c@page=\pr@snippet
\pr@shipout
\ifpr@fixbb\hbox{%
@@ -366,7 +370,13 @@ Please complain to your document class author}%
\let\output\pr@output
\def\pr@typeinfos{\typeout{Preview: Fontsize \f@size pt}%
\ifnum\mag=\@m\else\typeout{Preview: Magnification \number\mag}\fi
- \ifx\pdfoutput\@undefined \else
+ \ifx\pdfoutput\@undefined
+ \ifx\XeTeXversion\@undefined \else
+ % FIXME: The message should not be emitted if XeTeX does not produce
+ % PDF. There does not seem to be a primitive for that, though.
+ \typeout{Preview: PDFoutput 1}%
+ \fi
+ \else
\ifx\pdfoutput\relax \else
\ifnum\pdfoutput>\z@
\typeout{Preview: PDFoutput 1}%
diff --git a/Master/texmf-dist/tex/latex/preview/prtightpage.def b/Master/texmf-dist/tex/latex/preview/prtightpage.def
index 0be40a462a5..31516bed926 100644
--- a/Master/texmf-dist/tex/latex/preview/prtightpage.def
+++ b/Master/texmf-dist/tex/latex/preview/prtightpage.def
@@ -37,11 +37,15 @@
\advance\count@\@ne\ifnum\count@<5
\afterassignment\pr@nextbb\dimen@=\fi}
\ifnum\pr@graphicstype=\z@
- \ifcase \ifx\pdfoutput\@undefined \@ne\fi
- \ifx\pdfoutput\relax \@ne\fi
- \ifnum\pdfoutput>\z@ \tw@\fi \@ne \or
- \ExecuteOptions{dvips}\relax \or
- \ExecuteOptions{pdftex}\relax\fi\fi
+ \ifcase
+ \ifx\XeTeXversion\@undefined
+ \ifx\pdfoutput\@undefined \@ne\fi
+ \ifx\pdfoutput\relax \@ne\fi
+ \ifnum\pdfoutput>\z@ \tw@\fi \@ne
+ \else \thr@@\fi
+ \or \ExecuteOptions{dvips}\relax
+ \or \ExecuteOptions{pdftex}\relax
+ \or \ExecuteOptions{xetex}\relax\fi\fi
\global\let\pr@bbadjust\@empty
\pr@addto@front\pr@ship@end{\begingroup
\let\next\@gobble
@@ -81,6 +85,28 @@
\advance\dimen@\pr@bb@iii
\global\pdfpagewidth\dimen@
\global\pdfhorigin-\pr@bb@i}}
+\or
+ \g@addto@macro\pr@ship@end{\dimen@\ht\pr@box
+ \ifdim\dimen@<\z@ \dimen@\z@\fi
+ \advance\dimen@\pr@bb@iv
+ \dimen@ii=\dimen@
+ \voffset=-1in
+ \advance\voffset\dimen@
+ \advance\voffset-\ht\pr@box
+ \dimen@\dp\pr@box
+ \ifdim\dimen@<\z@ \dimen@\z@\fi
+ \advance\dimen@-\pr@bb@ii
+ \advance\dimen@\dimen@ii
+ \global\pdfpageheight\dimen@
+ \global\paperheight\dimen@
+ \dimen@\wd\pr@box
+ \ifdim\dimen@<\z@ \dimen@=\z@\fi
+ \advance\dimen@-\pr@bb@i
+ \advance\dimen@\pr@bb@iii
+ \global\pdfpagewidth\dimen@
+ \hoffset=-1in
+ \advance\hoffset-\pr@bb@i
+ \let\pr@offset@override\@empty}
\fi
\ifnum\pr@graphicstype=\@ne
\preview@delay{\AtBeginDvi{%