centered text in sticky labels package
By default, the labels are typeset ragged right and the end of line means \newline
. So just using \centering
instead of \raggedright
is not sufficient and we need to issue \par
when a line ends.
\documentclass{article}
\usepackage{labels}
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\start@@label}{\raggedright}{\centering}{}{}
\def\start@newline{\par}%
\makeatother
\begin{document}
\begin{labels}
Me
My address
My City, State, Zipcode
My Brother
His address
His City, State, Zipcode
You
Your address
Your City, State, Zipcode
\end{labels}
\end{document}
\documentclass{article}
\usepackage{labels}
\usepackage{xpatch,ragged2e}
\makeatletter
\xpatchcmd{\start@@label}{\raggedright}{\Centering}{}{}
%\xpatchcmd{\end@@label}{\end{minipage}}{\par\end{minipage}}{}{}
\makeatother
\begin{document}
\begin{labels}
Me
My address
My City, State, Zipcode
My Brother
His address
His City, State, Zipcode
\end{labels}
\end{document}
You will get badboxes, I hope you can live with it.