texlive[71267] Master/texmf-dist: hvqrurl (15may24)

commits+karl at tug.org commits+karl at tug.org
Wed May 15 21:13:56 CEST 2024


Revision: 71267
          https://tug.org/svn/texlive?view=revision&revision=71267
Author:   karl
Date:     2024-05-15 21:13:56 +0200 (Wed, 15 May 2024)
Log Message:
-----------
hvqrurl (15may24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes
    trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf
    trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex
    trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty

Modified: trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes	2024-05-14 23:41:48 UTC (rev 71266)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes	2024-05-15 19:13:56 UTC (rev 71267)
@@ -1,4 +1,5 @@
 hvqrurl.sty:    
+0.08  2024-05-14  - fix for color setting of the qrcode
 0.07  2024-02-06  - allow active chars in linktext
 0.06  2024-02-03  - fix for introduced bug with linktext
 0.05a 2024-02-02  - modified documentation

Modified: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex	2024-05-14 23:41:48 UTC (rev 71266)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex	2024-05-15 19:13:56 UTC (rev 71267)
@@ -1,4 +1,4 @@
-%% $Id: hvqrurl.tex 872 2024-02-06 16:11:47Z herbert $
+%% $Id: hvqrurl.tex 895 2024-05-14 19:22:17Z herbert $
 \listfiles
 \errorcontextlines=100
 \documentclass[twoside=on,usegeometry]{scrartcl}
@@ -38,7 +38,7 @@
 linktocpage, colorlinks=true}%
 
 \begin{document}
-\title{Package \texttt{hvqrurl}\\Creating a QR-code of an URL in the margin \\\small ver 0.07}
+\title{Package \texttt{hvqrurl}\\Creating a QR-code of an URL in the margin \\\small ver 0.08}
 \author{Herbert Voß\thanks{\protect\url{hvoss at tug.org}}}
 \date{\today}
 \maketitle
@@ -100,7 +100,7 @@
 
 
 \subsection{Color of the QR code}
-Without using \LPack{hyperref} the default color is \Lkeyval{black}. It can be changed by
+The default color is \Lkeyval{black}. It can be changed by
 the optional argument \Lkeyword{qrcolor}. The package 
 \LPack{xcolor}\hvqrurl*[qrlink=nolink,qrcolor=red!40!white]{https://mirror.ctan.org/pkg/xcolor}
 is loaded by default, 

Modified: trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty	2024-05-14 23:41:48 UTC (rev 71266)
+++ trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty	2024-05-15 19:13:56 UTC (rev 71267)
@@ -1,4 +1,4 @@
-%% $Id: hvqrurl.sty 872 2024-02-06 16:11:47Z herbert $
+%% $Id: hvqrurl.sty 895 2024-05-14 19:22:17Z herbert $
 %%
 %% This file is distributed under the terms of the LaTeX Project Public
 %% License from CTAN archives in directory  macros/latex/base/lppl.txt.
@@ -7,7 +7,7 @@
 % Copyright 2019,21,23,24 Herbert Voss hvoss at tug.org
 %%
 \ProvidesPackage{hvqrurl}[%
-  2024/02/06 v.0.07 (Herbert Voss) Supports qr images into the margin (hv)] 
+  2024/05/14 v.0.08 (Herbert Voss) Supports qr images into the margin (hv)] 
 %
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{url}
@@ -16,7 +16,9 @@
 \RequirePackage{qrcode}
 \RequirePackage{xkeyval}
 
-\newif\if at no@hyperref \@no at hyperreffalse
+\newif\if at no@hyperref 
+\@no at hyperreffalse
+
 \DeclareOption{nohyperref}{\@no at hyperreftrue}           
 \ProcessOptions 
 
@@ -33,6 +35,8 @@
 \define at key{hvqr}{linktext}[]{\def\qr at url@linktext{#1}}
 \define at boolkey{hvqr}[hv@]{qrreverse}[true]{}
 
+\newcommand*\qr at url@qr at nolink{nolink}
+
 \setkeys{hvqr}{qrheight,qrcolor=black,qradjust,qrlevel,qrlink=link,
 	qrreverse=false,linktext={}}% the default setting
 
@@ -46,10 +50,6 @@
 \newcommand*\hvqr@@url[2][]{%
   \begingroup
   \providecommand*\qr at blank{0}%
-  \ifx\relax#1\relax \else\hvqrset{#1}\fi
-  % Set options for package qrcode
-  \expandafter\qrset\expandafter{\qr at url@qrlink,height=\qr at url@qrheight,level=\qr at url@qrlevel}%
-  \ifhv at qrreverse\reversemarginpar\fi
   \if at tempswa
     \ifx\@empty\qr at url@linktext % alternative link text?
       \edef\hv at foo{\detokenize\expandafter{#2}}%
@@ -62,9 +62,24 @@
       \href{\hv at fooA}{\hv at fooB}%
     \fi
   \fi
-  \edef\reserved at a{\noexpand\marginnote{\noexpand\color{qr at url@qrcolor}\noexpand\qrcode{%
+%  \endgroup
+%  \begingroup
+  \ifx\relax#1\relax \else\hvqrset{#1}\fi
+  % Set options for package qrcode
+  \expandafter\qrset\expandafter{\qr at url@qrlink,height=\qr at url@qrheight,level=\qr at url@qrlevel}%
+  \ifhv at qrreverse\reversemarginpar\fi
+  \if at no@hyperref
+    \color{qr at url@qrcolor}%
+  \else
+    \ifx\qr at url@qrlink\qr at url@qr at nolink
+      \color{qr at url@qrcolor}%
+    \else 
+      \hypersetup{urlcolor=qr at url@qrcolor}%
+    \fi
+  \fi
+  \edef\reserved at a{\noexpand\marginnote{\noexpand\qrcode{%
      \detokenize\expandafter{#2}}}[\qr at url@qradjust]}%
-  \reserved at a
+    \reserved at a
   \endgroup
 }
 



More information about the tex-live-commits mailing list.