My header changes color on pages that start with a section












0















Im writing a report (in LaTeX) for which a made a header using fancyhdr.



The text in my header is suppose to be black and the line is colored.
However at some pages my headertext is colored as well, on pages that start with a section, but not all pages which start with a section have this issue.



Maybe I should also mention that my section titles are colored as well (also green) using sectsty.



I cant seem to find a fix, below is the code, can somebody help me please?



documentclass[12pt]{article}
usepackage{lipsum}
usepackage{fancyhdr}
usepackage{xpatch}
usepackage{sectsty}
usepackage[dvipsnames]{xcolor}
%
definecolor{ggreen}{RGB}{114, 183, 1}
%
pagestyle{fancy}
rhead{Title}
lhead{}
renewcommand{headrulewidth}{0.5pt}
xpretocmdheadrule{color{ggreen}}{}{PatchFailed}
%
sectionfont{color{ggreen}selectfont}
subsectionfont{color{ggreen}selectfont}
%
begin{document}
section{title}
lipsum
end{document}









share|improve this question




















  • 4





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 8 at 13:26











  • Off topic: IMHO green is a bit too bright to be read in a white page. I think green!50!black or green!60!black is more okay.

    – JouleV
    Mar 8 at 13:29






  • 2





    To echo what @samcarter says, I can take the time to add a document around your preamble material, and am still unable to recreate your result. This means that there is more to the problem than what you have provided. This is why providing a fully working MWE is essential.

    – Steven B. Segletes
    Mar 8 at 13:42






  • 1





    @10tje Thanks for adding some code. If I add usepackage{lipsum} begin{document} section{title} lipsum end{document} after your code fragment to get a compilable document, I don't get any coloured text. Please show us some code that allows us to reproduce the problem.

    – samcarter
    Mar 8 at 13:42








  • 1





    Your MWE produces no color in the header text.

    – Steven B. Segletes
    Mar 8 at 14:02
















0















Im writing a report (in LaTeX) for which a made a header using fancyhdr.



The text in my header is suppose to be black and the line is colored.
However at some pages my headertext is colored as well, on pages that start with a section, but not all pages which start with a section have this issue.



Maybe I should also mention that my section titles are colored as well (also green) using sectsty.



I cant seem to find a fix, below is the code, can somebody help me please?



documentclass[12pt]{article}
usepackage{lipsum}
usepackage{fancyhdr}
usepackage{xpatch}
usepackage{sectsty}
usepackage[dvipsnames]{xcolor}
%
definecolor{ggreen}{RGB}{114, 183, 1}
%
pagestyle{fancy}
rhead{Title}
lhead{}
renewcommand{headrulewidth}{0.5pt}
xpretocmdheadrule{color{ggreen}}{}{PatchFailed}
%
sectionfont{color{ggreen}selectfont}
subsectionfont{color{ggreen}selectfont}
%
begin{document}
section{title}
lipsum
end{document}









share|improve this question




















  • 4





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 8 at 13:26











  • Off topic: IMHO green is a bit too bright to be read in a white page. I think green!50!black or green!60!black is more okay.

    – JouleV
    Mar 8 at 13:29






  • 2





    To echo what @samcarter says, I can take the time to add a document around your preamble material, and am still unable to recreate your result. This means that there is more to the problem than what you have provided. This is why providing a fully working MWE is essential.

    – Steven B. Segletes
    Mar 8 at 13:42






  • 1





    @10tje Thanks for adding some code. If I add usepackage{lipsum} begin{document} section{title} lipsum end{document} after your code fragment to get a compilable document, I don't get any coloured text. Please show us some code that allows us to reproduce the problem.

    – samcarter
    Mar 8 at 13:42








  • 1





    Your MWE produces no color in the header text.

    – Steven B. Segletes
    Mar 8 at 14:02














0












0








0


1






Im writing a report (in LaTeX) for which a made a header using fancyhdr.



The text in my header is suppose to be black and the line is colored.
However at some pages my headertext is colored as well, on pages that start with a section, but not all pages which start with a section have this issue.



Maybe I should also mention that my section titles are colored as well (also green) using sectsty.



I cant seem to find a fix, below is the code, can somebody help me please?



documentclass[12pt]{article}
usepackage{lipsum}
usepackage{fancyhdr}
usepackage{xpatch}
usepackage{sectsty}
usepackage[dvipsnames]{xcolor}
%
definecolor{ggreen}{RGB}{114, 183, 1}
%
pagestyle{fancy}
rhead{Title}
lhead{}
renewcommand{headrulewidth}{0.5pt}
xpretocmdheadrule{color{ggreen}}{}{PatchFailed}
%
sectionfont{color{ggreen}selectfont}
subsectionfont{color{ggreen}selectfont}
%
begin{document}
section{title}
lipsum
end{document}









share|improve this question
















Im writing a report (in LaTeX) for which a made a header using fancyhdr.



The text in my header is suppose to be black and the line is colored.
However at some pages my headertext is colored as well, on pages that start with a section, but not all pages which start with a section have this issue.



Maybe I should also mention that my section titles are colored as well (also green) using sectsty.



I cant seem to find a fix, below is the code, can somebody help me please?



documentclass[12pt]{article}
usepackage{lipsum}
usepackage{fancyhdr}
usepackage{xpatch}
usepackage{sectsty}
usepackage[dvipsnames]{xcolor}
%
definecolor{ggreen}{RGB}{114, 183, 1}
%
pagestyle{fancy}
rhead{Title}
lhead{}
renewcommand{headrulewidth}{0.5pt}
xpretocmdheadrule{color{ggreen}}{}{PatchFailed}
%
sectionfont{color{ggreen}selectfont}
subsectionfont{color{ggreen}selectfont}
%
begin{document}
section{title}
lipsum
end{document}






sectioning header-footer color fancyhdr sectsty






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 14:55







10tje

















asked Mar 8 at 13:26









10tje10tje

11




11








  • 4





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 8 at 13:26











  • Off topic: IMHO green is a bit too bright to be read in a white page. I think green!50!black or green!60!black is more okay.

    – JouleV
    Mar 8 at 13:29






  • 2





    To echo what @samcarter says, I can take the time to add a document around your preamble material, and am still unable to recreate your result. This means that there is more to the problem than what you have provided. This is why providing a fully working MWE is essential.

    – Steven B. Segletes
    Mar 8 at 13:42






  • 1





    @10tje Thanks for adding some code. If I add usepackage{lipsum} begin{document} section{title} lipsum end{document} after your code fragment to get a compilable document, I don't get any coloured text. Please show us some code that allows us to reproduce the problem.

    – samcarter
    Mar 8 at 13:42








  • 1





    Your MWE produces no color in the header text.

    – Steven B. Segletes
    Mar 8 at 14:02














  • 4





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    Mar 8 at 13:26











  • Off topic: IMHO green is a bit too bright to be read in a white page. I think green!50!black or green!60!black is more okay.

    – JouleV
    Mar 8 at 13:29






  • 2





    To echo what @samcarter says, I can take the time to add a document around your preamble material, and am still unable to recreate your result. This means that there is more to the problem than what you have provided. This is why providing a fully working MWE is essential.

    – Steven B. Segletes
    Mar 8 at 13:42






  • 1





    @10tje Thanks for adding some code. If I add usepackage{lipsum} begin{document} section{title} lipsum end{document} after your code fragment to get a compilable document, I don't get any coloured text. Please show us some code that allows us to reproduce the problem.

    – samcarter
    Mar 8 at 13:42








  • 1





    Your MWE produces no color in the header text.

    – Steven B. Segletes
    Mar 8 at 14:02








4




4





Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

– samcarter
Mar 8 at 13:26





Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

– samcarter
Mar 8 at 13:26













Off topic: IMHO green is a bit too bright to be read in a white page. I think green!50!black or green!60!black is more okay.

– JouleV
Mar 8 at 13:29





Off topic: IMHO green is a bit too bright to be read in a white page. I think green!50!black or green!60!black is more okay.

– JouleV
Mar 8 at 13:29




2




2





To echo what @samcarter says, I can take the time to add a document around your preamble material, and am still unable to recreate your result. This means that there is more to the problem than what you have provided. This is why providing a fully working MWE is essential.

– Steven B. Segletes
Mar 8 at 13:42





To echo what @samcarter says, I can take the time to add a document around your preamble material, and am still unable to recreate your result. This means that there is more to the problem than what you have provided. This is why providing a fully working MWE is essential.

– Steven B. Segletes
Mar 8 at 13:42




1




1





@10tje Thanks for adding some code. If I add usepackage{lipsum} begin{document} section{title} lipsum end{document} after your code fragment to get a compilable document, I don't get any coloured text. Please show us some code that allows us to reproduce the problem.

– samcarter
Mar 8 at 13:42







@10tje Thanks for adding some code. If I add usepackage{lipsum} begin{document} section{title} lipsum end{document} after your code fragment to get a compilable document, I don't get any coloured text. Please show us some code that allows us to reproduce the problem.

– samcarter
Mar 8 at 13:42






1




1





Your MWE produces no color in the header text.

– Steven B. Segletes
Mar 8 at 14:02





Your MWE produces no color in the header text.

– Steven B. Segletes
Mar 8 at 14:02










1 Answer
1






active

oldest

votes


















0














By using rhead{textcolor{black}{TITLE}} instead of rhead{TITLE} the problem is solved.
This however probably just overrides the underlying problem, BUT it works.






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%2f478418%2fmy-header-changes-color-on-pages-that-start-with-a-section%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    By using rhead{textcolor{black}{TITLE}} instead of rhead{TITLE} the problem is solved.
    This however probably just overrides the underlying problem, BUT it works.






    share|improve this answer




























      0














      By using rhead{textcolor{black}{TITLE}} instead of rhead{TITLE} the problem is solved.
      This however probably just overrides the underlying problem, BUT it works.






      share|improve this answer


























        0












        0








        0







        By using rhead{textcolor{black}{TITLE}} instead of rhead{TITLE} the problem is solved.
        This however probably just overrides the underlying problem, BUT it works.






        share|improve this answer













        By using rhead{textcolor{black}{TITLE}} instead of rhead{TITLE} the problem is solved.
        This however probably just overrides the underlying problem, BUT it works.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 at 14:43









        10tje10tje

        11




        11






























            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%2f478418%2fmy-header-changes-color-on-pages-that-start-with-a-section%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?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

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