1

What is the right way to have a text enlarged, colored and bold? Non of the following works;

documentclass[a4paper,11pt,fleqn]{book}

% I just write the likely relevant packages.
\usepackage{physics}
\usepackage[hidelinks]{hyperref}
\usepackage{multirow}
\usepackage{color}
\usepackage{booktabs,colortbl}
\mdfdefinestyle{algos}{backgroundcolor=mygrey, linewidth = 1.95pt, frametitlerule=false, frametitlebackgroundcolor=myblue, %
hidealllines=true}

% All colors, perhaps is not the case to be written.
\definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66}

\begin{document}

\large{\color{airforceblue} {\textbf{$N_L(k)$}}}
{\color{airforceblue} \textbf{\large $N_L(k)$}}
{\color{airforceblue} \large{\textbf{$N_L(k)$}}}

\end{document}
4
  • Perhaps {\large text} instead of \large{text} ?
    – user103221
    Commented Oct 17, 2016 at 16:31
  • Doesn't work again; {\color{airforceblue} \textbf{\large $N_{abc}$}}. Actually everything is ok except being Bold.
    – Shivid
    Commented Oct 17, 2016 at 16:33
  • please provide complete document starting with \documentclass{...}, used packages and defined colors \begin{document} your test code \end{document}.
    – Zarko
    Commented Oct 17, 2016 at 16:34
  • Incidentally, you should not load color and colortbl indepdently. Instead, run \usepackage[table]{xcolor}. This will ensure maximal interoperability.
    – Mico
    Commented Oct 17, 2016 at 16:47

1 Answer 1

2

Don't use \textbf for math-mode material. Use \mathbf instead; better yet, load the bm package and the \bm ("bold math") macro.

enter image description here

\documentclass{article}
\usepackage{xcolor,bm}
\begin{document}
$N_{abc}$ vs.\ {\Large\color{blue}$\bm{N_{abc}}$}
\end{document}

I don't know how the color "airforceblue" is defined. That's why I used "blue" in the example above. I use \Large instead of \large to make the effect of changing the font size more visually prominent.

3
  • Yes for the color is ok. It works , thanks!
    – Shivid
    Commented Oct 17, 2016 at 16:43
  • also work \textcolor{blue}{\Large$\bm{N_{abc}}$} ...
    – Zarko
    Commented Oct 17, 2016 at 16:43
  • @Zarko - Indeed, \color{<somecolor>}... is a switch, whereas \textcolor{<somecolor>}{...} takes a second argument. Same as with \bfseries vs. \textbf{...} or \itshape vs. \textit{...}. :-)
    – Mico
    Commented Oct 17, 2016 at 16:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .