\documentclass[12pt]{leter}
\usepackage[paperwidth=2.25in, paperheight=4in, margin=1mm, textwidth=1.85in]{geometry} % Define paper stock size here
\special{papersize=2in,3.75in}
\usepackage{etoolbox}
\pagenumbering{gobble}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage[code=Code39,X=.275mm,ratio=2.25,H=.5cm]{makebarcode}
\newcommand\finline[3][]{\begin{myfont}[#1]{#2}#3\end{myfont}}
\usepackage{times}
\begin{document}
\newcommand{\PrintOne}[2]
{
\isblank{#2}{#1}{#2}
}
\pdfpagewidth 2.5in
\vspace{2mm}
{\Large \textbf{bin}}
\hfill
{\Large \textbf{number}}
\vspace{2mm}
\hline
\vspace{2mm}
\centerline{\barcode{number}}
\\
{\Large \centerline{\testbf{ABC-Store}} \par}
\\
{\tiny \centerline {\textbf{DIGITAL OFFICE SOLUTIONS}} \par}}
\vspace{2mm}
\hline
\PrintOne{description}{itemnotes}
\\
\small{description}
\\
Please email [email protected] 24 hours a day or Call 204-555-1212 between 8:00am 4:00pm to reorder. Please reference the Bio-Static serial number from the yellow label on your copier.
\\
\newpage
\end{document}
它的作用是打印一个带有条形码的 2.25x4 标签,然后我希望它打印\PrintOne
函数中的两个变量之一。由于某种原因,它所做的一切都会因调用程序的错误而崩溃。如果我取出,\usepackage{etoolbox}
所有内容都会打印出来。但它打印太多了,我只想打印\PrintOne
其中一个。\PrintOne
答案1
请不要对此处的间距发表评论(这不是我的问题)
主要错误是
leter
代替letter
\hline
无tabular
环境\isblank
代替\ifblank
\testbf
代替\textbf
}
在一些地方徘徊
现在可以编译了,但我不知道结果应该是什么。
\documentclass[12pt]{letter}
\usepackage[paperwidth=2.25in, paperheight=4in, margin=1mm, textwidth=1.85in]{geometry} % Define paper stock size here
%\special{papersize=2in,3.75in}
\usepackage{etoolbox}
\pagenumbering{gobble}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage[code=Code39,X=.275mm,ratio=2.25,H=.5cm]{makebarcode}
\newcommand\finline[3][]{\begin{myfont}[#1]{#2}#3\end{myfont}}
\usepackage{times}
\newcommand{\PrintOne}[2]
{
\ifblank{#2}{#1}{#2}
}
\begin{document}
\pdfpagewidth 2.5in
\vspace{2mm}
{\Large \textbf{bin}}
\hfill
{\Large \textbf{number}}
\vspace{2mm}
%\hline
\vspace{2mm}
\centerline{\barcode{42}}
{\Large \centerline{\textbf{ABC-Store}} \par}
{\tiny \centerline {\textbf{DIGITAL OFFICE SOLUTIONS}} \par}
\vspace{2mm}
%\hline
\PrintOne{description}{itemnotes}
\small{description}
Please email [email protected] 24 hours a day or Call 204-555-1212 between 8:00am 4:00pm to reorder. Please reference the Bio-Static serial number from the yellow label on your copier.
\end{document}