GeneralNewbie question on using arguments to \newcommand

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sierra1bravo
Posts: 11
Joined: Sun Jan 04, 2009 7:28 am

Newbie question on using arguments to \newcommand

Post by sierra1bravo »

Dear all
I'd like to use arguments passed in into \newcommand as arguments to \put. The following, however, doesn't compile. What would be the right way to do this?

Code: Select all

\newcommand{\myticket}[4]{
  \ticket{%
    \put(7,38){\makebox[0mm]{\bfseries\Large #1}}
    \put{#2,#3}{#4}
  }
}
Then I try to call it with

Code: Select all

\myticket{00001}{25}{25}{11}
But doesn't work.

TIA

s.b.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

sierra1bravo
Posts: 11
Joined: Sun Jan 04, 2009 7:28 am

Re: Newbie question on using arguments to \newcommand

Post by sierra1bravo »

Sorry, trivial error--I used braces instead of parens...it works with parens.

s.b.
Post Reply