From 94c996b5f40175b4a858ddd1f19e3947198b9bd0 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 19 May 2021 03:01:49 +0000 Subject: CTAN sync 202105190301 --- macros/latex/contrib/hvqrurl/Changes | 2 ++ macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf | Bin 96082 -> 105059 bytes macros/latex/contrib/hvqrurl/doc/hvqrurl.tex | 27 ++++++++++++++++++------- macros/latex/contrib/hvqrurl/latex/hvqrurl.sty | 11 ++++++---- 4 files changed, 29 insertions(+), 11 deletions(-) (limited to 'macros/latex/contrib/hvqrurl') diff --git a/macros/latex/contrib/hvqrurl/Changes b/macros/latex/contrib/hvqrurl/Changes index 85dfdd189e..e56ba4a168 100644 --- a/macros/latex/contrib/hvqrurl/Changes +++ b/macros/latex/contrib/hvqrurl/Changes @@ -1,3 +1,5 @@ hvqrurl.sty: +0.02 2021-05-18 - added optional argument qrreverse to the set + the qr code in the opposite margin 0.01a 2019-12-01 - fixes to the documentation 0.01 2019-11-27 - first CTAN version diff --git a/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf b/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf index 7a0aa0aa49..c2d85e3b27 100644 Binary files a/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf and b/macros/latex/contrib/hvqrurl/doc/hvqrurl.pdf differ diff --git a/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex b/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex index 7125c0d723..6f9d96953f 100644 --- a/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex +++ b/macros/latex/contrib/hvqrurl/doc/hvqrurl.tex @@ -1,4 +1,4 @@ -%% $Id: hvqrurl.tex 1119 2019-11-30 17:36:28Z herbert $ +%% $Id: hvqrurl.tex 1123 2019-12-01 09:16:34Z herbert $ \listfiles \errorcontextlines=100 \documentclass[twoside,usegeometry]{scrartcl} @@ -11,6 +11,7 @@ \usepackage[showframe=false]{geometry} \usepackage{listings} +\usepackage{makeidx}\makeindex % \lstset{% language=[LaTeX]TeX,% @@ -37,7 +38,7 @@ \hypersetup{urlcolor=blue, linktocpage, colorlinks=true}% \begin{document} -\title{Package \texttt{hvqrurl}\\Creating a QR-code of an URL in the margin \\\small ver 0.01a} +\title{Package \texttt{hvqrurl}\\Creating a QR-code of an URL in the margin \\\small ver 0.02} \author{Herbert Voß\thanks{\protect\url{hvoss@tug.org}}} \date{\today} \maketitle @@ -79,8 +80,8 @@ QR codes not as a link when using \LPack{hyperref}: \subsection{No link with \LPack{hyperref}} \begin{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}. +With qrlink=nolink the QR code is no link: \hvqrurl[qrlink=nolink]{https://mirror.ctan.org/pkg/hvqrurl}. +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 @@ -93,7 +94,7 @@ the optional argument \Lkeyword{qrcolor}. The package \LPack{xcolor}\hvqrurl*[qr the reason why an extended color definition is possible. For this example we used \begin{lstlisting} -The package \LPack{xcolor}\hvqrurl*[qrcolor=red!40!white]{http://mirror.ctan.org/pkg/xcolor} +The package xcolor\hvqrurl*[qrcolor=red!40!white]{http://mirror.ctan.org/pkg/xcolor} is loaded by default, ... \end{lstlisting} @@ -105,7 +106,7 @@ to 0pt the QR code \hvqrurl*[qrlink=nolink,qradjust=0pt]{http://ctan.org/} is mo setting without a vertical adjustment. \begin{lstlisting} -The default value of \Lkeyword{qradjust} is \verb|-1.5\normalbaselineskip|. Setting the value +The default value of qradjust is \verb|-1.5\normalbaselineskip|. Setting the value to 0pt the QR code \hvqrurl*[qradjust=0pt]{http://ctan.org/} is moved down which is the default setting without a vertical adjustment. \end{lstlisting} @@ -118,7 +119,7 @@ it can be changed by setting \Lkeyword{qrheight} to another value, for example t This is an exetremely long url where it may make sense to use a larger QR code. \begin{lstlisting} -it can be changed by setting \Lkeyword{qrheight} to another value, for example to 2cm: +it can be changed by setting qrheight to another value, for example to 2cm: \hvqrurl*[qrheight=2cm]{https://identity.fu-berlin.de/idp-fub/profile/SAML2/Redirect/SSO;jsessionid=71C984647E3B8F2E716CA067CB13387E?execution=e1s1} This is an exetremely long url where it may make sense to use a larger QR code. \end{lstlisting} @@ -144,6 +145,18 @@ level \Lkeyval{H}. In general the user has not to set this keyword it will be controlled internally by the package. +\subsection{Inner or outer margin for the QR code} +By default the QR code is set in the right (oneside document) or outer margin (twoside) of the +document. This one (\hvqrurl{http://hvoss.org}) is at the default position. +With the optional argument \Lkeyword{qrreverse} it can be placed in the left or inner margin. +This one (\hvqrurl[qrreverse]{http://latex.texnik.de}) is in the other margin. + +\begin{lstlisting} +This one (\hvqrurl{http://hvoss.org}) is at the default position. +With the optional argument \Lkeyword{qrreverse} it can be placed in the left or inner margin. +This one (\hvqrurl[qrreverse]{http://latex.texnik.de}) is in the other margin. +\end{lstlisting} + \printindex diff --git a/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty b/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty index bf27b32006..64bc0ead4a 100644 --- a/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty +++ b/macros/latex/contrib/hvqrurl/latex/hvqrurl.sty @@ -1,13 +1,13 @@ -%% $Id: hvqrurl.sty 1117 2019-11-28 20:54:41Z herbert $ +%% $Id: hvqrurl.sty 1123 2019-12-01 09:16:34Z herbert $ %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. %% Either version 1.3 or, at your option, any later version. %% -% Copyright 2019 Herbert Voss hvoss@tug.org +% Copyright 2019,21 Herbert Voss hvoss@tug.org %% \ProvidesPackage{hvqrurl}[% - 2019/12/01 v.0.01a (Herbert Voss) Supports qr images into the margin (hv)] + 2021/05/18 v.0.02 (Herbert Voss) Supports qr images into the margin (hv)] % \NeedsTeXFormat{LaTeX2e} \RequirePackage{url} @@ -24,12 +24,14 @@ \define@key{hvqr}{qrcolor}[black]{\colorlet{qr@url@qrcolor}{#1}} \define@key{hvqr}{qrlevel}[M]{\def\qr@url@qrlevel{#1}} \define@key{hvqr}{qrlink}[link]{\def\qr@url@qrlink{#1}} +\define@boolkey{hvqr}[hv@]{qrreverse}[true]{}% use of the hvOBox contents -\setkeys{hvqr}{qrheight,qrcolor=black,qradjust,qrlevel,qrlink=link}% the default setting +\setkeys{hvqr}{qrheight,qrcolor=black,qradjust,qrlevel,qrlink=link,qrreverse=false}% the default setting \newcommand*\hvqrset[1]{\setkeys{hvqr}{#1}} \def\hvqrurl{\@ifnextchar*{\@tempswafalse\hvqr@url}{\@tempswatrue\hvqr@@url}} + \def\hvqr@url*{\hvqr@@url} \newcommand*\hvqr@@url[2][]{% @@ -37,6 +39,7 @@ \providecommand*\qr@blank{0}% \ifx\relax#1\relax \else\hvqrset{#1}\fi \expandafter\qrset\expandafter{\qr@url@qrlink,height=\qr@url@qrheight,level=\qr@url@qrlevel}% + \ifhv@qrreverse\reversemarginpar\fi \if@tempswa\url{#2}\fi \edef\reserved@a{\noexpand\marginnote{\noexpand\color{qr@url@qrcolor}\noexpand\qrcode{% \detokenize\expandafter{#2}}}[\qr@url@qradjust]}% -- cgit v1.2.3