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












4
















This question already has an answer here:




  • Change the color of the main title without redefining maketitle

    1 answer




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















marked as duplicate by Werner, marmot, Phelype Oleinik, Stefan Pinnow, flav Jan 15 at 7:47


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.
















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

    – Bernard
    Jan 14 at 23:53











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

    – Michael B. Heaney
    Jan 14 at 23:56











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

    – Bernard
    Jan 14 at 23:58











  • 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
    Jan 15 at 0:08


















4
















This question already has an answer here:




  • Change the color of the main title without redefining maketitle

    1 answer




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















marked as duplicate by Werner, marmot, Phelype Oleinik, Stefan Pinnow, flav Jan 15 at 7:47


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.
















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

    – Bernard
    Jan 14 at 23:53











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

    – Michael B. Heaney
    Jan 14 at 23:56











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

    – Bernard
    Jan 14 at 23:58











  • 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
    Jan 15 at 0:08
















4












4








4









This question already has an answer here:




  • Change the color of the main title without redefining maketitle

    1 answer




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

















This question already has an answer here:




  • Change the color of the main title without redefining maketitle

    1 answer




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?





This question already has an answer here:




  • Change the color of the main title without redefining maketitle

    1 answer








color titles amsart






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 15 at 0:15









Werner

441k679701662




441k679701662










asked Jan 14 at 23:50









Michael B. HeaneyMichael B. Heaney

1286




1286




marked as duplicate by Werner, marmot, Phelype Oleinik, Stefan Pinnow, flav Jan 15 at 7:47


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.






marked as duplicate by Werner, marmot, Phelype Oleinik, Stefan Pinnow, flav Jan 15 at 7:47


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.















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

    – Bernard
    Jan 14 at 23:53











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

    – Michael B. Heaney
    Jan 14 at 23:56











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

    – Bernard
    Jan 14 at 23:58











  • 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
    Jan 15 at 0:08





















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

    – Bernard
    Jan 14 at 23:53











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

    – Michael B. Heaney
    Jan 14 at 23:56











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

    – Bernard
    Jan 14 at 23:58











  • 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
    Jan 15 at 0:08



















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

– Bernard
Jan 14 at 23:53





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

– Bernard
Jan 14 at 23:53













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

– Michael B. Heaney
Jan 14 at 23:56





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

– Michael B. Heaney
Jan 14 at 23:56













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

– Bernard
Jan 14 at 23:58





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

– Bernard
Jan 14 at 23:58













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
Jan 15 at 0:08







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
Jan 15 at 0:08












2 Answers
2






active

oldest

votes


















4














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
    Jan 15 at 0:24



















5














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 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    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
      Jan 15 at 0:24
















    4














    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
      Jan 15 at 0:24














    4












    4








    4







    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 Jan 15 at 0:14









    WernerWerner

    441k679701662




    441k679701662













    • That works, thanks!

      – Michael B. Heaney
      Jan 15 at 0:24



















    • That works, thanks!

      – Michael B. Heaney
      Jan 15 at 0:24

















    That works, thanks!

    – Michael B. Heaney
    Jan 15 at 0:24





    That works, thanks!

    – Michael B. Heaney
    Jan 15 at 0:24











    5














    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




























      5














      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


























        5












        5








        5







        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 Jan 15 at 0:23









        egregegreg

        714k8618973184




        714k8618973184















            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