-1

I tried ChatGPT and Bard for this first, but both responses were a little off. Here's my request:

I need a LaTeX program like this: the label format is 2 wide, 10 rows down per page. Within the label I need the three columns as specified before ("not for infants under 1 yr", "Kate's Blackberry Honey", (graphic placeholder above) , "Not for infants under 1 yr" ) thanks ... Avery 5163 are the labels ... Thanks

Here's Bard's latest:

\documentclass{article}

\usepackage{graphicx}

\newcommand{\mylabel}[4]{% \begin{tabular}{@{}c@{\hspace{20pt}}c@{\hspace{20pt}}c@{}} #1 & #2 & #3
#4 & & \end{tabular}% }

\begin{document}

\noindent\begin{minipage}{.5\textwidth}

\centering

\mylabel{Not for infants under 1 yr}{Kate's Blackberry Honey}{Graphic placeholder above}{Not for infants under 1 yr}

\end{minipage}\hfill \begin{minipage}{.5\textwidth}

\centering

\mylabel{Not for infants under 1 yr}{Kate's Blackberry Honey}{Graphic placeholder above}{Not for infants under 1 yr}

\end{minipage}

\end{document}

This isn't quite right; I get

Extra alignment tab has been changed to \cr. \unskip \hfil }\endtemplate

l.18 ...eholder above}{Not for infants under 1 yr}

Looks like it's close; can you help please?

Qrrbrbirlbel
  • 119,821
  • Welcome. I believe you have a typo. It should be \\ instead of \ after #3. – Qrrbrbirlbel Apr 25 '23 at 00:37
  • @Qrrbrbirlbel OP admitted it was generated by AI... although I thought AI tools these days should be better at these trivial errors like that. – user202729 Apr 25 '23 at 02:25
  • (In terms of effort, OP appears to have not really learnt some basics of LaTeX syntax, which may or may not be a reason for refusing to answer a question, I'm not too sure of the policy...) – user202729 Apr 25 '23 at 02:26
  • @user202729 - I'm pretty sure the OP's opening paragraph was supposed to be a joke. – Mico Apr 25 '23 at 02:51
  • Somewhat related: https://tex.stackexchange.com/questions/575573/mailing-labels-for-avery-5160?r=SearchResults&s=1%7C67.0962 – John Kormylo Apr 25 '23 at 12:47
  • I'm not understanding "two wide" and "three columns". Do you mean six columns total? Could you show your desired output either as a drawing or as ascii art? – Teepeemm Apr 25 '23 at 12:50
  • The labels are 4in wide and 2in tall, centered on the paper (0.25in margins left and right, 0.75in margns top and bottom). – John Kormylo Apr 25 '23 at 12:53
  • @user202729 Even today, the AI is far from really understanding anything other than the probability of successful outings, so it can draw a dog in amazing detail, but at the same time forget that it shouldn't have more than four legs. Most humans can only draw dogs in pathetic detail from reality, but they never make these kinds of mistakes, because humans really understand what a dog looks like, AI doesn't yet. The same thing happens with programming languages. – Fran Apr 25 '23 at 21:04
  • ( @Fran Let us not get off-topic here.) – user202729 Apr 26 '23 at 00:21

1 Answers1

0

You can use the labels package.

http://tug.ctan.org/tex-archive/macros/latex/contrib/labels/labels.pdf

It is built to do what you are asking for.

Or not?

  • I have the labels package installed and in fact just reinstalled all of LaTeX and still getting this error: ```! LaTeX Error: Missing \begin{document}.

    See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help.

    l.4 \usepackage {graphicx}```

    – Mark McWiggins Apr 25 '23 at 23:04
  • I tried this in the overleaf editor and got three errors: – Mark McWiggins Apr 25 '23 at 23:48
  • I tried this in the overleaf editor and got three errors: \usepackage{graphicx} and \RightPageMargin=15mm and \TopPageMargin=15mm and \InterLabelColumn=8mm – Mark McWiggins Apr 26 '23 at 00:01