From 0960f77acb96f54f4ed602653f196e696923ec66 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 4 Jul 2018 21:28:02 +0000
Subject: xbmks (4jul18)

git-svn-id: svn://tug.org/texlive/trunk@48138 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/xbmks/xbmks.dtx | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

(limited to 'Master/texmf-dist/source/latex/xbmks/xbmks.dtx')

diff --git a/Master/texmf-dist/source/latex/xbmks/xbmks.dtx b/Master/texmf-dist/source/latex/xbmks/xbmks.dtx
index 63e4cfd8b3d..b2ed3074c1b 100644
--- a/Master/texmf-dist/source/latex/xbmks/xbmks.dtx
+++ b/Master/texmf-dist/source/latex/xbmks/xbmks.dtx
@@ -16,7 +16,7 @@
 %</copyright>
 %<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
 %<package>\ProvidesPackage{xbmks}
-%<package> [2018/06/25 v2.0.1 xbmks: Cross-document bookmarks (dps)]
+%<package> [2018/07/04 v2.0.2 xbmks: Cross-document bookmarks (dps)]
 %<*driver>
 \documentclass{ltxdoc}
 \usepackage{xcolor}
@@ -202,7 +202,11 @@
 %    We evaluate the values of \cs{xbmksetup} by getting the values of
 %    the \texttt{xbmksetup} family.
 %    \begin{macrocode}
-\newcommand{\xbmksetup}[1]{\setkeys{xbmksetup}{#1}%
+\newcommand{\xbmksetup}[1]{\setkeys{xbmksetup}{docbundle,#1}%
+%    \end{macrocode}
+%    \changes{v2.0.2}{2018/07/04}{Added an empty docbundle argument. This solves a problem
+%    that the bookmarks not appearing after an even number of compiles.}
+%    \begin{macrocode}
   \ifx\x@bmks@docs\@empty
 %    \end{macrocode}
 %     If there is no \texttt{docbundle} is specified, we use \cs{jobname} as its
@@ -212,6 +216,7 @@
     is empty,\MessageBreak
     I will give it a value of `\jobname',\MessageBreak
     in hopes this is your intention}%
+    \gdef\xbmk@cnt{1}%
     \def\xbmks@next{\write@xbmks@cfg{docbundle={\jobname},#1}}\else
     \def\xbmks@next{\write@xbmks@cfg{#1}}\fi\xbmks@next
 }
@@ -224,7 +229,7 @@
 \def\write@xbmks@cfg#1{%
   \newwrite\xbmks@setup \immediate\openout \xbmks@setup xbmks.cfg
   \set@display@protect
-  \immediate\write\xbmks@setup{\protect\xbmksetupi{#1}}
+  \immediate\write\xbmks@setup{\protect\xbmksetupi{#1}}%
   \set@typeset@protect
   \immediate\closeout\xbmks@setup
 }
@@ -447,6 +452,12 @@
     but it will have no associated action}}}
 %    \end{macrocode}
 %    \end{macro}
+%    \begin{macrocode}
+\def\x@outWarningMsg{\PackageWarningNoLine{xbmks}{%
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak
+@@ Outline files were not input, compile again @@\MessageBreak
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}}%
+%    \end{macrocode}
 %    These commands are implemented in the driver dependent sections.
 %    \begin{macrocode}
 % End package
@@ -495,7 +506,7 @@
             \calc@bm@number{##5}%
           }%
           \let\nextAction\@gobbletwo
-          \InputIfFileExists{\xbmk@filename.out}{}{}%
+          \InputIfFileExists{\xbmk@filename.out}{}{\x@outWarningMsg}%
           \def\@@BOOKMARK[##1][##2]##3##4##5{%
             \def\Hy@temp{##4}%
 %    \end{macrocode}
@@ -603,7 +614,7 @@
         \calc@bm@number{##5}%
       }%
       \let\nextAction\@gobbletwo
-      \InputIfFileExists{\xbmk@filename.out}{}{}%
+      \InputIfFileExists{\xbmk@filename.out}{}{\x@outWarningMsg}%
       \gdef\@@BOOKMARK[##1][##2]##3##4##5{%
         \def\Hy@temp{##4}%
         \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}%
@@ -701,7 +712,7 @@
             \calc@bm@number{##5}%
           }%
           \let\nextAction\@gobbletwo
-          \InputIfFileExists{\xbmk@filename.out}{}{}%
+          \InputIfFileExists{\xbmk@filename.out}{}{\x@outWarningMsg}%
           \def\@@BOOKMARK[##1][##2]##3##4##5{%
             \def\Hy@temp{##4}%
             \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}%
-- 
cgit v1.2.3

