“Correct” way to bold/italicize text?












334















Is either of these considered better/more readable/more "proper"/more conventional than the other for making text bold? If so, what is the reason?



I like my text textbf{bold}


versus:



I like my text {bf bold}









share|improve this question




















  • 66





    It is very simple: DO NOT USE bf IN MODERN LaTeX DOCUMENTS! It is deprecated. Use bfseries instead, which will work properly under the New Font Selection Scheme (NFSS) of LaTeX2e. About textbf vs. bfseries: There is no real difference, except that the latter will not read the text as argument and therefore work with verbatim content, but there you hardly use bold font anyway. See Does it matter if I use textit or it and Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Martin Scharrer
    Jan 20 '12 at 11:36


















334















Is either of these considered better/more readable/more "proper"/more conventional than the other for making text bold? If so, what is the reason?



I like my text textbf{bold}


versus:



I like my text {bf bold}









share|improve this question




















  • 66





    It is very simple: DO NOT USE bf IN MODERN LaTeX DOCUMENTS! It is deprecated. Use bfseries instead, which will work properly under the New Font Selection Scheme (NFSS) of LaTeX2e. About textbf vs. bfseries: There is no real difference, except that the latter will not read the text as argument and therefore work with verbatim content, but there you hardly use bold font anyway. See Does it matter if I use textit or it and Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Martin Scharrer
    Jan 20 '12 at 11:36
















334












334








334


130






Is either of these considered better/more readable/more "proper"/more conventional than the other for making text bold? If so, what is the reason?



I like my text textbf{bold}


versus:



I like my text {bf bold}









share|improve this question
















Is either of these considered better/more readable/more "proper"/more conventional than the other for making text bold? If so, what is the reason?



I like my text textbf{bold}


versus:



I like my text {bf bold}






best-practices bold italic






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 20 '12 at 12:58









Martin Scharrer

202k47647822




202k47647822










asked Jan 20 '12 at 4:00









MehrdadMehrdad

3,20072333




3,20072333








  • 66





    It is very simple: DO NOT USE bf IN MODERN LaTeX DOCUMENTS! It is deprecated. Use bfseries instead, which will work properly under the New Font Selection Scheme (NFSS) of LaTeX2e. About textbf vs. bfseries: There is no real difference, except that the latter will not read the text as argument and therefore work with verbatim content, but there you hardly use bold font anyway. See Does it matter if I use textit or it and Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Martin Scharrer
    Jan 20 '12 at 11:36
















  • 66





    It is very simple: DO NOT USE bf IN MODERN LaTeX DOCUMENTS! It is deprecated. Use bfseries instead, which will work properly under the New Font Selection Scheme (NFSS) of LaTeX2e. About textbf vs. bfseries: There is no real difference, except that the latter will not read the text as argument and therefore work with verbatim content, but there you hardly use bold font anyway. See Does it matter if I use textit or it and Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

    – Martin Scharrer
    Jan 20 '12 at 11:36










66




66





It is very simple: DO NOT USE bf IN MODERN LaTeX DOCUMENTS! It is deprecated. Use bfseries instead, which will work properly under the New Font Selection Scheme (NFSS) of LaTeX2e. About textbf vs. bfseries: There is no real difference, except that the latter will not read the text as argument and therefore work with verbatim content, but there you hardly use bold font anyway. See Does it matter if I use textit or it and Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

– Martin Scharrer
Jan 20 '12 at 11:36







It is very simple: DO NOT USE bf IN MODERN LaTeX DOCUMENTS! It is deprecated. Use bfseries instead, which will work properly under the New Font Selection Scheme (NFSS) of LaTeX2e. About textbf vs. bfseries: There is no real difference, except that the latter will not read the text as argument and therefore work with verbatim content, but there you hardly use bold font anyway. See Does it matter if I use textit or it and Will two-letter font style commands (bf , it , …) ever be resurrected in LaTeX?.

– Martin Scharrer
Jan 20 '12 at 11:36












3 Answers
3






active

oldest

votes


















335














Marc van Dongen gave a great answer. I'll throw in another reason:



it and bf do not play well together. That is, they do not nest as one would intuitively expect:





Whereas textit and textbf do play well together:





This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:





If this is a problem for you, then use the slantsc package in combination with the lmodern package. slantsc provides, among other things, rmfamily (roman), ttfamily (typewriter/​teletype), sffamily (sans-serif), bfseries (boldface), itshape (italics), slshape (slant/​oblique), and scshape (small caps). With these, small caps can obtained in slanted form:





As a bonus, slantsc fixes textsl to behave properly with textsc, so you can continue using those if you like.



Alas, I haven't yet found a package which fixes the behavior of nested instances of textit. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics (which should ideally render as roman, not italics):




Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner
Sank
. New York, NY: Hyperion/​Madison Press, 1998.




As a workaround, one can usually write textrm to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.



Update:



As others have pointed out, textit and textsl do automatic italic correction, whereas it, itshape, sl, and slshape do not. Thus, you can write textit{stuff}, but you must write {it stuff/} or {itshape stuff/} to get the same effect.






share|improve this answer





















  • 18





    See above: Don't use bf or it.

    – Martin Schröder
    Jan 20 '12 at 12:57






  • 25





    Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

    – John Tang Boyland
    Apr 28 '15 at 15:50



















108














In general the command (textbf/textit) approach is more useful if the text is followed by more text on the same line and isn't followed by a small punctuation symbol. If the text is in a paragraph on its own or is followed by a small punctuation symbol, it doesn't matter really. In that case the declarations (bf/bfseries and it/itshape) are equivalent to the commands. As pointed out be others, the declarations bf and it are deprecated and should be avoided.



To see why the commands should be preferred, notice that textit inserts an italic correction at the end, which adds a small horizontal compensation if the text ends in letters with long ascenders that would otherwise run into the next character. The declarations (it and itshape) don't insert an italic correction.



The fourth, fifth, and sixth row in the following shows why the commands may differ from the declarations. In the fourth row you get a proper italic correction, in the fifth and the sixth you don't and this results in the ff ligature running in to the h.



documentclass{article}

usepackage{booktabs}

begin{document}
Huge
begin{tabular}{lll}
toprule
verb|textbf{fluff} hair| & textbf{fluff} hair
\verb|{bf fluff} hair| & {bf fluff} hair
\verb|{bfseries fluff} hair| & {bfseries fluff} hair
\midrule
verb|textit{fluff} hair| & textit{fluff} hair
\verb|{itshape fluff} hair| & {itshape fluff} hair
\verb|{it fluff} hair| & {it fluff} hair
\bottomrule
end{tabular}
end{document}


<code>textbf</code>, <code>textit</code> vs <code>bfseries</code>, <code>itshape</code> and <code>bf</code>, <code>it</code>






share|improve this answer





















  • 8





    documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

    – egreg
    Jan 20 '12 at 9:57






  • 5





    See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

    – Martin Schröder
    Jan 20 '12 at 12:56



















50














First of all you should not use the obsolete bf or it macros from LaTeX2.0. They do not use the new font selection scheme (NFSS) of LaTeX2e. So bf will do bold and bold only, but will not mix with an italic setting, which makes bold-italic impossible. Use the new bfseries macro instead.



There is not much practical difference between textbf{<content>} and {bfseries <content>}. I would say most people use (for short texts) the first usage because it follows the common somemacro{<content>} LaTeX style. The latter should be used if you want to make the rest of an environment/group bold, of course.



You should note that textbf uses bfseries internal, so the latter is a more fundamental macro.
The definition of textbf is:



ifmmode
nfss@text {bfseries #1}%
else
hmode@bgroup
text@command {#1}%
bfseries check@icl #1check@icr
expandafter
egroup
fi


So textbf switches to text mode inside math mode, while bfseries apparently doesn't.
It also adds checks for italic correction before and after the content, which is a great feature of LaTeX2e.



One benefit of bfseries is that it doesn't read the content as an argument, which would interfere with catcode changes required by verbatim content and other special code.



In summary I recommend textbf for smaller texts, mainly because of the italic correction, and in math mode. bfseries is IMHO more intended for environments and larger texts. One notable exception is if you have bold and italic (etc.) combinations, then you could write textit{bfseries <content>}, to avoid two sets of braces, but this is more a fashion choice. You should not use bf in modern LaTeX documents.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f41681%2fcorrect-way-to-bold-italicize-text%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    335














    Marc van Dongen gave a great answer. I'll throw in another reason:



    it and bf do not play well together. That is, they do not nest as one would intuitively expect:





    Whereas textit and textbf do play well together:





    This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:





    If this is a problem for you, then use the slantsc package in combination with the lmodern package. slantsc provides, among other things, rmfamily (roman), ttfamily (typewriter/​teletype), sffamily (sans-serif), bfseries (boldface), itshape (italics), slshape (slant/​oblique), and scshape (small caps). With these, small caps can obtained in slanted form:





    As a bonus, slantsc fixes textsl to behave properly with textsc, so you can continue using those if you like.



    Alas, I haven't yet found a package which fixes the behavior of nested instances of textit. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics (which should ideally render as roman, not italics):




    Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner
    Sank
    . New York, NY: Hyperion/​Madison Press, 1998.




    As a workaround, one can usually write textrm to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.



    Update:



    As others have pointed out, textit and textsl do automatic italic correction, whereas it, itshape, sl, and slshape do not. Thus, you can write textit{stuff}, but you must write {it stuff/} or {itshape stuff/} to get the same effect.






    share|improve this answer





















    • 18





      See above: Don't use bf or it.

      – Martin Schröder
      Jan 20 '12 at 12:57






    • 25





      Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

      – John Tang Boyland
      Apr 28 '15 at 15:50
















    335














    Marc van Dongen gave a great answer. I'll throw in another reason:



    it and bf do not play well together. That is, they do not nest as one would intuitively expect:





    Whereas textit and textbf do play well together:





    This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:





    If this is a problem for you, then use the slantsc package in combination with the lmodern package. slantsc provides, among other things, rmfamily (roman), ttfamily (typewriter/​teletype), sffamily (sans-serif), bfseries (boldface), itshape (italics), slshape (slant/​oblique), and scshape (small caps). With these, small caps can obtained in slanted form:





    As a bonus, slantsc fixes textsl to behave properly with textsc, so you can continue using those if you like.



    Alas, I haven't yet found a package which fixes the behavior of nested instances of textit. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics (which should ideally render as roman, not italics):




    Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner
    Sank
    . New York, NY: Hyperion/​Madison Press, 1998.




    As a workaround, one can usually write textrm to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.



    Update:



    As others have pointed out, textit and textsl do automatic italic correction, whereas it, itshape, sl, and slshape do not. Thus, you can write textit{stuff}, but you must write {it stuff/} or {itshape stuff/} to get the same effect.






    share|improve this answer





















    • 18





      See above: Don't use bf or it.

      – Martin Schröder
      Jan 20 '12 at 12:57






    • 25





      Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

      – John Tang Boyland
      Apr 28 '15 at 15:50














    335












    335








    335







    Marc van Dongen gave a great answer. I'll throw in another reason:



    it and bf do not play well together. That is, they do not nest as one would intuitively expect:





    Whereas textit and textbf do play well together:





    This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:





    If this is a problem for you, then use the slantsc package in combination with the lmodern package. slantsc provides, among other things, rmfamily (roman), ttfamily (typewriter/​teletype), sffamily (sans-serif), bfseries (boldface), itshape (italics), slshape (slant/​oblique), and scshape (small caps). With these, small caps can obtained in slanted form:





    As a bonus, slantsc fixes textsl to behave properly with textsc, so you can continue using those if you like.



    Alas, I haven't yet found a package which fixes the behavior of nested instances of textit. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics (which should ideally render as roman, not italics):




    Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner
    Sank
    . New York, NY: Hyperion/​Madison Press, 1998.




    As a workaround, one can usually write textrm to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.



    Update:



    As others have pointed out, textit and textsl do automatic italic correction, whereas it, itshape, sl, and slshape do not. Thus, you can write textit{stuff}, but you must write {it stuff/} or {itshape stuff/} to get the same effect.






    share|improve this answer















    Marc van Dongen gave a great answer. I'll throw in another reason:



    it and bf do not play well together. That is, they do not nest as one would intuitively expect:





    Whereas textit and textbf do play well together:





    This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:





    If this is a problem for you, then use the slantsc package in combination with the lmodern package. slantsc provides, among other things, rmfamily (roman), ttfamily (typewriter/​teletype), sffamily (sans-serif), bfseries (boldface), itshape (italics), slshape (slant/​oblique), and scshape (small caps). With these, small caps can obtained in slanted form:





    As a bonus, slantsc fixes textsl to behave properly with textsc, so you can continue using those if you like.



    Alas, I haven't yet found a package which fixes the behavior of nested instances of textit. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics (which should ideally render as roman, not italics):




    Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner
    Sank
    . New York, NY: Hyperion/​Madison Press, 1998.




    As a workaround, one can usually write textrm to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.



    Update:



    As others have pointed out, textit and textsl do automatic italic correction, whereas it, itshape, sl, and slshape do not. Thus, you can write textit{stuff}, but you must write {it stuff/} or {itshape stuff/} to get the same effect.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 31 '15 at 4:45









    Dave Jarvis

    4,57184083




    4,57184083










    answered Jan 20 '12 at 11:51









    Todd LehmanTodd Lehman

    9,81223450




    9,81223450








    • 18





      See above: Don't use bf or it.

      – Martin Schröder
      Jan 20 '12 at 12:57






    • 25





      Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

      – John Tang Boyland
      Apr 28 '15 at 15:50














    • 18





      See above: Don't use bf or it.

      – Martin Schröder
      Jan 20 '12 at 12:57






    • 25





      Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

      – John Tang Boyland
      Apr 28 '15 at 15:50








    18




    18





    See above: Don't use bf or it.

    – Martin Schröder
    Jan 20 '12 at 12:57





    See above: Don't use bf or it.

    – Martin Schröder
    Jan 20 '12 at 12:57




    25




    25





    Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

    – John Tang Boyland
    Apr 28 '15 at 15:50





    Rather than nesting textit{...} you should use emph{...} which correctly reverts to roman inside of italics.

    – John Tang Boyland
    Apr 28 '15 at 15:50











    108














    In general the command (textbf/textit) approach is more useful if the text is followed by more text on the same line and isn't followed by a small punctuation symbol. If the text is in a paragraph on its own or is followed by a small punctuation symbol, it doesn't matter really. In that case the declarations (bf/bfseries and it/itshape) are equivalent to the commands. As pointed out be others, the declarations bf and it are deprecated and should be avoided.



    To see why the commands should be preferred, notice that textit inserts an italic correction at the end, which adds a small horizontal compensation if the text ends in letters with long ascenders that would otherwise run into the next character. The declarations (it and itshape) don't insert an italic correction.



    The fourth, fifth, and sixth row in the following shows why the commands may differ from the declarations. In the fourth row you get a proper italic correction, in the fifth and the sixth you don't and this results in the ff ligature running in to the h.



    documentclass{article}

    usepackage{booktabs}

    begin{document}
    Huge
    begin{tabular}{lll}
    toprule
    verb|textbf{fluff} hair| & textbf{fluff} hair
    \verb|{bf fluff} hair| & {bf fluff} hair
    \verb|{bfseries fluff} hair| & {bfseries fluff} hair
    \midrule
    verb|textit{fluff} hair| & textit{fluff} hair
    \verb|{itshape fluff} hair| & {itshape fluff} hair
    \verb|{it fluff} hair| & {it fluff} hair
    \bottomrule
    end{tabular}
    end{document}


    <code>textbf</code>, <code>textit</code> vs <code>bfseries</code>, <code>itshape</code> and <code>bf</code>, <code>it</code>






    share|improve this answer





















    • 8





      documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

      – egreg
      Jan 20 '12 at 9:57






    • 5





      See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

      – Martin Schröder
      Jan 20 '12 at 12:56
















    108














    In general the command (textbf/textit) approach is more useful if the text is followed by more text on the same line and isn't followed by a small punctuation symbol. If the text is in a paragraph on its own or is followed by a small punctuation symbol, it doesn't matter really. In that case the declarations (bf/bfseries and it/itshape) are equivalent to the commands. As pointed out be others, the declarations bf and it are deprecated and should be avoided.



    To see why the commands should be preferred, notice that textit inserts an italic correction at the end, which adds a small horizontal compensation if the text ends in letters with long ascenders that would otherwise run into the next character. The declarations (it and itshape) don't insert an italic correction.



    The fourth, fifth, and sixth row in the following shows why the commands may differ from the declarations. In the fourth row you get a proper italic correction, in the fifth and the sixth you don't and this results in the ff ligature running in to the h.



    documentclass{article}

    usepackage{booktabs}

    begin{document}
    Huge
    begin{tabular}{lll}
    toprule
    verb|textbf{fluff} hair| & textbf{fluff} hair
    \verb|{bf fluff} hair| & {bf fluff} hair
    \verb|{bfseries fluff} hair| & {bfseries fluff} hair
    \midrule
    verb|textit{fluff} hair| & textit{fluff} hair
    \verb|{itshape fluff} hair| & {itshape fluff} hair
    \verb|{it fluff} hair| & {it fluff} hair
    \bottomrule
    end{tabular}
    end{document}


    <code>textbf</code>, <code>textit</code> vs <code>bfseries</code>, <code>itshape</code> and <code>bf</code>, <code>it</code>






    share|improve this answer





















    • 8





      documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

      – egreg
      Jan 20 '12 at 9:57






    • 5





      See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

      – Martin Schröder
      Jan 20 '12 at 12:56














    108












    108








    108







    In general the command (textbf/textit) approach is more useful if the text is followed by more text on the same line and isn't followed by a small punctuation symbol. If the text is in a paragraph on its own or is followed by a small punctuation symbol, it doesn't matter really. In that case the declarations (bf/bfseries and it/itshape) are equivalent to the commands. As pointed out be others, the declarations bf and it are deprecated and should be avoided.



    To see why the commands should be preferred, notice that textit inserts an italic correction at the end, which adds a small horizontal compensation if the text ends in letters with long ascenders that would otherwise run into the next character. The declarations (it and itshape) don't insert an italic correction.



    The fourth, fifth, and sixth row in the following shows why the commands may differ from the declarations. In the fourth row you get a proper italic correction, in the fifth and the sixth you don't and this results in the ff ligature running in to the h.



    documentclass{article}

    usepackage{booktabs}

    begin{document}
    Huge
    begin{tabular}{lll}
    toprule
    verb|textbf{fluff} hair| & textbf{fluff} hair
    \verb|{bf fluff} hair| & {bf fluff} hair
    \verb|{bfseries fluff} hair| & {bfseries fluff} hair
    \midrule
    verb|textit{fluff} hair| & textit{fluff} hair
    \verb|{itshape fluff} hair| & {itshape fluff} hair
    \verb|{it fluff} hair| & {it fluff} hair
    \bottomrule
    end{tabular}
    end{document}


    <code>textbf</code>, <code>textit</code> vs <code>bfseries</code>, <code>itshape</code> and <code>bf</code>, <code>it</code>






    share|improve this answer















    In general the command (textbf/textit) approach is more useful if the text is followed by more text on the same line and isn't followed by a small punctuation symbol. If the text is in a paragraph on its own or is followed by a small punctuation symbol, it doesn't matter really. In that case the declarations (bf/bfseries and it/itshape) are equivalent to the commands. As pointed out be others, the declarations bf and it are deprecated and should be avoided.



    To see why the commands should be preferred, notice that textit inserts an italic correction at the end, which adds a small horizontal compensation if the text ends in letters with long ascenders that would otherwise run into the next character. The declarations (it and itshape) don't insert an italic correction.



    The fourth, fifth, and sixth row in the following shows why the commands may differ from the declarations. In the fourth row you get a proper italic correction, in the fifth and the sixth you don't and this results in the ff ligature running in to the h.



    documentclass{article}

    usepackage{booktabs}

    begin{document}
    Huge
    begin{tabular}{lll}
    toprule
    verb|textbf{fluff} hair| & textbf{fluff} hair
    \verb|{bf fluff} hair| & {bf fluff} hair
    \verb|{bfseries fluff} hair| & {bfseries fluff} hair
    \midrule
    verb|textit{fluff} hair| & textit{fluff} hair
    \verb|{itshape fluff} hair| & {itshape fluff} hair
    \verb|{it fluff} hair| & {it fluff} hair
    \bottomrule
    end{tabular}
    end{document}


    <code>textbf</code>, <code>textit</code> vs <code>bfseries</code>, <code>itshape</code> and <code>bf</code>, <code>it</code>







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Feb 23 at 14:42









    L. F.

    17010




    17010










    answered Jan 20 '12 at 4:33







    user10274















    • 8





      documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

      – egreg
      Jan 20 '12 at 9:57






    • 5





      See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

      – Martin Schröder
      Jan 20 '12 at 12:56














    • 8





      documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

      – egreg
      Jan 20 '12 at 9:57






    • 5





      See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

      – Martin Schröder
      Jan 20 '12 at 12:56








    8




    8





    documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

    – egreg
    Jan 20 '12 at 9:57





    documentclass{memoir}begin{document}bf bold results in an error. Classes are not required to support the two letter commands, so I think it's better to avoid them altogether.

    – egreg
    Jan 20 '12 at 9:57




    5




    5





    See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

    – Martin Schröder
    Jan 20 '12 at 12:56





    See above: DONT USE bf - they come from LaTeX 2.09, which is OBSOLETE.

    – Martin Schröder
    Jan 20 '12 at 12:56











    50














    First of all you should not use the obsolete bf or it macros from LaTeX2.0. They do not use the new font selection scheme (NFSS) of LaTeX2e. So bf will do bold and bold only, but will not mix with an italic setting, which makes bold-italic impossible. Use the new bfseries macro instead.



    There is not much practical difference between textbf{<content>} and {bfseries <content>}. I would say most people use (for short texts) the first usage because it follows the common somemacro{<content>} LaTeX style. The latter should be used if you want to make the rest of an environment/group bold, of course.



    You should note that textbf uses bfseries internal, so the latter is a more fundamental macro.
    The definition of textbf is:



    ifmmode
    nfss@text {bfseries #1}%
    else
    hmode@bgroup
    text@command {#1}%
    bfseries check@icl #1check@icr
    expandafter
    egroup
    fi


    So textbf switches to text mode inside math mode, while bfseries apparently doesn't.
    It also adds checks for italic correction before and after the content, which is a great feature of LaTeX2e.



    One benefit of bfseries is that it doesn't read the content as an argument, which would interfere with catcode changes required by verbatim content and other special code.



    In summary I recommend textbf for smaller texts, mainly because of the italic correction, and in math mode. bfseries is IMHO more intended for environments and larger texts. One notable exception is if you have bold and italic (etc.) combinations, then you could write textit{bfseries <content>}, to avoid two sets of braces, but this is more a fashion choice. You should not use bf in modern LaTeX documents.






    share|improve this answer




























      50














      First of all you should not use the obsolete bf or it macros from LaTeX2.0. They do not use the new font selection scheme (NFSS) of LaTeX2e. So bf will do bold and bold only, but will not mix with an italic setting, which makes bold-italic impossible. Use the new bfseries macro instead.



      There is not much practical difference between textbf{<content>} and {bfseries <content>}. I would say most people use (for short texts) the first usage because it follows the common somemacro{<content>} LaTeX style. The latter should be used if you want to make the rest of an environment/group bold, of course.



      You should note that textbf uses bfseries internal, so the latter is a more fundamental macro.
      The definition of textbf is:



      ifmmode
      nfss@text {bfseries #1}%
      else
      hmode@bgroup
      text@command {#1}%
      bfseries check@icl #1check@icr
      expandafter
      egroup
      fi


      So textbf switches to text mode inside math mode, while bfseries apparently doesn't.
      It also adds checks for italic correction before and after the content, which is a great feature of LaTeX2e.



      One benefit of bfseries is that it doesn't read the content as an argument, which would interfere with catcode changes required by verbatim content and other special code.



      In summary I recommend textbf for smaller texts, mainly because of the italic correction, and in math mode. bfseries is IMHO more intended for environments and larger texts. One notable exception is if you have bold and italic (etc.) combinations, then you could write textit{bfseries <content>}, to avoid two sets of braces, but this is more a fashion choice. You should not use bf in modern LaTeX documents.






      share|improve this answer


























        50












        50








        50







        First of all you should not use the obsolete bf or it macros from LaTeX2.0. They do not use the new font selection scheme (NFSS) of LaTeX2e. So bf will do bold and bold only, but will not mix with an italic setting, which makes bold-italic impossible. Use the new bfseries macro instead.



        There is not much practical difference between textbf{<content>} and {bfseries <content>}. I would say most people use (for short texts) the first usage because it follows the common somemacro{<content>} LaTeX style. The latter should be used if you want to make the rest of an environment/group bold, of course.



        You should note that textbf uses bfseries internal, so the latter is a more fundamental macro.
        The definition of textbf is:



        ifmmode
        nfss@text {bfseries #1}%
        else
        hmode@bgroup
        text@command {#1}%
        bfseries check@icl #1check@icr
        expandafter
        egroup
        fi


        So textbf switches to text mode inside math mode, while bfseries apparently doesn't.
        It also adds checks for italic correction before and after the content, which is a great feature of LaTeX2e.



        One benefit of bfseries is that it doesn't read the content as an argument, which would interfere with catcode changes required by verbatim content and other special code.



        In summary I recommend textbf for smaller texts, mainly because of the italic correction, and in math mode. bfseries is IMHO more intended for environments and larger texts. One notable exception is if you have bold and italic (etc.) combinations, then you could write textit{bfseries <content>}, to avoid two sets of braces, but this is more a fashion choice. You should not use bf in modern LaTeX documents.






        share|improve this answer













        First of all you should not use the obsolete bf or it macros from LaTeX2.0. They do not use the new font selection scheme (NFSS) of LaTeX2e. So bf will do bold and bold only, but will not mix with an italic setting, which makes bold-italic impossible. Use the new bfseries macro instead.



        There is not much practical difference between textbf{<content>} and {bfseries <content>}. I would say most people use (for short texts) the first usage because it follows the common somemacro{<content>} LaTeX style. The latter should be used if you want to make the rest of an environment/group bold, of course.



        You should note that textbf uses bfseries internal, so the latter is a more fundamental macro.
        The definition of textbf is:



        ifmmode
        nfss@text {bfseries #1}%
        else
        hmode@bgroup
        text@command {#1}%
        bfseries check@icl #1check@icr
        expandafter
        egroup
        fi


        So textbf switches to text mode inside math mode, while bfseries apparently doesn't.
        It also adds checks for italic correction before and after the content, which is a great feature of LaTeX2e.



        One benefit of bfseries is that it doesn't read the content as an argument, which would interfere with catcode changes required by verbatim content and other special code.



        In summary I recommend textbf for smaller texts, mainly because of the italic correction, and in math mode. bfseries is IMHO more intended for environments and larger texts. One notable exception is if you have bold and italic (etc.) combinations, then you could write textit{bfseries <content>}, to avoid two sets of braces, but this is more a fashion choice. You should not use bf in modern LaTeX documents.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 20 '12 at 12:55









        Martin ScharrerMartin Scharrer

        202k47647822




        202k47647822






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f41681%2fcorrect-way-to-bold-italicize-text%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents