summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-06-17 22:41:10 +0000
committerKarl Berry <karl@freefriends.org>2015-06-17 22:41:10 +0000
commit7bf720bd2b14ba547dbc0bfc46d4ef9b461cdfb5 (patch)
tree312ce0f38bab3c53b7b81bec6a66d512c31e528a /Master
parentf23ce6030bb89269cd99115fff40b1779c77d586 (diff)
pst-barcode (17jun15)
git-svn-id: svn://tug.org/texlive/trunk@37586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdfbin274754 -> 366512 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.tex55
-rw-r--r--Master/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex26
3 files changed, 70 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdf b/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdf
index 12e7e21ff11..e4b5344afec 100644
--- a/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.tex b/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.tex
index edaf38f00ef..2e39eded8ca 100644
--- a/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.tex
@@ -1,8 +1,8 @@
%% $Id: pst-bezier-doc.tex 104 2009-03-04 16:06:54Z herbert $
-\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
- headexclude,footexclude,oneside]{pst-doc}
+\documentclass[11pt,english,BCOR10mm,DIV14,bibliography=totoc,parskip=false,smallheadings
+ headexclude,footexclude,twoside]{pst-doc}
\usepackage[utf8]{inputenc}
-\usepackage{pst-barcode}
+\usepackage{pst-barcode,blindtext}
\let\pstBarcodeFV\fileversion
\lstset{preset=\centering,pos=l,wide=false,vsep=5mm,language=PSTricks,%width=0.5\linewidth,
morekeywords={multidipole,parallel},basicstyle=\footnotesize\ttfamily}
@@ -993,11 +993,12 @@ The encoding option is used to specify a desired encoding for the input data whi
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}[width=1in,wide]
-\begin{pspicture}(0.5in,0.5in)
-\psbarcode{0010000000000110001010110011010100110111000010100111010100101}{format=micro raw}{qrcode}
-\end{pspicture}
-\end{LTXexample}
+%\begin{LTXexample}[width=1in,wide]
+%\begin{pspicture}(0.5in,0.5in)
+%\psbarcode{0010000000000110001010110011010100110111000010100111010100101}{raw format=micro}{qrcode}
+%\end{pspicture}
+%\end{LTXexample}
+
@@ -1380,6 +1381,44 @@ serverdict begin 0 exitserver systemdict /quit get exec
\end{lstlisting}
+\section{QR code in the margin}
+The marginnotes are placed with the help of the macro of the same name \Lcs{marginnote},
+which itself needs package \LPack{narginnote}. It is loaded by default if the macro
+doesn't exists.
+
+\begin{lstlisting}
+\QR[1]<barcode>{http://mirror.ctan.org/help/Catalogue/bytopic.html\#barcode}
+\blindtext
+
+{\psset{fontstyle=\scriptsize\ttfamily}%
+ \QR[1]{http://mirror.ctan.org/help/Catalogue/bytopic.html\#barcode}%
+}
+\blindtext
+
+\QR{http://mirror.ctan.org/usergrps/dante/dtk/doc/beispiel.pdf}
+\blindtext
+\QR<Beispiel>{http://mirror.ctan.org/usergrps/dante/dtk/doc/beispiel.pdf}
+\blindtext
+
+\QR{http://de.wikipedia.org/wiki/QR-Code}
+\blindtext
+\end{lstlisting}
+
+\QR[1]<barcode>{http://mirror.ctan.org/help/Catalogue/bytopic.html\#barcode}
+\blindtext
+
+{\psset{fontstyle=\scriptsize\ttfamily}%
+ \QR[1]{http://mirror.ctan.org/help/Catalogue/bytopic.html\#barcode}%
+}
+\blindtext
+
+\QR{http://mirror.ctan.org/usergrps/dante/dtk/doc/beispiel.pdf}
+\blindtext
+\QR<Beispiel>{http://mirror.ctan.org/usergrps/dante/dtk/doc/beispiel.pdf}
+\blindtext
+
+\QR{http://de.wikipedia.org/wiki/QR-Code}
+\blindtext
\section{List of all optional arguments for \texttt{pst-barcode}}
diff --git a/Master/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex b/Master/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex
index a5a5420f165..047295d16b1 100644
--- a/Master/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex
+++ b/Master/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex
@@ -19,8 +19,8 @@
\let\PSTBarcodeLoaded\endinput
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
%
-\def\fileversion{0.13}
-\def\filedate{2015/05/11}
+\def\fileversion{0.14}
+\def\filedate{2015/06/17}
\message{`PST-barcode' v\fileversion, \filedate\space (tb,hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -28,14 +28,18 @@
\pst@addfams{pst-barcode}
\pstheader{pst-barcode.pro}
%
+\@ifundefined{marginnote}{\RequirePackage{marginnote}}{}
%
+\newsavebox\QR@box
+\define@key[psset]{pst-barcode}{fontstyle}[\small]{\def\pst@fontstyle{#1}}
\define@key[psset]{pst-barcode}{transx}[0]{\pst@getlength{#1}\psk@barcode@transx}
\define@key[psset]{pst-barcode}{transy}[0]{\pst@getlength{#1}\psk@barcode@transy}
\define@key[psset]{pst-barcode}{scalex}[1]{\def\psk@barcode@scalex{#1}}
\define@key[psset]{pst-barcode}{scaley}[1]{\def\psk@barcode@scaley{#1}}
\define@key[psset]{pst-barcode}{rotate}[0]{\pst@getangle{#1}\psk@barcode@rotate}
\define@boolkey[psset]{pst-barcode}[Pst@]{file}[true]{}
-\psset[pst-barcode]{transx=0,transy=0,scalex=1,scaley=1,rotate=0,file=false}
+\psset[pst-barcode]{transx=0,transy=0,scalex=1,scaley=1,rotate=0,file=false,
+ fontstyle=\small\ttfamily}
%
\def\psbarcode{\pst@object{psbarcode}}
\def\psbarcode@i#1#2#3{%
@@ -62,6 +66,22 @@
\ignorespaces%
}
%
+%
+\def\short@url#1/#2\@nil{\ifx\relax#2\relax #1\else\short@url#2\@nil\fi}
+\def\QR{\@ifnextchar[\QR@i{\QR@i[0.5]}}
+\def\QR@i[#1]{\@ifnextchar<{\QR@ii[#1]}{\QR@ii[#1]<>}}
+\def\QR@ii[#1]<#2>#3{%
+ \marginnote{\pspicture(#1in,#1in)
+ \expandafter\psbarcode\expandafter{#2}{width=#1 height=#1}{qrcode}
+ \endpspicture
+ \newline\noindent
+ \ifx\relax#2\relax
+ \sbox\QR@box{\expandafter\pst@fontstyle\short@url#3/\@nil}% Speichere Kurz-URL in \QRbox
+ \else
+ \sbox\QR@box{#2}%
+ \fi
+ \ifdim\wd\QR@box>#1in\resizebox{#1in}{\ht\QR@box}{\usebox\QR@box}\else\usebox\QR@box\fi}}
+%
\catcode`\@=\PstAtCode\relax
%
%% END: pst-barcode.tex