summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hvqrurl
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-04 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2024-02-04 03:00:55 +0000
commit16f68bbec3cca735a695904227872abc2ace1f90 (patch)
treebcabe1bea02359da24036bb8e3a9741751516a84 /macros/latex/contrib/hvqrurl
parent8d5a9f6bbecb297f513b9ed16e574db1c1310228 (diff)
CTAN sync 202402040300
Diffstat (limited to 'macros/latex/contrib/hvqrurl')
-rw-r--r--macros/latex/contrib/hvqrurl/Changes1
-rw-r--r--macros/latex/contrib/hvqrurl/doc/hvqrurl.pdfbin113856 -> 115679 bytes
-rw-r--r--macros/latex/contrib/hvqrurl/doc/hvqrurl.tex10
-rw-r--r--macros/latex/contrib/hvqrurl/latex/hvqrurl.sty17
4 files changed, 22 insertions, 6 deletions
diff --git a/macros/latex/contrib/hvqrurl/Changes b/macros/latex/contrib/hvqrurl/Changes
index a14d35f255..e7b6ca476c 100644
--- a/macros/latex/contrib/hvqrurl/Changes
+++ b/macros/latex/contrib/hvqrurl/Changes
@@ -1,4 +1,5 @@
hvqrurl.sty:
+0.06 2024-02-03 - fix for introduced bug with linktext
0.05a 2024-02-02 - modified documentation
0.05 2024-01-28 - added optional argument for alternative link text
0.04 2024-01-18 - fix for wrong text
diff --git a/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf b/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf
index 0ea564f2d7..b5103b9d16 100644
--- a/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf
+++ b/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex b/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex
index 5b0e10dc06..79c2c395ea 100644
--- a/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex
+++ b/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex
@@ -1,4 +1,4 @@
-%% $Id: hvqrurl.tex 867 2024-02-02 09:03:16Z herbert $
+%% $Id: hvqrurl.tex 870 2024-02-03 20:38:44Z herbert $
\listfiles
\errorcontextlines=100
\documentclass[twoside=on,usegeometry]{scrartcl}
@@ -82,6 +82,8 @@ QR codes not as a link when using \LPack{hyperref}:
\subsection{No link with \LPack{hyperref}}
+This needs package hyperref, which is loaded by default. With the optional argument
+\Lkeyword{nohyperref} you can prevent the loading of this package.
\begin{lstlisting}
With qrlink=nolink the QR code is no link: \hvqrurl[qrlink=nolink]{https://mirror.ctan.org/pkg/hvqrurl}.
@@ -89,7 +91,11 @@ The default setting is qrlink=link.
\end{lstlisting}
With \Lkeyset{qrlink=nolink} the QR code is no link: \hvqrurl[qrlink=nolink]{https://mirror.ctan.org/pkg/hvqrurl}.
The default setting is \Lkeyset{qrlink=link}. Without using \LPack{hyperref} this optional argument
-has no meaning.
+has no meaning. The optional argument \Lkeyword{linktext} is also only valid, if hyperref is aktive.
+
+
+
+
\subsection{Color of the QR code}
Without using \LPack{hyperref} the default color is \Lkeyval{black}. It can be changed by
diff --git a/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty b/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty
index 9786732d94..36f90a2638 100644
--- a/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty
+++ b/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty
@@ -1,4 +1,4 @@
-%% $Id: hvqrurl.sty 867 2024-02-02 09:03:16Z herbert $
+%% $Id: hvqrurl.sty 870 2024-02-03 20:38:44Z 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@tug.org
%%
\ProvidesPackage{hvqrurl}[%
- 2024/02/02 v.0.05a (Herbert Voss) Supports qr images into the margin (hv)]
+ 2024/02/03 v.0.06 (Herbert Voss) Supports qr images into the margin (hv)]
%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{url}
@@ -16,6 +16,12 @@
\RequirePackage{qrcode}
\RequirePackage{xkeyval}
+\newif\if@no@hyperref \@no@hyperreffalse
+\DeclareOption{nohyperref}{\@no@hyperreftrue}
+\ProcessOptions
+
+\if@no@hyperref\else\RequirePackage{hyperref}\fi
+
\newlength\qr@url@qrheight
\newlength\qr@url@qradjust
@@ -36,19 +42,22 @@
\def\hvqr@url*{\hvqr@@url}
+
\newcommand*\hvqr@@url[2][]{%
\begingroup
\providecommand*\qr@blank{0}%
\ifx\relax#1\relax \else\hvqrset{#1}\fi
+ % Set options for package qrcode
\expandafter\qrset\expandafter{\qr@url@qrlink,height=\qr@url@qrheight,level=\qr@url@qrlevel}%
\ifhv@qrreverse\reversemarginpar\fi
\if@tempswa
- \ifx\relax\qr@url@linktext\relax % alternative link text??
+ \ifx\@empty\qr@url@linktext % alternative link text
\edef\hv@foo{\detokenize\expandafter{#2}}%
+ \url{\hv@foo}%
\else
\edef\hv@foo{\detokenize\expandafter{\qr@url@linktext}}%
+ \href{#2}{\hv@foo}%
\fi
- \expandafter\url\expandafter{\hv@foo}%
\fi
\edef\reserved@a{\noexpand\marginnote{\noexpand\color{qr@url@qrcolor}\noexpand\qrcode{%
\detokenize\expandafter{#2}}}[\qr@url@qradjust]}%