0

This question already has an answer here:

I'm trying to make a new command, to add autoincrementing numbers to the definitions throughout my thesis. Here's what I have.

\newcounter{DefCounter}
\setcounter{DefCounter}{0}

\newcommand{\mydefinition}[1]{
    \stepcounter{DefCounter}
    \textbf{Определение \theDefCounter.}#1
}

When I use it like this: \mydefinition{DEFINITION BODY} I get the numbering right, but the Определение 1. text is not bold. What should I change to make this text bold?

marked as duplicate by Sean Allred, Werner, Paul Gessler, Mico, ChrisS Mar 17 '15 at 2:30

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.

  • 5
    I can't replicate the result. Can you provide us with a minimal working example (MWE) that replicates the result? – Werner Mar 17 '15 at 1:38
  • It's likely that the font you're using doesn't support have bold face. Are you able to have bold text with, say, \documentclass{article}\begin{document}\textbf{hello, world}\end{document}? – Sean Allred Mar 17 '15 at 1:45
  • @SeanAllred thanks a lot. That is the problem indeed, I will have to modify the template I'm using. Wish I had the common sence to check if \textbf works in my case. – AndreySarafanov Mar 17 '15 at 1:48
  • Glad to hear it :) we all make this kind of mistake now and again (and again, and again, and again, …) That said, I think this is rather a duplicate of another question somewhere. This is a pretty common problem, but usually when people try to combine bold and small caps styles in the default font. – Sean Allred Mar 17 '15 at 1:52
  • By the way, if you are using LaTeX counter, consider printing a counter in LaTeX flavor. See en.wikibooks.org/wiki/LaTeX/Counters. – Symbol 1 Mar 17 '15 at 2:27
2

The problem was in the template I'm using. The font defined in it does not support \textbf. The problem has nothing to do with macros. UPD. Silly me. The template was ok, I just had to install the font.

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