TeX - LaTeX Asked by Enahs Elyoc on September 2, 2021
I am trying to create a Code 128 barcode in a LaTeX document, and want to create it based on one of the fields I am using in the textmerg
package,
code{MailId}
but am receiving
The input token "MailId" is not included in Code 128 table, will ignored.
And, true to its word, I get an empty barcode. I can’t figure out if I need to “escape” it somehow? Just a line or two before, I use this same field to grab an image by that name, so I know (believe?) it isn’t null.
No matter how much you search, you always find the answer just after posting a question:
expandaftercodeexpandafter{MailId}
Answered by user198905 on September 2, 2021
You can use barracuda
, a Lua-Based package:
% !TeX program = LuaLaTeX
begin{filecontents*}{jobname.dat}
[email protected]
[email protected]
[email protected]
end{filecontents*}
documentclass{article}
usepackage{barracuda}
usepackage{textmerg}
begin{document}
Fields{MailId}
Merge{jobname.dat}{barracuda{code128}{MailId}}
end{document}
Remember to compile with lualatex
or any other LaTeX format with any of Lua-Based typesetting TeX engine. barracuda
does not have dependences and can be used directly with no specific format. Is also possible to save barcode graphics in SVG.
Answered by robitex on September 2, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP