0

This question already has an answer here:

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

marked as duplicate by Werner macros Nov 27 '15 at 21:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Don't use \uppercase but \MakeUppercase, that's all. – egreg Nov 27 '15 at 21:56
1

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

  • 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 2:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.