8

Consider the following code which I compile with xelatex:

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-barcode}
\begin{document}
\begin{pspicture}(1.3125in,0.7in)
    \psbarcode{9780895558213}{textsize=8 includetext height=0.7 width=1.3125}{ean13}%
\end{pspicture}%
\end{document}

which produces the output:

enter image description here

QUESTION: How may I add atop the displayed image, the associated 10-digit ISBN (0-89555-821-1) as follows: ISBN 0-89555-821-1?

Thank you.

2

2 Answers 2

8

Use a tabular:

\documentclass{article}
\usepackage{pst-barcode}
\begin{document}
\begin{tabular}{@{}c@{}}
\fontencoding{OT1}\fontfamily{phv}\small ISBN\hfill 0-89555-821-1\\
\begin{pspicture}(1.3125in,0.7in)
\psbarcode{9780895558213}{textsize=8 includetext height=0.7 width=1.3125}{ean13}%
\end{pspicture}
\end{tabular}
\end{document}

enter image description here

I'm not sure I'd mix ean13 with ean10.

0
13

Use the isbn encoder which is intended for generating ISBN numbers:

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-barcode}
\begin{document}
\begin{pspicture}(1.3125in,0.7in)
    \psbarcode{0-89555-821-1}{textsize=8 includetext height=0.7 width=1.3125}{isbn}%
\end{pspicture}%
\end{document}

This produces the following symbol:

ISBN symbol for 978-0-89555-821-3

Notice that the encoder has converted your legacy 10-digit ISBN number into the equivalent 13-digit modern format that is required at Point of Sale. If you would like to avoid this conversion then you can supply the legacy option, however use of the legacy format is not recommended.

Additional information about the 10-digit to 13-digit ISBN conversion process, as well as the relationship of ISBN to EAN-13, can be found here.

1
  • @DDS I've expanded the answer with a link to additional information that you might find relevant. Commented May 14 at 0:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .