diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-22 23:36:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-22 23:36:31 +0000 |
commit | cd62c624e149e4c29e0e7aa29c016ae8b45cf086 (patch) | |
tree | 1279b8e45d65cd3fd93975997a8d3db844722b28 /Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def | |
parent | 2be6eaeb8090315538ca23046d0fbc8ffce6acdd (diff) |
oberdiek (22apr11)
git-svn-id: svn://tug.org/texlive/trunk@22162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def | 69 |
1 files changed, 66 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def b/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def index d6dfacc44d2..e68d7ef7e2f 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def +++ b/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: bookmark -%% Version: 2011/04/13 v1.20 +%% Version: 2011/04/21 v1.21 %% %% Copyright (C) 2007-2011 by %% Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -35,9 +35,26 @@ %% bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, %% bookmark-example.tex. %% +\def\BKM@SourceLocation{% + \ifx\BKM@DO@srcfile\@empty + \ifx\BKM@DO@srcline\@empty + \else + .\MessageBreak + Source: line \BKM@DO@srcline + \fi + \else + \ifx\BKM@DO@srcline\@empty + .\MessageBreak + Source: file `\BKM@DO@srcfile'% + \else + .\MessageBreak + Source: file `\BKM@DO@srcfile', line \BKM@DO@srcline + \fi + \fi +} \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvips.def}% - [2011/04/13 v1.20 bookmark driver for dvips (HO)]% + [2011/04/21 v1.21 bookmark driver for dvips (HO)]% \def\BKM@PSHeaderFile#1{% \special{header=#1}% } @@ -69,6 +86,10 @@ \def\BKM@DO@entry#1#2{% \begingroup \kvsetkeys{BKM@DO}{#1}% + \ifx\BKM@DO@srcfile\@empty + \else + \BKM@UnescapeHex\BKM@DO@srcfile + \fi \def\BKM@DO@title{#2}% \BKM@UnescapeHex\BKM@DO@title \expandafter\expandafter\expandafter\BKM@getx @@ -89,7 +110,9 @@ \ifx\BKM@DO@rawaction\@empty \ifx\BKM@DO@uri\@empty \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{Missing action}\@ehc + \PackageError{bookmark}{% + Missing action\BKM@SourceLocation + }\@ehc \edef\BKM@action{% /Action/GoTo% /Page 1% @@ -191,8 +214,13 @@ \newcommand*{\bookmark}[2][]{% \if@filesw \begingroup + \BKM@InitSourceLocation \def\bookmark@text{#2}% \BKM@setup{#1}% + \ifx\BKM@srcfile\@empty + \else + \BKM@EscapeHex\BKM@srcfile + \fi \edef\BKM@prev{\the\BKM@id}% \global\advance\BKM@id\@ne \BKM@swtrue @@ -249,6 +277,8 @@ \ifnum\BKM@FLAGS>\z@ ,flags=\BKM@FLAGS \fi + \BKM@auxentry{srcline}% + \BKM@auxentry{srcfile}% }{\BKM@title}% }% \endgroup @@ -265,6 +295,37 @@ ,#1={\csname BKM@#1\endcsname}% \fi } +\def\BKM@InitSourceLocation{% + \edef\BKM@srcline{\the\inputlineno}% + \BKM@LuaTeX@InitFile + \ifx\BKM@srcfile\@empty + \ltx@IfUndefined{currfilepath}{}{% + \edef\BKM@srcfile{\currfilepath}% + }% + \fi +} +\ifluatex + \ifnum\luatexversion>36 % + \def\BKM@LuaTeX@InitFile{% + \begingroup + \ltx@LocToksA={}% + \edef\x{\endgroup + \def\noexpand\BKM@srcfile{% + \the\expandafter\ltx@LocToksA + \directlua{% + if status and status.filename then % + tex.settoks('ltx@LocToksA', status.filename)% + end% + }% + }% + }\x + }% + \else + \let\BKM@LuaTeX@InitFile\relax + \fi +\else + \let\BKM@LuaTeX@InitFile\relax +\fi \SetupKeyvalOptions{family=BKM@DO,prefix=BKM@DO@} \DeclareStringOption[0]{id} \DeclareBoolOption{open} @@ -277,6 +338,8 @@ \DeclareStringOption{page} \DeclareStringOption{view} \DeclareStringOption{rawaction} +\DeclareStringOption{srcline} +\DeclareStringOption{srcfile} \AtBeginDocument{% \let\BKM@entry\BKM@DO@entry } |