texlive[69621] Master/texmf-dist: hvqrurl (28jan24)

commits+karl at tug.org commits+karl at tug.org
Sun Jan 28 22:25:08 CET 2024


Revision: 69621
          https://tug.org/svn/texlive?view=revision&revision=69621
Author:   karl
Date:     2024-01-28 22:25:08 +0100 (Sun, 28 Jan 2024)
Log Message:
-----------
hvqrurl (28jan24)

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-01-28 21:24:59 UTC (rev 69620)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes	2024-01-28 21:25:08 UTC (rev 69621)
@@ -1,4 +1,5 @@
 hvqrurl.sty:    
+0.05  2024-01-28  - added optional argument for alternative link text
 0.04  2024-01-18  - fix for wrong text
 0.03  2023-10-29  - fix for # in an url
 0.02  2021-05-18  - added optional argument qrreverse to the set

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-01-28 21:24:59 UTC (rev 69620)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex	2024-01-28 21:25:08 UTC (rev 69621)
@@ -1,4 +1,4 @@
-%% $Id: hvqrurl.tex 837 2024-01-18 07:43:31Z herbert $
+%% $Id: hvqrurl.tex 848 2024-01-28 11:57:35Z herbert $
 \listfiles
 \errorcontextlines=100
 \documentclass[twoside=on,usegeometry]{scrartcl}
@@ -159,7 +159,22 @@
 This one (\hvqrurl[qrreverse]{https://latex.texnik.de}) is in the other margin.
 \end{lstlisting}
 
+\subsection{Alternative link text}
+By default the QR code is set with the given text. If the link is too long, one
+can use a short link with the optional argument \Lkeyword{linktext} for the text and 
+the long link for the qrcode, like
+this one: \hvqrurl[linktext=https://www.uni-bonn.de]%
+{https://www.uni-bonn.de/de/studium/studienangebot/studiengaenge-a-z/kunstgeschichte-bazf?set_language=de}.
 
+\begin{lstlisting}
+By default the QR code is set with the given text. If the link is too long, one
+can use a short link with the optional argument \Lkeyword{linktext} for the text and 
+the long link for the qrcode, like
+this one: \hvqrurl[linktext=https://www.uni-bonn.de]%
+{https://www.uni-bonn.de/de/studium/studienangebot/studiengaenge-a-z/kunstgeschichte-bazf?set_language=de}.
+\end{lstlisting}
+
+
 \printindex
 
 

Modified: trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty	2024-01-28 21:24:59 UTC (rev 69620)
+++ trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty	2024-01-28 21:25:08 UTC (rev 69621)
@@ -1,4 +1,4 @@
-%% $Id: hvqrurl.sty 837 2024-01-18 07:43:31Z herbert $
+%% $Id: hvqrurl.sty 848 2024-01-28 11:57:35Z 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/01/18 v.0.04 (Herbert Voss) Supports qr images into the margin (hv)] 
+  2024/01/28 v.0.05 (Herbert Voss) Supports qr images into the margin (hv)] 
 %
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{url}
@@ -24,9 +24,11 @@
 \define at key{hvqr}{qrcolor}[black]{\colorlet{qr at url@qrcolor}{#1}}
 \define at key{hvqr}{qrlevel}[M]{\def\qr at url@qrlevel{#1}}
 \define at key{hvqr}{qrlink}[link]{\def\qr at url@qrlink{#1}}
+\define at key{hvqr}{linktext}[]{\def\qr at url@linktext{#1}}
 \define at boolkey{hvqr}[hv@]{qrreverse}[true]{}
 
-\setkeys{hvqr}{qrheight,qrcolor=black,qradjust,qrlevel,qrlink=link,qrreverse=false}% the default setting
+\setkeys{hvqr}{qrheight,qrcolor=black,qradjust,qrlevel,qrlink=link,
+	qrreverse=false,linktext={}}% the default setting
 
 \newcommand*\hvqrset[1]{\setkeys{hvqr}{#1}}
 
@@ -41,7 +43,11 @@
   \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
-    \edef\hv at foo{\detokenize\expandafter{#2}}%
+    \ifx\relax\qr at url@linktext\relax % alternative link text??
+      \edef\hv at foo{\detokenize\expandafter{#2}}%
+    \else
+      \edef\hv at foo{\detokenize\expandafter{\qr at url@linktext}}%
+    \fi
     \expandafter\url\expandafter{\hv at foo}%
   \fi
   \edef\reserved at a{\noexpand\marginnote{\noexpand\color{qr at url@qrcolor}\noexpand\qrcode{%



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