From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14353 Path: main.gmane.org!not-for-mail From: Steffen Wolfrum Newsgroups: gmane.comp.tex.context Subject: Synchronization (.tex <-> .pdf) Date: Mon, 22 Dec 2003 15:38:25 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1072104432 32733 80.91.224.253 (22 Dec 2003 14:47:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2003 14:47:12 +0000 (UTC) Cc: jerome.laurens@u-bourgogne.fr Original-X-From: ntg-context-admin@ntg.nl Mon Dec 22 15:47:09 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AYRKv-0006nL-00 for ; Mon, 22 Dec 2003 15:47:09 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 4D79B10AFC; Mon, 22 Dec 2003 15:47:05 +0100 (MET) Original-Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [62.67.200.157]) by ref.ntg.nl (Postfix) with ESMTP id B1E6C10ABB for ; Mon, 22 Dec 2003 15:38:44 +0100 (MET) Original-Received: (qmail 8504 invoked from network); 22 Dec 2003 14:38:43 -0000 Original-Received: from unknown (HELO [62.134.72.56]) (159967@[62.134.72.56]) (envelope-sender ) by smtprelay02.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 22 Dec 2003 14:38:43 -0000 X-Sender: 159967@pop3.estfiles.de Original-To: ntg-context@ntg.nl Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14353 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14353 Hi, I don't now how many ConTeXt user are aware of the idea of synchronization. In the LaTeX area of TeX it has a kind of tradition (Textures, srcltx, ...) for dvi output. For PDF output Jérôme Laurens has now written a package (for use with iTeXMac and TeXShop) that makes the advantages from source-output synchronization also available for the todays standard PDF. But as so many things in the TeX world it is written as a "plug-in" for LaTeX. Does anybody has an idea how to use this great achievement also with ConTeXt? For those who would like to have a look at Jérôme's great work, I insert his code at the end of this email. Thank you very much, Steffen Wolfrum %%%% This is pdfsync.sty %%%% 2003-12-08: %%%% There is a bug in using everyvbox... novbox is now the default %%%% bug fixed: $0$ was no visible %%%% 2003-11-28: %%%% comment characters added to fix an error. Don't know exactly the cause... %%%% Default option is all... %%%% Could not use \everydisplay... (bug in eqnarray) %%%% 2003-11-19 %%%% first version %%%% usage: \usepackage[display,cr,vbox]{PDFSYNC} %%%% appends reference points before each \par and at each \hbox, inline math; %%%% optionally also at every displayed math, with the option [display] %%%% optionally also at every \cr, with the option [cr] %%%% optionally also at every \vbox, with the option [vbox] %%%% %%%% If you want additional files to be parsed, please use the command %%%% \include (which is redefined below) %%%% This file is due to Piero D'Ancona and jlaurens@users.sourceforge.net %%%% iTeXMac is supporting pdfsync %%%% Copy this file to ~/Library/texmf/tex/latex or ~/Library/TeX/texmf/tex/latex if available %%%% This file is distributed under the GPL and the "smart licence": please make things better if you can %%%% © 2003, jlaurens@users.sourceforge.net % \NeedsTeXFormat{LaTeX2e}% \ProvidesPackage{pdfsync}[2003/12/08 v0.3]% \newif\ifPDFSYNCOK% \newif\ifPDFSYNCStar% \newif\ifPDFSYNCPar \PDFSYNCPartrue% \newif\ifPDFSYNCMath \PDFSYNCMathtrue% \newif\ifPDFSYNCCr \PDFSYNCCrtrue% \newif\ifPDFSYNCHBox \PDFSYNCHBoxtrue% \newif\ifPDFSYNCVBox \PDFSYNCVBoxfalse% \newif\ifPDFSYNCExtra \PDFSYNCExtratrue% \newwrite\PDFPOS% \newcount\PDFSYNC@folio\PDFSYNC@folio=0% \newcount\PDFSYNC@rder\PDFSYNC@rder=0% \DeclareOption{nopar}{\PDFSYNCParfalse}% \DeclareOption{nomath}{\PDFSYNCMathfalse}% \DeclareOption{nocr}{\PDFSYNCCrfalse}% \DeclareOption{nohbox}{\PDFSYNCHBoxfalse}% \DeclareOption{novbox}{\PDFSYNCVBoxfalse}% \DeclareOption{vbox}{\PDFSYNCVBoxtrue}% \DeclareOption{noextra}{\PDFSYNCExtrafalse}% \DeclareOption{nothing}{\let\pdfsyncstart\pdfsyncstop}% \ProcessOptions\relax% \RequirePackage{everyshi}% \ifx\pdfsavepos\undefined% \wlog{Synchronization is only available with pdf. Use a dvi viewer instead.}% \let\pdfsyncstart\relax% \let\pdfsyncstop\relax% \let\pdfsync\relax% \let\@PDFSYNC\relax% \else% \def\pdfsyncstart{\global\PDFSYNCOKtrue}% \def\pdfsyncstop{\global\PDFSYNCOKfalse}% \EveryShipout{\@PDFSYNC\global\advance\PDFSYNC@folio by 1\immediate\write\PDFPOS{s\space\the\PDFSYNC@folio}}% \immediate\openout\PDFPOS\jobname.pdfsync% \immediate\write\PDFPOS{\jobname}% control info \immediate\write\PDFPOS{version 0}% control info \let\PDFSYNC@include\include% \def\PDFSYNC@@include#1{% \immediate\write\PDFPOS{(#1}% \PDFSYNC@include{#1}\immediate\write\PDFPOS{)}}% \let\include\PDFSYNC@@include% \def\@PDFSYNC{% \ifPDFSYNCOK% \pdfsavepos% \immediate\write\PDFPOS{l\space\the\PDFSYNC@rder\space\the\inputlineno}% \def\position{\the\pdflastxpos\space\the\pdflastypos}% \ifPDFSYNCStar% \edef\argument{{p*\space\the\PDFSYNC@rder\space\noexpand\position}}% \else% \edef\argument{{p\space\the\PDFSYNC@rder\space\noexpand\position}}% \fi% \expandafter\write\expandafter\PDFPOS\argument% \global\advance\PDFSYNC@rder by 1% \fi}% \def\pdfsync{\global\PDFSYNCStartrue\@PDFSYNC\global\PDFSYNCStarfalse}% \def\PDFSYNC@Extra{% % \let\PDFSYNC@maketitle\maketitle\def\maketitle{\pdfsyncstop\PDFSYNC@maketitle\pdfsyncstart} \let\PDFSYNC@newline\\\def\\{{\@PDFSYNC}\PDFSYNC@newline}% \global\let\PDFSYNC@verse\verse \global\def\verse{\PDFSYNC@verse\let\PDFSYNC@newline\\\def\\{{\@PDFSYNC}\PDFSYNC@newline}}% }% \AtBeginDocument{% \pdfsyncstart% \ifPDFSYNCPar\global\let\p@@r\par\gdef\par{{\@PDFSYNC}\p@@r}\fi% \ifPDFSYNCMath\everymath{{\@PDFSYNC}}\fi% \ifPDFSYNCCr\everycr {{\@PDFSYNC}}\fi% \ifPDFSYNCHBox\everyhbox {{\@PDFSYNC}}\fi% \ifPDFSYNCVBox\everyvbox {{\@PDFSYNC}}\fi%there is a bug here \ifPDFSYNCExtra\PDFSYNC@Extra\fi% }% \fi% \endinput