1

I'd like to create a formatting command to use like so:

\myawesomecommand{Some awesome text.} 

This should be interpreted as, for instance,

\textbf{\color{red} Some awesome text.} 

How can I do that?

3
  • 1
    \newcommand\myawesomecommand[1]{\textbf{\color{red} #1}} helps? than you can use as \myawesomecommand{Some awesome text.}
    – Zarko
    Mar 7 '18 at 18:23
  • @Zarko yes, thanks! I'll upvote it if you post it as an answer.
    – Zubo
    Mar 7 '18 at 18:25
  • you already receive answer ... :-)
    – Zarko
    Mar 7 '18 at 18:28
3
\documentclass[]{article}

\usepackage{xcolor}
\newcommand{\myawesomecommand}[1]{\textbf{\color{red} #1}}


\begin{document}

\myawesomecommand{Some awesome text.} 

\end{document}

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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