Bug#635491: latex-unicode bug+patch: requires PDF output, but should not
On Tue, Jul 26, 2011 at 02:55:00PM +0200, Lionel Elie Mamane wrote:
> I discovered the "missing ucs.dtx" described in my previous message
> while trying to prepare a patch for latex-unicode; I wanted to make
> it a clean patch to the ucs.dtx file (true "original" source), but
> as I did not find that file, here's that patch in form of a patch to
> the ucshyper.sty file directly.
Frank Küster, one of the Debian TeX package maintainers, has found
http://softbase.org/latex-unicode/; I have thus prepared the patch as
a patch to ucs.dtx; it is attached.
I also attach a new version of the patch with the following additional
change:
For increased backwards compatibility, if (pdf)latex is in PDF output
mode, then hyperref is implicitly loaded, as before. However, a
deprecation warning is output.
--
Lionel
--- ucs.dtx 2011-01-21 11:55:40.000000000 +0100
+++ src/ucs.dtx 2011-07-28 09:07:12.000000000 +0200
@@ -5765,13 +5765,19 @@
% \xsection{File \texttt{ucshyper.sty}}
% \begin{macrocode}
%<*ucshyper.sty>
-\ProvidesPackage{ucshyper}[2002/03/05
+\ProvidesPackage{ucshyper}[2011/07/26
UCS: Unicode in Hyperref's PDF bookmarks]%
-\ifx\pdfoutput\undefined
- \PackageWarning{ucshyper}{ucshyper needs to be run with
- pdflatex.\MessageBreak Disabling functionality}%
+\ifdefined\PrerenderUnicode\else%
+\PackageWarning{ucshyper}{ucshyper needs to be run with
+ inputenc utf8x.\MessageBreak Disabling functionality}%
\expandafter\endinput\fi
-\RequirePackage[pdftex,unicode]{hyperref}
+\ifdefined\hypersetup%
+ \hypersetup{unicode=true}%
+\else%
+ \PackageWarning{ucshyper}{ucshyper needs to be loaded after
+ hyperref.\MessageBreak Disabling functionality}%
+ \expandafter\endinput%
+\fi%
%
\newif\ifucshyper@prerender\ucshyper@prerendertrue
\newif\ifucshyper@direct\ucshyper@directtrue
--- ucs.dtx 2011-01-21 11:55:40.000000000 +0100
+++ src/ucs.dtx 2011-07-28 10:58:25.000000000 +0200
@@ -5765,13 +5765,26 @@
% \xsection{File \texttt{ucshyper.sty}}
% \begin{macrocode}
%<*ucshyper.sty>
-\ProvidesPackage{ucshyper}[2002/03/05
+\ProvidesPackage{ucshyper}[2011/07/28
UCS: Unicode in Hyperref's PDF bookmarks]%
-\ifx\pdfoutput\undefined
- \PackageWarning{ucshyper}{ucshyper needs to be run with
- pdflatex.\MessageBreak Disabling functionality}%
+\ifdefined\PrerenderUnicode\else%
+\PackageWarning{ucshyper}{ucshyper needs to be run with
+ inputenc utf8x.\MessageBreak Disabling functionality}%
\expandafter\endinput\fi
-\RequirePackage[pdftex,unicode]{hyperref}
+\RequirePackage{ifpdf}
+\ifdefined\hypersetup%
+ \hypersetup{unicode=true}%
+\else%
+ \ifpdf%
+ \PackageWarning{ucshyper}{Implicit loading of hyperref deprecated;
+ please load hyperref before ucshyper.}%
+ \RequirePackage[pdftex,unicode]{hyperref}
+ \else%
+ \PackageWarning{ucshyper}{ucshyper needs to be loaded after
+ hyperref.\MessageBreak Disabling functionality}%
+ \expandafter\endinput%
+ \fi%
+\fi%
%
\newif\ifucshyper@prerender\ucshyper@prerendertrue
\newif\ifucshyper@direct\ucshyper@directtrue
Reply to: