0

I am frequently using the same command and want some shortcuts. How can I make shortcuts to \color{blue}\textbf{some text}}?

Veak
  • 1
  • 2
    \newcommand{\boldblue}[1]{{\color{blue}\textbf{#1}}} and then \boldblue{some text}? This is quite a basic macro, you can learn more on https://www.learnlatex.org/en/lesson-06 – Rmano Sep 05 '22 at 20:06
  • \newcommand{\boldblue}[1]{\textcolor{blue}{\textbf{#1}}} feels more natural to me. – frabjous Sep 05 '22 at 20:17
  • 2
    @Rmano There are cases where \color might produce undesired output, for instance if \boldblue appears at the beginning of a paragraph. Using \textcolor is much better. – egreg Sep 05 '22 at 21:05
  • @greg I know but the OP used it - maybe they need to put paragraphs there? :-; – Rmano Sep 06 '22 at 05:16
  • Am now using \textcolor as instructed. – Veak Sep 06 '22 at 09:23

0 Answers0