How does one make just one word in the title a different color?












2















The following works to give the title all in black:



title{The Title}


But this does not work to make the first word in the title red:



title{{color{red}The} Title}


How does one make just one word in the title a different color?










share|improve this question

























  • textcolor{red}{The} should work in a standard class.

    – Bernard
    1 hour ago











  • Thanks for the suggestion, but it does not work either. Could the problem be my use of documentclass ?

    – Michael B. Heaney
    1 hour ago











  • Well, you should post a minimal non-working example code.

    – Bernard
    1 hour ago











  • Thanks for your helpful advice. Here is a minimal non-working example code: documentclass[11pt]{amsart} usepackage{color} title{The title} begin{document} maketitle end{document}

    – Michael B. Heaney
    1 hour ago








  • 1





    Possible duplicate of Change the color of the main title without redefining maketitle

    – Werner
    1 hour ago
















2















The following works to give the title all in black:



title{The Title}


But this does not work to make the first word in the title red:



title{{color{red}The} Title}


How does one make just one word in the title a different color?










share|improve this question

























  • textcolor{red}{The} should work in a standard class.

    – Bernard
    1 hour ago











  • Thanks for the suggestion, but it does not work either. Could the problem be my use of documentclass ?

    – Michael B. Heaney
    1 hour ago











  • Well, you should post a minimal non-working example code.

    – Bernard
    1 hour ago











  • Thanks for your helpful advice. Here is a minimal non-working example code: documentclass[11pt]{amsart} usepackage{color} title{The title} begin{document} maketitle end{document}

    – Michael B. Heaney
    1 hour ago








  • 1





    Possible duplicate of Change the color of the main title without redefining maketitle

    – Werner
    1 hour ago














2












2








2








The following works to give the title all in black:



title{The Title}


But this does not work to make the first word in the title red:



title{{color{red}The} Title}


How does one make just one word in the title a different color?










share|improve this question
















The following works to give the title all in black:



title{The Title}


But this does not work to make the first word in the title red:



title{{color{red}The} Title}


How does one make just one word in the title a different color?







color titles amsart






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









Werner

439k669651660




439k669651660










asked 1 hour ago









Michael B. HeaneyMichael B. Heaney

1186




1186













  • textcolor{red}{The} should work in a standard class.

    – Bernard
    1 hour ago











  • Thanks for the suggestion, but it does not work either. Could the problem be my use of documentclass ?

    – Michael B. Heaney
    1 hour ago











  • Well, you should post a minimal non-working example code.

    – Bernard
    1 hour ago











  • Thanks for your helpful advice. Here is a minimal non-working example code: documentclass[11pt]{amsart} usepackage{color} title{The title} begin{document} maketitle end{document}

    – Michael B. Heaney
    1 hour ago








  • 1





    Possible duplicate of Change the color of the main title without redefining maketitle

    – Werner
    1 hour ago



















  • textcolor{red}{The} should work in a standard class.

    – Bernard
    1 hour ago











  • Thanks for the suggestion, but it does not work either. Could the problem be my use of documentclass ?

    – Michael B. Heaney
    1 hour ago











  • Well, you should post a minimal non-working example code.

    – Bernard
    1 hour ago











  • Thanks for your helpful advice. Here is a minimal non-working example code: documentclass[11pt]{amsart} usepackage{color} title{The title} begin{document} maketitle end{document}

    – Michael B. Heaney
    1 hour ago








  • 1





    Possible duplicate of Change the color of the main title without redefining maketitle

    – Werner
    1 hour ago

















textcolor{red}{The} should work in a standard class.

– Bernard
1 hour ago





textcolor{red}{The} should work in a standard class.

– Bernard
1 hour ago













Thanks for the suggestion, but it does not work either. Could the problem be my use of documentclass ?

– Michael B. Heaney
1 hour ago





Thanks for the suggestion, but it does not work either. Could the problem be my use of documentclass ?

– Michael B. Heaney
1 hour ago













Well, you should post a minimal non-working example code.

– Bernard
1 hour ago





Well, you should post a minimal non-working example code.

– Bernard
1 hour ago













Thanks for your helpful advice. Here is a minimal non-working example code: documentclass[11pt]{amsart} usepackage{color} title{The title} begin{document} maketitle end{document}

– Michael B. Heaney
1 hour ago







Thanks for your helpful advice. Here is a minimal non-working example code: documentclass[11pt]{amsart} usepackage{color} title{The title} begin{document} maketitle end{document}

– Michael B. Heaney
1 hour ago






1




1





Possible duplicate of Change the color of the main title without redefining maketitle

– Werner
1 hour ago





Possible duplicate of Change the color of the main title without redefining maketitle

– Werner
1 hour ago










2 Answers
2






active

oldest

votes


















1














The title under amsart is set in CAPITAL LETTERS. As such, merely using



title{textcolor{red}{The} title}


doesn't work out-of-the-box because there is no colour RED. However, it's simple enough to define RED to be the same as red:



enter image description here



documentclass{amsart}

usepackage{xcolor}

colorlet{RED}{red}
title{textcolor{red}{The} title}
author{An Author}

begin{document}

maketitle

end{document}





share|improve this answer
























  • That works, thanks!

    – Michael B. Heaney
    1 hour ago



















2














With amsart there is the problem of capitalization, but it is easily solved.



documentclass{amsart}
usepackage{xcolor}
usepackage{textcase}

DeclareRobustCommand{foo}[1]{textcolor{red}{#1}}

begin{document}

title[The title]{foo{The} title}
author{An Author}

maketitle

end{document}


Use a more meaningful name than foo, of course. Omit the optional argument if you also want the coloring in the page headings.



See https://tex.stackexchange.com/a/468247/4427 for details about why loading textcase is better for the application.



The rationale for defining a command is that hardwiring a color means having to chase for every occurrence in the document for it, whereas with a command you can just modify the definition in case you change your mind about what color to use (or no color at all).






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%2f470160%2fhow-does-one-make-just-one-word-in-the-title-a-different-color%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The title under amsart is set in CAPITAL LETTERS. As such, merely using



    title{textcolor{red}{The} title}


    doesn't work out-of-the-box because there is no colour RED. However, it's simple enough to define RED to be the same as red:



    enter image description here



    documentclass{amsart}

    usepackage{xcolor}

    colorlet{RED}{red}
    title{textcolor{red}{The} title}
    author{An Author}

    begin{document}

    maketitle

    end{document}





    share|improve this answer
























    • That works, thanks!

      – Michael B. Heaney
      1 hour ago
















    1














    The title under amsart is set in CAPITAL LETTERS. As such, merely using



    title{textcolor{red}{The} title}


    doesn't work out-of-the-box because there is no colour RED. However, it's simple enough to define RED to be the same as red:



    enter image description here



    documentclass{amsart}

    usepackage{xcolor}

    colorlet{RED}{red}
    title{textcolor{red}{The} title}
    author{An Author}

    begin{document}

    maketitle

    end{document}





    share|improve this answer
























    • That works, thanks!

      – Michael B. Heaney
      1 hour ago














    1












    1








    1







    The title under amsart is set in CAPITAL LETTERS. As such, merely using



    title{textcolor{red}{The} title}


    doesn't work out-of-the-box because there is no colour RED. However, it's simple enough to define RED to be the same as red:



    enter image description here



    documentclass{amsart}

    usepackage{xcolor}

    colorlet{RED}{red}
    title{textcolor{red}{The} title}
    author{An Author}

    begin{document}

    maketitle

    end{document}





    share|improve this answer













    The title under amsart is set in CAPITAL LETTERS. As such, merely using



    title{textcolor{red}{The} title}


    doesn't work out-of-the-box because there is no colour RED. However, it's simple enough to define RED to be the same as red:



    enter image description here



    documentclass{amsart}

    usepackage{xcolor}

    colorlet{RED}{red}
    title{textcolor{red}{The} title}
    author{An Author}

    begin{document}

    maketitle

    end{document}






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 1 hour ago









    WernerWerner

    439k669651660




    439k669651660













    • That works, thanks!

      – Michael B. Heaney
      1 hour ago



















    • That works, thanks!

      – Michael B. Heaney
      1 hour ago

















    That works, thanks!

    – Michael B. Heaney
    1 hour ago





    That works, thanks!

    – Michael B. Heaney
    1 hour ago











    2














    With amsart there is the problem of capitalization, but it is easily solved.



    documentclass{amsart}
    usepackage{xcolor}
    usepackage{textcase}

    DeclareRobustCommand{foo}[1]{textcolor{red}{#1}}

    begin{document}

    title[The title]{foo{The} title}
    author{An Author}

    maketitle

    end{document}


    Use a more meaningful name than foo, of course. Omit the optional argument if you also want the coloring in the page headings.



    See https://tex.stackexchange.com/a/468247/4427 for details about why loading textcase is better for the application.



    The rationale for defining a command is that hardwiring a color means having to chase for every occurrence in the document for it, whereas with a command you can just modify the definition in case you change your mind about what color to use (or no color at all).






    share|improve this answer




























      2














      With amsart there is the problem of capitalization, but it is easily solved.



      documentclass{amsart}
      usepackage{xcolor}
      usepackage{textcase}

      DeclareRobustCommand{foo}[1]{textcolor{red}{#1}}

      begin{document}

      title[The title]{foo{The} title}
      author{An Author}

      maketitle

      end{document}


      Use a more meaningful name than foo, of course. Omit the optional argument if you also want the coloring in the page headings.



      See https://tex.stackexchange.com/a/468247/4427 for details about why loading textcase is better for the application.



      The rationale for defining a command is that hardwiring a color means having to chase for every occurrence in the document for it, whereas with a command you can just modify the definition in case you change your mind about what color to use (or no color at all).






      share|improve this answer


























        2












        2








        2







        With amsart there is the problem of capitalization, but it is easily solved.



        documentclass{amsart}
        usepackage{xcolor}
        usepackage{textcase}

        DeclareRobustCommand{foo}[1]{textcolor{red}{#1}}

        begin{document}

        title[The title]{foo{The} title}
        author{An Author}

        maketitle

        end{document}


        Use a more meaningful name than foo, of course. Omit the optional argument if you also want the coloring in the page headings.



        See https://tex.stackexchange.com/a/468247/4427 for details about why loading textcase is better for the application.



        The rationale for defining a command is that hardwiring a color means having to chase for every occurrence in the document for it, whereas with a command you can just modify the definition in case you change your mind about what color to use (or no color at all).






        share|improve this answer













        With amsart there is the problem of capitalization, but it is easily solved.



        documentclass{amsart}
        usepackage{xcolor}
        usepackage{textcase}

        DeclareRobustCommand{foo}[1]{textcolor{red}{#1}}

        begin{document}

        title[The title]{foo{The} title}
        author{An Author}

        maketitle

        end{document}


        Use a more meaningful name than foo, of course. Omit the optional argument if you also want the coloring in the page headings.



        See https://tex.stackexchange.com/a/468247/4427 for details about why loading textcase is better for the application.



        The rationale for defining a command is that hardwiring a color means having to chase for every occurrence in the document for it, whereas with a command you can just modify the definition in case you change your mind about what color to use (or no color at all).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        egregegreg

        712k8618923179




        712k8618923179






























            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%2f470160%2fhow-does-one-make-just-one-word-in-the-title-a-different-color%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

            List directoties down one level, excluding some named directories and files

            list processes belonging to a network namespace

            list systemd RuntimeDirectory mounts