General ⇒ Barcodes in LaTeX
Barcodes in LaTeX
FreeBSD 6.1 + LaTeX (from teTeX-base port).
What is the easy way to make PDF file with barcodes?
I try next three steps:
1. Using code39.tex:
\input code39.tex
\begincodethirtynine{126779}\endcodethirtynine
Latex said:
! I can't find file `code39.tex'.
In what directory I need to place code39.tex file?
2. Using wlc39.mf:
\newcommand{\barcode}[1]{{\xlix@#1@}}
\font\xlix=wlc39 scaled 1100
scaled 1100 \barcode{956796;1}
LaTeX said:
! I can't find file `wlc39'.
In what directory I need to place wlc39.mf file?
3. Using pst-barcode:
\begin{pspicture}(3.5,1.2in)
\psbarcode{12345678}{includetext}{ean8}
\end{pspicture}
Latex said:
! LaTeX Error: Environment pspicture undefined.
What I need to define this inveronment?
Please, help me.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Barcodes in LaTeX
Code: Select all
\usepackage{pst-barcode,pstricks-add}
Code: Select all
\psset{unit=1in}
\begin{pspicture}(3.5,1.2)
\psbarcode{12345678}{includetext}{ean8}
\end{pspicture}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Barcodes in LaTeX
2. Using wlc39.mf:
\newcommand{\barcode}[1]{{\xlix@#1@}}
\font\xlix=wlc39 scaled 1100
scaled 1100 \barcode{956796;1}
LaTeX said:
! I can't find file `wlc39'.
In what directory I need to place wlc39.mf file?
I placed wlc39.mf to:
/usr/local/share/textmf-dist/source/public/barcode2/
And now it's ok