Avery5160の宛名ラベル
Dec 19 2020
私は最近、以下を使用してクリスマスの宛名ラベルをMS WordからLaTeXに切り替えましたが、誰かがより良い解決策を知っているかどうか疑問に思いました。これがより一般的な解決策であることを認めますが、Avery5160ラベルのほぼ満杯の箱がまだあります。
\documentclass[letterpaper]{article}% Avery 5160
\usepackage[top=0.5in, bottom=0.5in, left=0.125in, right=0.125in, noheadfoot]{geometry}
\usepackage{varwidth}
\newenvironment{cell}{\minipage[c][1in][c]{2.75in}\centering% Avery 5160 described as 1in by 2.625in
\varwidth{2.625in}\raggedright}% but measures 2.75in wide
{\endvarwidth\endminipage\allowbreak\ignorespaces}
\parindent=0pt
\pagestyle{empty}
\begin{document}
\large% set font etc.
\begin{cell}
Name\\
Address\\
City, State Zip\\
extra line if needed
\end{cell}
\begin{cell}
Name\\
Address\\
Very wide city name, State Zip
\end{cell}
\begin{cell}
Name\\
Address\\
City, State Zip
\end{cell}
\begin{cell}
Name\\
Address\\
City, State Zip
\end{cell}
\end{document}
回答
3 StevenB.Segletes Dec 19 2020 at 05:31
これが私のセットアップと実行の方法です。私のものはAvery4013、 "3.5" x 15/16 "One Across"であるため、マルチラベル幅のページに適応する必要があります。これは基本的に、1つの列にある12個のラベルのストリップです。私は\setlabel
ラベルスペースに合わせてコンテンツの垂直方向の範囲を調整します。大きすぎると思われる場合は、空白行を追加してください。前文では、ラベル形式を変更した場合に調整できるいくつかのパラメーターを強調しています。
幅の広い用紙を指定\setlabel
し、同じ行のエントリ間の空白行を削除し\par
、の定義からを削除することで、フォーマットをマルチラベル幅フォーマットに調整できます\setlabel
。以下の最初のソリューションを参照してください。
\documentclass[12pt]{article}
\usepackage[paperwidth=4.3275in,paperheight=12in,left=0.4in,right=0.4in,
top=.63in,bottom=.12in]{geometry}% top= tuned to your printer
\usepackage{scalerel}
\usepackage[usestackEOL]{stackengine}
\parindent 0in
\parskip .24in% Related to label width
\usepackage{Palatino}% Pick a font with good stroke width
\newlength\htone
\newlength\httwo
\htone=.73in% related to label height
\httwo=.73in% related to label height
\renewcommand\stackalignment{l}
\strutlongstacks{T}
\def\setlabel#1{\hfil%
\rule[-\dp\strutbox]{0in}{\htone}\scaleto{\Longstack{#1}}{\httwo}%
\par%
}
\frenchspacing
\begin{document}
\setlabel{
Pastor Theophilus Jones\\
St. Luke Lutheran Church}% Wife Betsy
\setlabel{
Dr. \& Mrs. Greg Lastname \& Family\\
908 Streetname Dr.\\
Lancaster, PA 17601}% Liz + Kenny and Susie
\setlabel{
Herr Doktor Johann Schmidt\\
Birkenstrasse 27\\
86240 Biburg\\
GERMANY}% Mom's Uncle
\end{document}

マルチ幅
\documentclass[12pt]{article}
\usepackage[paperwidth=10in,paperheight=12in,left=0.4in,right=0.4in,
top=.63in,bottom=.12in]{geometry}% top= tuned to your printer
\usepackage{scalerel}
\usepackage[usestackEOL]{stackengine}
\parindent 0in
\parskip .24in% Related to label width
\usepackage{Palatino}% Pick a font with good stroke width
\newlength\htone
\newlength\httwo
\htone=.73in% related to label height
\httwo=.73in% related to label height
\renewcommand\stackalignment{l}
\strutlongstacks{T}
\def\setlabel#1{\hfil%
\rule[-\dp\strutbox]{0in}{\htone}\scaleto{\Longstack{#1}}{\httwo}%
% \par%
}
\frenchspacing
\begin{document}
\setlabel{
Pastor Theophilus Jones\\
St. Luke Lutheran Church}% Wife Betsy
\setlabel{
Dr. \& Mrs. Greg Lastname \& Family\\
908 Streetname Dr.\\
Lancaster, PA 17601}% Liz + Kenny and Susie
\setlabel{
Herr Doktor Johann Schmidt\\
Birkenstrasse 27\\
86240 Biburg\\
GERMANY}% Mom's Uncle
\setlabel{
Frau Doktor Johanna Schmidt\\
Birkenstrasse 27\\
86240 Biburg\\
GERMANY}% Mom's Uncle
\end{document}
