summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-26 21:42:47 +0000
committerKarl Berry <karl@freefriends.org>2013-10-26 21:42:47 +0000
commitfb7138686dfa87a452b0135e50f0909160009bd8 (patch)
tree79cfe26f4db0441213710338405e5d35a7e62576 /Master
parentc3ad81474a43e78dcb33ddfaeebc08504bee76f1 (diff)
pst-barcode (26oct13)
git-svn-id: svn://tug.org/texlive/trunk@32004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-barcode/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.pdfbin246009 -> 278101 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-barcode/pst-barcode-doc.tex36
-rw-r--r--Master/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex18
4 files changed, 45 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-barcode/Changes b/Master/texmf-dist/doc/generic/pst-barcode/Changes
index 67a200b8174..39729819828 100644
--- a/Master/texmf-dist/doc/generic/pst-barcode/Changes
+++ b/Master/texmf-dist/doc/generic/pst-barcode/Changes
@@ -1,4 +1,5 @@
----- pst-barcode.tex
+0.12 2013-10-26 - added option file for including an external file
0.11 2013-10-06 - added more options for data matrix
0.10 2012-08-25 - using another code for loading the ps code
0.09 2012-06-25 - using another code for loading the ps code
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 e4683eac5fc..55b731ce2a3 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 cdbaa6e96e9..72c33bffcff 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
@@ -11,6 +11,18 @@
\psbarcode{Herbert Voss Freie Universitaet Berlin}{rows=52 columns=52}{datamatrix}
\end{pspicture}}
+\begin{filecontents*}{demo.tex}
+\documentclass{article}
+\usepackage{pst-barcode,fancyvrb}
+\begin{document}
+\VerbatimInput{\jobname.tex}% test
+
+\begin{pspicture}(2in,2in)
+ \psbarcode[file]{\jobname.tex}{}{qrcode}
+\end{pspicture}
+\end{document}
+\end{filecontents*}
+
\begin{document}
\title{\texttt{pst-barcode}}
@@ -24,10 +36,9 @@
\clearpage
-\iffalse
\begin{abstract}
\noindent
-The \LPack{pstricks} package provides (essentially) one macro
+The \LPack{pstricks} related package provides (essentially) one macro
for printing barcodes. The type of the code is defined by a parameter
and passed to postscript.
@@ -35,7 +46,6 @@ and passed to postscript.
%Thanks to: \\
% Jean-C\^ome Charpentier.
\end{abstract}
-\fi
\section{Introduction}
The \LPack{pstricks} package provides (essentially) one macro
@@ -58,7 +68,7 @@ for the files:
\bigskip
There is only one macro \verb+\psbarcode+ with the usual PSTricks syntax
\begin{BDef}
-\Lcs{psbarcode}\OptArgs\Largb{PS options}\Largb{barcode type}
+\Lcs{psbarcode}\OptArgs\Largb{text or filename}\Largb{PS options}\Largb{barcode type}
\end{BDef}
Important is the fact, that the barcode is printed in a \TeX\ box of zero dimension.
@@ -77,6 +87,7 @@ or the \Lcs{makebox} macro.
\Lkeyword{scalex} & 1 & horizontal scaling\\
\Lkeyword{scaley} & 1 & vertical scaling\\
\Lkeyword{rotate} & 0 & rotating angle in degrees\\\hline
+\Lkeyword{file} & false & load an external file for the text\\\hline
\end{tabular}
\subsection{The PostScript options}
@@ -112,13 +123,26 @@ or the \Lcs{makebox} macro.
\psbarcode{01335583}{includetext}{ean8}
\end{pspicture}}\quad
\psframebox{\begin{pspicture}(-2.6,-1.5)(0.4,0.2in)
-%\psbarcode[rotate=180,linecolor=red]{01335583}{includetext guardwhitespace height=0.6}{ean8}
+\psbarcode[rotate=180,linecolor=red]{01335583}{includetext guardwhitespace height=0.6}{ean8}
\end{pspicture}}\quad
\psframebox{\begin{pspicture}(3.8,1in)
-%\psbarcode[scalex=1.5,scaley=0.5,transy=1]{01335583}{includetext inkspread=0.5}{ean8}
+\psbarcode[scalex=1.5,scaley=0.5,transy=1]{01335583}{includetext inkspread=0.5}{ean8}
\end{pspicture}}
\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering,wide]
+\begin{pspicture}(2in,2in)
+ \psbarcode[file]{demo.tex}{}{qrcode}
+\end{pspicture}
+\end{LTXexample}
+
+The contents of the external file \texttt{demo.tex}:
+
+\VerbatimInput{demo.tex}
+
+
+
\newpage
\subsection{Examples for the PostScript options}
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 ea697a9f053..a0710af9811 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.11}
-\def\filedate{2013/10/06}
+\def\fileversion{0.12}
+\def\filedate{2013/10/26}
\message{`PST-barcode' v\fileversion, \filedate\space (tb,hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -34,7 +34,8 @@
\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}
-\psset[pst-barcode]{transx=0,transy=0,scalex=1,scaley=1,rotate=0}
+\define@boolkey[psset]{pst-barcode}[Pst@]{file}[true]{}
+\psset[pst-barcode]{transx=0,transy=0,scalex=1,scaley=1,rotate=0,file=false}
%
\def\psbarcode{\pst@object{psbarcode}}
\def\psbarcode@i#1#2#3{%
@@ -45,7 +46,16 @@
\psk@barcode@scalex\space \psk@barcode@scaley\space
\psk@barcode@transx\space \psk@barcode@transy\space
translate scale rotate
- 0 0 moveto (#1) (#2) /#3 /uk.co.terryburton.bwipp findresource exec
+ 0 0 moveto
+ \ifPst@file
+ /File 10000 string def
+ /ExternalFile { (#1)(r) file } def
+ ExternalFile File readstring
+ ExternalFile closefile
+ File 0 rightTrim % strip the /000 on the right
+% pstack
+ \else (#1) \fi
+ (#2) /#3 /uk.co.terryburton.bwipp findresource exec
grestore
}%
\end@SpecialObj%