TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can make my xticklabel apply \bfseries, I can make my xlabel and ylabel apply \bfseries. For some reason, I cannot seem to get my yticklabel to apply this effect. At least when I compare the "1" in my xticklabel, it is clearly different than that in my yticklabel.

Fairly related, but happy to split into a 2nd question, is applying the same bold weight to the every node near coord/.append style. I do believe that these values are generated in mathmode, so I am not surprised I was not successful in applying a standard \bfseries weight to them. But if someone could provide a solution to that as well, it would be great. I did try, based on zero understanding of the inner workings, to use the etoolbox package and \robustify\bfseries without effect.

%This didn't work either


%\tikzexternalize[shell escape=-enable-write18]
%\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error %
%-interaction=batchmode -jobname "\image" "\texsource" && dvips -o "\image".ps %
        ybar, bar shift=0pt, bar width=12,
        enlarge x limits=0.07,
        ylabel={Free Energy Difference (\si{\kcalpmole})},
        xlabel={Trapping Product},
        label style={color=white,font=\bfseries},
        every axis/.style={color=white},
%       I also tried manually setting the ticks, in hopes that would trigger the change        
%       ytick={-100,-80,-60,-40,-20,0,20,40},
        xtick pos=left,
        nodes near coords,
        %Here I tried setting \bfseries for my nodes without success
        every node near coord/.append style={font=\bfseries,%
        /pgf/number format/.cd,
        fixed zerofill,
        nodes near coords align={vertical},
        tick label style={font=\bfseries\Large},       
%        y tick label style={color=white,font=\bfseries},
%       I used to just have this x tick label style line below, then I tried the separate y tick label style
%       and also the tick label style above that
%        x tick label style={anchor=center,yshift=-6pt,color=white,font=\bfseries\large},
        symbolic x coords={1,2,3,4,5,6,7,8,9,10,11,12}
share|improve this question
up vote 2 down vote accepted

Using \boldmath instead of \bfseries is sufficient for both questions.

enter image description here

I would really consider changing the style but it's a matter of taste.

share|improve this answer
Can you explain what you would design differently? I do have some requirements, black background and white text are a must. Everything else is pretty much open to changing. Also, is there a way to get the text size of the ylabel to match that of the xlabel? They should look exactly the same font style/size, etc. – J M Sep 10 '12 at 3:40
@JM Then nevermind. Those are the ones that I had in mind but if so, there is not much to do. They look pretty much the same to me. – percusse Sep 10 '12 at 3:40
Yea, it is for a presentation, and the whole template we use are black background, white text. It has the benefit that when we spot color portions of a slide, colors really pop against the black background. – J M Sep 10 '12 at 3:42
@JM There is a nice chapter in beamer manual about this dark background issue ;) – percusse Sep 10 '12 at 3:43
:) Yea, I do understand some of those (like the difficulty reading, hence the need for bold text). But this is a standard requirement I must have. Any help on that size issue in my first comment? Can I force "textmode" – J M Sep 10 '12 at 3:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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