summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-01-17 22:14:38 +0000
committerKarl Berry <karl@freefriends.org>2007-01-17 22:14:38 +0000
commitaa45ba1499aaf07b7a63694d5a9853ab4b6a92a4 (patch)
treea0741d0f816c45c59606c5dfab8aa7706995ac7b
parentbd20a8ca78657278f385d36860ed91569b264ba1 (diff)
new latex package pdfsync
git-svn-id: svn://tug.org/texlive/trunk@3557 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/tools/tpm-ctan-check2
-rw-r--r--Master/texmf-dist/doc/latex/pdfsync/README84
-rw-r--r--Master/texmf-dist/tex/latex/pdfsync/pdfsync.sty273
-rw-r--r--Master/texmf-dist/tpm/pdfsync.tpm23
-rw-r--r--Master/texmf/lists/pdfsync6
-rw-r--r--Master/texmf/tpm/collection-latexextra.tpm1
6 files changed, 388 insertions, 1 deletions
diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check
index 6e310522136..65c0abc93e3 100755
--- a/Build/tools/tpm-ctan-check
+++ b/Build/tools/tpm-ctan-check
@@ -76,7 +76,7 @@ my @WorkingTPM = qw(
oberdiek ocr-latex octavo ofs ogham oldstyle onlyamsmath opcit
ordinalpt osa
papercdcase papertex parallel paresse parrun pauldoc pdf-trans pdfcprot
- pdfpages pdfscreen pdftex-def perception perltex permute
+ pdfpages pdfscreen pdfsync pdftex-def perception perltex permute
pgf phaistos pict2e pictex pictex2 pittetd placeins plari plates
poemscol polynom polytable powerdot ppr-prv pracjourn preprint
prettyref preview probsoln procIAGssymp program protocol pseudocode
diff --git a/Master/texmf-dist/doc/latex/pdfsync/README b/Master/texmf-dist/doc/latex/pdfsync/README
new file mode 100644
index 00000000000..58b851e051d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pdfsync/README
@@ -0,0 +1,84 @@
+
+ This is the README file for pdfsync
+ a LaTeX package for
+ synchronizing between source and pdf output
+
+* Presentation
+==============
+pdfsync.sty allows one to synchronize between LaTeX source and pdf output.
+When used with a text editor and a PDF viewer that both support pdfsync,
+you can navigate from the source to the output and vice versa.
+This is some kind of srcltx ported from dvi to pdf.
+
+When you typeset foo.tex with pdfsync.sty and either pdfetex or xetex,
+a foo.pdfsync auxiliary file is created. It only contains geometrical information
+used by text editors or PDF viewers for synchronization.
+You can delete this file when you are done.
+
+Actually, iTeXMac, iTeXMac2, TeXShop, AucTeX are
+text editors implementing pdfsync support at various level.
+iTeXMac, iTeXMac2, TeXShop, TeXniscope, PDFView are
+PDF viewers implementing pdfsync support at various level.
+
+* Installation
+==============
+If this package is not already included in you TeX distribution,
+just copy the pdfsync.sty file to the proper location.
+On Mac OS X, it can be
+
+ YOUR_HOME_DIRECTORY/Library/texmf/tex/latex/graphics/graphics.sty
+
+where you should replace YOUR_HOME_DIRECTORY by its actual value.
+
+* Usage
+=======
+Put \usepackage{pdfsync} in your LaTeX preamble.
+
+In case of sever conflicts with another package, try instead
+
+ \usepackage[novbox]{pdfsync}
+
+If pdfsync breaks only some part of your LaTeX code, you can try to
+enclose it in \pdfsyncstop \pdfsyncstart pair. If you want to add
+more control point add \pdfsync at sensible locations in your code.
+In that case, \usepackage[off]{pdfsync} will disable pdf synchronization
+and \relax the above commands.
+
+More options in the package
+
+* Bugs
+======
+pdfsync uses extremely sensible code.
+You should not use pdfsync on final documents because
+it can change the layout rather significantly
+(different page/line breaks are the most obvious changes),
+despite this is rather rare,
+17th Murphy's law states that it will happen to you when it absolutely must not...
+
+The accuracy of pdf synchronization depends on the application used for that purpose.
+iTeXMac2 is actually the most accurate implementation because it combines pdfsync
+with pdf searching. The lack of accuracy, is not a bug in pdfsync a priori.
+
+You should report bugs and package conflicts to
+
+ jlaurens AT users DOT sourceforge DOT net.
+
+* Credits:
+==========
+The original idea of pdfsync was proposed by Piero D'Ancona in the summer of 2003.
+He and Jerome Laurens both created the first working package.
+Hans Hagen and David Kastrup made very significant enhancements to the original code.
+
+* License
+=========
+This program is free software; you can redistribute it and/or modify
+it under the terms of the The LaTeX Project Public License version 1.3c at least
+http://www.latex-project.org/lppl.txt
+
+* Home page
+===========
+The official site where you will find both the latest version and the .pdfsync file specifications is
+
+ http://itexmac.sourceforge.net/pdfsync.html
+
+copyright 2006, jlaurens AT users DOT sourceforge DOT net
diff --git a/Master/texmf-dist/tex/latex/pdfsync/pdfsync.sty b/Master/texmf-dist/tex/latex/pdfsync/pdfsync.sty
new file mode 100644
index 00000000000..c7eb74c49d8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pdfsync/pdfsync.sty
@@ -0,0 +1,273 @@
+% LaTeX package pdfsync.sty
+% =========================
+%
+% Presentation
+% ------------
+% pdfsync.sty allows one to synchronize between LaTeX source and pdf output.
+% When used with a text editor and a PDF viewer that both support pdfsync,
+% you can navigate from the source to the output and vice versa.
+% This is some kind of srcltx ported from dvi to pdf.
+%
+% When you typeset foo.tex with pdfsync.sty and either pdfetex or xetex, a foo.pdfsync auxiliary file is created.
+% It only contains geometrical information used by text editors or PDF viewers for synchronization.
+% You can delete this file when you are done.
+%
+% Actually, iTeXMac, iTeXMac2, TeXShop, TextMate, AucTeX are text editors implementing pdfsync support at various level.
+% iTeXMac, iTeXMac2, TeXShop, TeXniscope, PDFView are PDF viewers implementing pdfsync support at various level.
+%
+% Install
+% -------
+% If this package is not already included in you TeX distribution, just copy the pdfsync.sty file to the proper location.
+% On Mac OS X, it can be
+% YOUR_HOME_DIRECTORY/Library/texmf/tex/latex/graphics/graphics.sty
+% where you should replace YOUR_HOME_DIRECTORY by its actual value.
+%
+% Usage
+% -----
+% Put \usepackage{pdfsync} in your LaTeX preamble.
+%
+% In case of sever conflicts with another package, try \usepackage[novbox]{pdfsync} instead.
+%
+% If pdfsync only breaks some part of your LaTeX code, you can try to enclose it in a \pdfsyncstop \pdfsyncstart pair.
+% If you want to add more control point add \pdfsync at sensible locations in your code.
+% In that case, \usepackage[off]{pdfsync} will disable pdf synchronization and \relax the above commands.
+%
+% Use option nohbox (resp nocr, nopar, nomath, nodisplay) in order not to add control points every hbox (resp cr, par, math,display)
+%
+% Bugs
+% ----
+% pdfsync uses extremely severe code. You should not use pdfsync on final documents because it can change the layout rather significantly
+% (different page/line breaks are the most obvious changes), despite this is rather rare,
+% 17.8th Murphy's law states that it will happen to you when it absolutely must not...
+%
+% You should report bugs and package conflicts to jlaurens AT users DOT sourceforge DOT net.
+%
+% The accuracy of pdf synchronization depends on the editor/viewer used for that purpose.
+% iTeXMac2 is actually the most accurate implementation because it combines pdfsync with pdf searching.
+% So, the lack of accuracy is not a bug in pdfsync a priori.
+%
+% Credits:
+% -------
+% The original idea of pdfsync was proposed by Piero D'Ancona in the summer of 2003.
+% He and Jerome Laurens (jlaurens AT usersDOT sourceforge DOT net) both created the first working package.
+% Hans Hagen and David Kastrup made very significant enhancements to the original code.
+%
+% License
+% -------
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the The LaTeX Project Public License version 1.3c at least
+% http://www.latex-project.org/lppl.txt
+%
+% Home page
+% ---------
+% The official site is
+%
+% http://itexmac.sourceforge.net/pdfsync.html
+%
+% copyright 2006, jlaurens AT users DOT sourceforge DOT net
+%
+\ifx\pdfsync\undefined\else\message{**** pdfsync.sty: WARNING, the package is already loaded.}\expandafter\endinput\fi
+\def\c@nfigPDFSYNC@ff{%
+ \let\pdfsync\relax%
+ \let\pdfsyncstart\relax%
+ \let\pdfsyncstop\relax%
+}%
+\ifx\pdfsavepos\undefined
+\message{**** pdfsync.sty: WARNING, synchronization is only available with pdfetex like engines.}%
+\c@nfigPDFSYNC@ff
+\let\c@nfigPDFSYNC@ff=\undefined
+\expandafter\endinput
+\fi
+% Defining the preamble of the style file:
+\NeedsTeXFormat{LaTeX2e}%
+\ProvidesPackage{pdfsync}[2007/01/15 v1.0]%
+% start of the code
+\let\c@nfigPDFSYNCp@r\relax%
+\let\c@nfigPDFSYNCm@th\relax%
+\let\c@nfigPDFSYNCdispl@y\relax%
+\let\c@nfigPDFSYNChb@x\relax%
+\let\c@nfigPDFSYNCvb@x\relax%
+\let\c@nfigPDFSYNC@cr\relax%
+% Subverting |\everypar| to prepend pdfsync |\@PDFSYNC| specific code that will
+% be executed for each new paragraph.
+%This was primarly suggested by Curtis Clifton on 12/17/2004 (google "subvert token" for details).
+\def\c@nfigPDFSYNCp@r{\wlog{**** pdfsync.sty: Synchronizing at \string\everypar}%
+\newtoks\PDFSYNCeveryp@r
+\PDFSYNCeveryp@r\everypar
+\everypar{\bgroup\setbox\z@\lastbox\@PDFSYNC\box\z@\egroup
+ \the\PDFSYNCeveryp@r}%
+\let\everypar\PDFSYNCeveryp@r
+}%
+%
+\def\c@nfigPDFSYNCdispl@y{\wlog{**** pdfsync.sty: Synchronizing at \string\everydisplay}%
+\newtoks\PDFSYNCeverydispl@y
+\PDFSYNCeverydispl@y\frozen@everydisplay
+\frozen@everydisplay{\@PDFSYNC\the\PDFSYNCeverydispl@y}%
+\let\frozen@everydisplay\PDFSYNCeverydispl@y
+}%
+%
+\def\c@nfigPDFSYNCm@th{\wlog{**** pdfsync.sty: Synchronizing at \string\everymath}%
+\newtoks\PDFSYNCeverym@th
+\PDFSYNCeverym@th\frozen@everymath
+\frozen@everymath{\@PDFSYNC\the\PDFSYNCeverym@th}%
+\let\frozen@everymath\PDFSYNCeverym@th
+}%
+%
+\def\c@nfigPDFSYNChb@x{\wlog{**** pdfsync.sty: Synchronizing at \string\everyhbox}%
+\newtoks\PDFSYNCeveryhb@x
+\PDFSYNCeveryhb@x\everyhbox
+\everyhbox{\ifPDFSYNC@unblocked
+ \begingroup
+ \PDFSYNC@unblockedfalse
+ \setbox\z@\hbox\bgroup
+ \@PDFSYNC
+ \setbox\z@\hbox\bgroup\bgroup
+ \aftergroup\PDFSYNC@endhbox\the\PDFSYNCeveryhb@x
+ \PDFSYNC@unblockedtrue
+ \fi}%
+\let\everyhbox\PDFSYNCeveryhb@x
+\def\PDFSYNC@endhbox{\ifnum\lastnodetype>\m@ne
+ \egroup \unhbox\z@ \egroup \unhbox\z@
+ \else \egroup \egroup \fi \endgroup \egroup}%
+}%
+%
+\def\c@nfigPDFSYNCvb@x{\wlog{**** pdfsync.sty: Synchronizing at \string\everyvbox}%
+\newtoks\PDFSYNCeveryvb@x
+\PDFSYNCeveryvb@x\everyvbox
+\everyvbox{\ifPDFSYNC@unblocked
+ \begingroup
+ \PDFSYNC@unblockedfalse
+ \setbox\z@\vbox\bgroup
+ \@PDFSYNC
+ \setbox\z@\vtop\bgroup\bgroup
+ \aftergroup\PDFSYNC@endvbox\the\PDFSYNCeveryvb@x
+ \PDFSYNC@unblockedtrue
+ \fi}%
+\let\everyvbox\PDFSYNCeveryvb@x
+\def\PDFSYNC@endvbox{\ifnum\lastnodetype>\m@ne
+ \egroup
+ \edef\next{\egroup\hrule\@height\the\ht\z@\@depth-\the\ht\z@\relax}%
+ \unvbox\z@ \next \unvbox\z@
+ \else \egroup \egroup \fi \endgroup \egroup}%
+}%
+%
+\def\c@nfigPDFSYNC@cr{\wlog{**** pdfsync.sty: Synchronizing at \string\everycr}%
+\newtoks\PDFSYNCevery@cr
+\PDFSYNCevery@cr\everycr
+\everycr{\the\PDFSYNCevery@cr\@PDFSYNC}%
+\let\everycr\PDFSYNCevery@cr
+}%
+% Configure pdsync
+\def\c@nfigPDFSYNC{\wlog{Configuring pdfsync}%
+\newwrite\PDFSYNC@ut%
+\immediate\openout\PDFSYNC@ut\jobname.pdfsync%
+\immediate\write\PDFSYNC@ut{\jobname}% control info
+\immediate\write\PDFSYNC@ut{version 1}% control info
+% patching \shipout
+\let\PDFSYNCship@ut@ld\shipout%
+\gdef\PDFSYNCship@utn@w{%
+\afterassignment\PDFSYNC@utput%
+\setbox\@cclv= %
+}%
+\def\PDFSYNC@utput{%
+\relax%
+\ifvoid\@cclv\relax%
+\aftergroup\PDFSYNC@@utput%
+\else%
+\PDFSYNC@@utput%
+\fi%
+}%
+\gdef\PDFSYNC@@utput{%
+\global\advance\PDFSYNCf@li@ by 1%
+\immediate\write\PDFSYNC@ut{s\space\the\PDFSYNCf@li@}%
+\PDFSYNCship@ut@ld\box\@cclv%
+}%
+%
+% patching LaTeX \InputIfFileExists for \include and \input
+\let\PDFSYNCInputIfFileExists@ff\InputIfFileExists%
+\long\def\PDFSYNCInputIfFileExists@n##1##2##3{%
+\immediate\write\PDFSYNC@ut{(##1}%
+\PDFSYNCInputIfFileExists@ff{##1}{##2}{##3}%
+\immediate\write\PDFSYNC@ut{)}}%
+%
+\def\PDFSYNCP@siti@n{\the\pdflastxpos\space\the\pdflastypos}%
+%
+\newif\ifPDFSYNCst@r%
+\newif\ifPDFSYNCvb@x%
+\newcount\PDFSYNCf@li@\PDFSYNCf@li@=0%
+\newcount\PDFSYNC@rder\PDFSYNC@rder=0%
+\newif\ifPDFSYNC@unblocked
+\PDFSYNC@unblockedtrue
+% defining \@@PDFSYNC: the macro that writes to the .pdfsync file
+\def\@@PDFSYNC{%
+\relax%
+\immediate\write\PDFSYNC@ut{l\space\the\PDFSYNC@rder\space\the\inputlineno}%
+\pdfsavepos%
+\edef\next{\write\PDFSYNC@ut{p\ifPDFSYNCst@r*\else\ifPDFSYNCvb@x+\fi\fi\space\the\PDFSYNC@rder\space\noexpand\PDFSYNCP@siti@n}}%
+\next%
+\global\advance\PDFSYNC@rder by 1%
+\relax%
+}%
+%
+\def\@pdfsync{\bgroup\PDFSYNCst@rtrue\@PDFSYNC\egroup}%
+%
+\def\pdfsyncstart{%
+\let\shipout\PDFSYNCship@utn@w%
+\let\pdfsync\@pdfsync%
+\let\@PDFSYNC\@@PDFSYNC%
+\let\InputIfFileExists\PDFSYNCInputIfFileExists@n%
+}%
+\def\pdfsyncstop{%
+\let\shipout\PDFSYNCship@ut@ld%
+\let\pdfsync\relax%
+\let\@PDFSYNC\relax%
+\let\InputIfFileExists\PDFSYNCInputIfFileExists@ff%
+}%
+%
+\c@nfigPDFSYNCp@r%
+\let\c@nfigPDFSYNCp@r\undefined%
+\c@nfigPDFSYNCm@th%
+\let\c@nfigPDFSYNCm@th\undefined%
+%\c@nfigPDFSYNCdispl@y% This does not work with amsmath
+\let\c@nfigPDFSYNCdispl@y\undefined%
+\c@nfigPDFSYNChb@x%
+\let\c@nfigPDFSYNChb@x\undefined%
+\c@nfigPDFSYNCvb@x%
+\let\c@nfigPDFSYNCvb@x\undefined%
+%\c@nfigPDFSYNC@cr% This does not work "Missing \cr inserted" in maketitle
+\let\c@nfigPDFSYNC@cr\undefined%
+% the problem of the soul package
+ \ifx\SOUL@\undefined\relax\else%
+ \message{! pdfsync is patching the soul package}
+ \let\PDFSYNC@SOUL@\SOUL@
+ \def\SOUL@##1{%
+ \bgroup\pdfsyncstop\PDFSYNC@SOUL@{##1}\egroup
+ }%
+ \fi%
+\pdfsyncstart%
+\wlog{**** pdfsync.sty: started}%
+}%
+%
+\AtBeginDocument{%
+\c@nfigPDFSYNC%
+\let\c@nfigPDFSYNC\undefined%
+}%
+% end of the core code
+% Declaring the option 'nopar' to disable this feature
+\DeclareOption{nopar}{\let\c@nfigPDFSYNCp@r\relax}%
+% Declaring the option 'nomath' to disable this feature
+\DeclareOption{nomath}{\let\c@nfigPDFSYNCm@th\relax}%
+% Declaring the option 'nodisplay' to disable this feature
+\DeclareOption{nodisplay}{\let\c@nfigPDFSYNCdispl@y\relax}%
+% Declaring the option 'nohbox' to disable this feature
+\DeclareOption{nohbox}{\let\c@nfigPDFSYNChb@x\relax}%
+% Declaring the option 'novbox' to disable this feature
+\DeclareOption{novbox}{\let\c@nfigPDFSYNCvb@x\relax}%
+% Declaring the option 'nocr' to disable this feature
+\DeclareOption{nocr}{\let\c@nfigPDFSYNC@cr\relax}%
+% Declaring the option 'off', all the macros are set to \relax
+\DeclareOption{off}{\let\c@nfigPDFSYNC\c@nfigPDFSYNC@ff}%
+% Beamer problem
+\ifx\beamer@version\undefined\relax\else\let\c@nfigPDFSYNCvb@x\relax\fi
+\ProcessOptions%
+\endinput%
diff --git a/Master/texmf-dist/tpm/pdfsync.tpm b/Master/texmf-dist/tpm/pdfsync.tpm
new file mode 100644
index 00000000000..8ddee227127
--- /dev/null
+++ b/Master/texmf-dist/tpm/pdfsync.tpm
@@ -0,0 +1,23 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/pdfsync.zip">
+ <TPM:Name>pdfsync</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2007/01/16 13:12:00</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The pdfsync package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>12980</TPM:Size>
+ <TPM:License></TPM:License>
+ <TPM:Build/>
+ <TPM:RunFiles size="10729">
+texmf-dist/tex/latex/pdfsync/pdfsync.sty
+texmf-dist/tpm/pdfsync.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="3108">texmf-dist/doc/latex/pdfsync/README</TPM:DocFiles>
+ <TPM:Provides>Package/pdfsync</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+
diff --git a/Master/texmf/lists/pdfsync b/Master/texmf/lists/pdfsync
new file mode 100644
index 00000000000..8fb410d26a9
--- /dev/null
+++ b/Master/texmf/lists/pdfsync
@@ -0,0 +1,6 @@
+texmf-dist/doc/latex/pdfsync/README
+
+texmf-dist/tex/latex/pdfsync/pdfsync.sty
+texmf-dist/tpm/pdfsync.tpm
+
+texmf/lists/pdfsync
diff --git a/Master/texmf/tpm/collection-latexextra.tpm b/Master/texmf/tpm/collection-latexextra.tpm
index 694f945940f..51effdeeec6 100644
--- a/Master/texmf/tpm/collection-latexextra.tpm
+++ b/Master/texmf/tpm/collection-latexextra.tpm
@@ -337,6 +337,7 @@ A large collection of add-on packages for LaTeX.
<TPM:Package name="pdfcprot"/>
<TPM:Package name="pdfscreen"/>
<TPM:Package name="pdfslide"/>
+ <TPM:Package name="pdfsync"/>
<TPM:Package name="pdftex-def"/>
<TPM:Package name="pdfwin"/>
<TPM:Package name="pecha"/>