texlive[52969] Master: hvqrurl (29nov19)

commits+karl at tug.org commits+karl at tug.org
Fri Nov 29 22:55:30 CET 2019


Revision: 52969
          http://tug.org/svn/texlive?view=revision&revision=52969
Author:   karl
Date:     2019-11-29 22:55:29 +0100 (Fri, 29 Nov 2019)
Log Message:
-----------
hvqrurl (29nov19)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/hvqrurl/
    trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes
    trunk/Master/texmf-dist/doc/latex/hvqrurl/README
    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/
    trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty
    trunk/Master/tlpkg/tlpsrc/hvqrurl.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/Changes	2019-11-29 21:55:29 UTC (rev 52969)
@@ -0,0 +1,2 @@
+hvqrurl.sty:    
+0.01 2019-11-27  - first CTAN version

Added: trunk/Master/texmf-dist/doc/latex/hvqrurl/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvqrurl/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/README	2019-11-29 21:55:29 UTC (rev 52969)
@@ -0,0 +1,10 @@
+hvqrurl
+Placing an URL as a QR code into the margin of the text.
+The package loads by default url, qrcode, marginnote, 
+xcolor, and xkeyval
+
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+
+hvoss at tug.org
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/hvqrurl/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf	2019-11-29 21:54:22 UTC (rev 52968)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf	2019-11-29 21:55:29 UTC (rev 52969)

Property changes on: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex	2019-11-29 21:55:29 UTC (rev 52969)
@@ -0,0 +1,150 @@
+%% $Id: hvqrurl.tex 1118 2019-11-29 07:56:18Z herbert $
+\listfiles
+\errorcontextlines=100
+\documentclass[twoside,usegeometry]{scrartcl}
+\usepackage{libertinus-otf}
+\setmonofont[Scale=MatchLowercase,FakeStretch=0.9]{DejaVu Sans Mono}
+\usepackage{microtype}
+\usepackage[english]{babel}
+\usepackage[automark]{scrlayer-scrpage}
+\pagestyle{scrheadings}
+
+\usepackage[showframe=false]{geometry}
+\usepackage{listings}
+%
+\lstset{%
+    language=[LaTeX]TeX,%
+    showstringspaces=false,%
+    tabsize=5,%
+    frame=single,%
+%    lineskip=-1pt,%
+    extendedchars=true,%
+    basicstyle={\small\ttfamily},%
+%    numbers=left,%
+%    stepnumber=1,%
+%    numberstyle=\tiny,%
+%    xleftmargin=2em,%
+    breaklines=true}
+%
+
+\usepackage{ragged2e}
+\usepackage{hvqrurl}
+\usepackage{xindex}
+
+\usepackage{hvdoctools}
+
+\usepackage{hyperref}
+\hypersetup{urlcolor=blue, linktocpage, colorlinks=true}%
+
+\begin{document}
+\title{Package \texttt{hvqrurl}\\Creating a QR-code of an URL in the margin \\ver 0.01}
+\author{Herbert Voß\thanks{\protect\url{hvoss at tug.org}}}
+\date{\today}
+\maketitle
+
+
+\begin{abstract}
+This package allows to draw an URL as a QR code into the margin of a one- or twosided
+document. The following packages are loaded by default:
+\LPack{qrcode}, \LPack{marginnote}, \LPack{url}, \LPack{xcolor},
+and 
+\LPack{xkeyval}.
+\end{abstract}
+
+
+\section{The macro}
+
+
+\begin{BDef}
+\Lcs{hvqrset}\Largb{key=value list}\\
+\Lcs{hvqrurl}\Largb{key=value list}\Largb{URL}\\
+\Lcs{hvqrurl*}\Largb{key=value list}\Largb{URL}
+\end{BDef}
+
+With the default macro \Lcs{hvqrurl} the URL is printed as as QR code into the margin and
+in the the text as usual with the macro \Lcs{url}, for example \hvqrurl{https://mirror.ctan.org/pkg/hvqrurl}.
+With \LPack{hyperref} you'll get the the same color for the QR code as for  the URL link and, of course,
+is also a link. This example shows the default setting for a QR code.
+
+
+\section{Optional arguments}
+
+\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}.
+\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.
+
+\subsection{Color of the QR code}
+Without using \LPack{hyperref} 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]{http://mirror.ctan.org/pkg/xcolor}
+ is loaded by default, 
+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}
+ is loaded by default, ...
+\end{lstlisting}
+
+\subsection{Vertical position of the QR code}
+By default the baseline of the QR code is nearly at the same height as the baseline of the textline.
+However, when changing the size of the QR code it may be nessesary to move up or down the QR code.
+The default value of \Lkeyword{qradjust} is \verb|-1.5\normalbaselineskip|. Setting the value
+to 0pt the QR code \hvqrurl*[qrlink=nolink,qradjust=0pt]{http://ctan.org/} is moved down which is the default
+setting without a vertical adjustment.
+
+\begin{lstlisting}
+The default value of \Lkeyword{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}
+
+
+\subsection{Size of the QR code}
+By default the QR code is a square with height and width of 1cm.
+it can be changed by setting \Lkeyword{qrheight} to another value, for example to 2cm:
+\hvqrurl*[qrlink=nolink,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.
+
+\begin{lstlisting}
+it can be changed by setting \Lkeyword{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}
+
+
+\subsection{QR code level}
+The QR code specification includes four levels of encoding: 
+Low (L) (\hvqrurl[qrlink=nolink]{https://www.tug.org/}), Medium (M), Quality (Q), 
+and High (H) (\hvqrurl[qrlink=nolink,qradjust=0pt,qrlevel=H]{https://www.tug.org/}), 
+in increasing order of error-correction capability. 
+In general, for a given text a higher error-correction level requires 
+more bits of information in the QR code. 
+
+\begin{lstlisting}
+The QR code specification includes four levels of encoding: 
+Low (L) (\hvqrurl{https://www.tug.org/}), Medium (M), Quality (Q), 
+and High (H) (\hvqrurl[qradjust=0pt,qrlevel=H]{https://www.tug.org/}), 
+in increasing order of error-correction capability. 
+\end{lstlisting}
+
+The first QR code has the default level \Lkeyval{M} and the last one the
+level \Lkeyval{H}. In general the user has not to set this keyword it will be
+controlled internally by the package.
+
+
+
+\printindex
+
+
+\section{The Package Source}
+\lstinputlisting[basicstyle=\ttfamily\footnotesize,tabsize=3,numbers=left,numberstyle=\tiny]{hvqrurl.sty}
+
+
+\end{document} 
+


Property changes on: trunk/Master/texmf-dist/doc/latex/hvqrurl/hvqrurl.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty	2019-11-29 21:55:29 UTC (rev 52969)
@@ -0,0 +1,47 @@
+%% $Id: hvqrurl.sty 1117 2019-11-28 20:54:41Z 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 at tug.org
+%%
+\ProvidesPackage{hvqrurl}[%
+  2019/11/27 v.0.01 (Herbert Voss) Supports qr images into the margin (hv)] 
+%
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{url}
+\RequirePackage{xcolor}
+\RequirePackage{marginnote}
+\RequirePackage{qrcode}
+\RequirePackage{xkeyval}
+
+\newlength\qr at url@qrheight
+\newlength\qr at url@qradjust
+
+\define at key{hvqr}{qrheight}[1cm]{\setlength\qr at url@qrheight{#1}}
+\define at key{hvqr}{qradjust}[-1.5\normalbaselineskip]{\setlength\qr at url@qradjust{#1}}
+\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}}
+
+\setkeys{hvqr}{qrheight,qrcolor=black,qradjust,qrlevel,qrlink=link}% the default setting
+
+\newcommand*\hvqrset[1]{\setkeys{hvqr}{#1}}
+
+\def\hvqrurl{\@ifnextchar*{\@tempswafalse\hvqr at url}{\@tempswatrue\hvqr@@url}}
+\def\hvqr at url*{\hvqr@@url}
+
+\newcommand*\hvqr@@url[2][]{%
+  \begingroup
+  \providecommand*\qr at blank{0}%
+  \ifx\relax#1\relax \else\hvqrset{#1}\fi
+  \expandafter\qrset\expandafter{\qr at url@qrlink,height=\qr at url@qrheight,level=\qr at url@qrlevel}%
+  \if at tempswa\url{#2}\fi
+  \edef\reserved at a{\noexpand\marginnote{\noexpand\color{qr at url@qrcolor}\noexpand\qrcode{%
+     \detokenize\expandafter{#2}}}[\qr at url@qradjust]}%
+  \reserved at a
+  \endgroup
+}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/hvqrurl/hvqrurl.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-11-29 21:54:22 UTC (rev 52968)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-11-29 21:55:29 UTC (rev 52969)
@@ -352,7 +352,7 @@
     hhtensor histogr historische-zeitschrift hitec hithesis hletter hlist
     hmtrump hobby hobete hobsub hook-pre-commit-pkg horoscop
     hpsdiss hrefhide hrlatex
-    hu-berlin-bundle hulipsum hustthesis hvfloat hvindex
+    hu-berlin-bundle hulipsum hustthesis hvfloat hvindex hvqrurl
     hypdvips hyper hyperbar hypernat hyperref hyperxmp hyph-utf8 hyphen-base 
     hyphenat hyphenex hyplain
   ibycus-babel ibygrk icite icsv identkey idxcmds idxlayout ieeepes ietfbibs

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2019-11-29 21:54:22 UTC (rev 52968)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2019-11-29 21:55:29 UTC (rev 52969)
@@ -579,6 +579,7 @@
  'holtxdoc',    "die 'skipping, use oberdiek'",
  'hvfloat',     "&MAKEflatten",
  'hvindex',     "&MAKEflatten",
+ 'hvqrurl',     "&MAKEflatten",
  'hybrid-latex', "die 'skipping, no self-locating of Python modules'",
  'hyph-utf8',   "&MAKEcopy",
  'hyphen-german',"die 'skipping, part of hyph-utf8'",

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-11-29 21:54:22 UTC (rev 52968)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-11-29 21:55:29 UTC (rev 52969)
@@ -563,6 +563,7 @@
 depend hpsdiss
 depend hrefhide
 depend hvindex
+depend hvqrurl
 depend hypdvips
 depend hyper
 depend hyperbar

Added: trunk/Master/tlpkg/tlpsrc/hvqrurl.tlpsrc
===================================================================


More information about the tex-live-commits mailing list