[latex3-commits] [l3svn] r6660 - l3doc: avoid hyperref warnings about newline in title
noreply at latex-project.org
noreply at latex-project.org
Mon Aug 15 18:06:35 CEST 2016
Author: bruno
Date: 2016-08-15 18:06:35 +0200 (Mon, 15 Aug 2016)
New Revision: 6660
Modified:
trunk/l3kernel/l3doc.dtx
Log:
l3doc: avoid hyperref warnings about newline in title
Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx 2016-08-15 15:37:48 UTC (rev 6659)
+++ trunk/l3kernel/l3doc.dtx 2016-08-15 16:06:35 UTC (rev 6660)
@@ -1315,6 +1315,23 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pdfstringnewline}
+% \begin{macro}[aux]{\@@_pdfstring_newline:w}
+% We avoid some hyperref warnings by making |\\| (almost) trivial in
+% bookmarks: more precisely it might be used with a star and an
+% optional argument, which we thus remove using an \pkg{xparse}
+% expandable command. Since there cannot be trailing optional
+% arguments, pick up an extra mandatory one and put it back.
+% \begin{macrocode}
+\cs_new:Npn \pdfstringnewline { : ~ }
+\DeclareExpandableDocumentCommand
+ { \@@_pdfstring_newline:w } { s o m } { \pdfstringnewline #3 }
+\pdfstringdefDisableCommands
+ { \cs_set_eq:NN \\ \@@_pdfstring_newline:w }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Design}
%
% Increase the text width slightly so that width the standard fonts
More information about the latex3-commits
mailing list