[texhax] code128 on text coming from keyboard

Susan Dittmar Susan.Dittmar at gmx.de
Fri Sep 24 12:35:52 CEST 2010


Quoting Heiko Oberdiek (heiko.oberdiek at googlemail.com):
> On Fri, Sep 24, 2010 at 11:03:28AM +0200, Susan Dittmar wrote:
> 
> > I would like to have TeX ask for user input, and then put the user's input
> > on the paper in form of a barcode. I tried using code128.tex (see CTAN),
> > but it looks like it never gets to the input's contents. Any ideas how I
> > could solve that problem?
> > 
> > \documentclass{article}
> > \input{code128}
> > \newcommand{\ID}{}
> > \typein[\ID]{Identification Number:}
> > \begin{document}
> > Number: \ID\hspace*{\fill} \code{\ID}
> 
> \expandafter\code\expandafter{\ID}

Wonderful, thanks a LOT! I even tried using \expandafter but failed. One
day I will understand how that works ;-)

	Susan Dittmar


More information about the texhax mailing list