1

I've got some layout that I'm trying to make into something that can be parameterized with dynamic text:

\documentclass{article}     
\usepackage{tikz}

\definecolor{spotcolor}{cmyk}{.40,0,.70,0}

\begin{document}
  \begin{tikzpicture}
    \node [ white, fill=spotcolor, rounded corners=4pt, inner sep=4pt, font=\sffamily] at  (-1.1in,-.7in){\tiny\uppercase { starter }};
  \end{tikzpicture}
\end{document}  

enter image description here

However when I make the label dynamic text using a macro...

\documentclass{article}     
\usepackage{tikz}

\definecolor{spotcolor}{cmyk}{.40,0,.70,0}
\newcommand{\level}{starter}

\begin{document}
  \begin{tikzpicture}
    \node [ white, fill=spotcolor, rounded corners=4pt, inner sep=4pt, font=\sffamily] at  (-1.1in,-.7in){\tiny\uppercase { \level }};
  \end{tikzpicture}
\end{document}  

The \uppercase command seems to have no effect

enter image description here

1 Answers1

2

Use \MakeUppercase:

\documentclass{article}
\usepackage{tikz}

\definecolor{spotcolor}{cmyk}{.40,0,.70,0}
\newcommand\level{starter}

\begin{document}
  \begin{tikzpicture}
    \node [ white, fill=spotcolor, rounded corners=4pt, inner sep=4pt, font=\sffamily] at (-1.1in,-.7in){\tiny\MakeUppercase { \level }};
  \end{tikzpicture}
\end{document} 

enter image description here

Bernard
  • 271,350
  • That's weird... a question marked as a duplicate (i.e., closed) that has an answer after it was closed. – Werner Nov 27 '15 at 22:03
  • @Werner: Sorry, I didn't see it. I guess we were clicking at the same time. Shall I delete it? – Bernard Nov 27 '15 at 22:05
  • Nah, keep it. It is just strange as the system typically doesn't accept answers after a question is closed. However, yours seemed to slip through for some reason. – Werner Nov 27 '15 at 22:06
  • Sorry to bother you both. I saw it was a duplicate right after I posted it and tried to comment about that, but not sure that went through either. Thanks for the help. I really appreciate everyone on this site while I'm learning LaTeX. – Ultrasaurus Nov 28 '15 at 02:18