How to have two headers in article with fancyhdr?












0














How can I have two header templates with fancyhdr, according to the model of the image.



enter image description hereenter image description here



The code below causes problem, as you show the images.



enter image description hereenter image description here



documentclass[12pt,a4paper]{article}

usepackage{lipsum}% only for dummy text
usepackage{showframe}% don't use in real document
renewcommand*ShowFrameColor{color{red}}% don't use in real document

usepackage{fancyhdr}
usepackage[left=3cm, right=3cm, top=2cm, bottom=2.0cm]{geometry}
usepackage{multicol}
usepackage[most]{tcolorbox}
usepackage{tikz}
usetikzlibrary{shadings}
usepackage{lineno}

definecolor{AbstractColor}{RGB}{238,243,235}
definecolor{EBC-Green}{RGB}{43,107,0}
definecolor{textnumberbox}{RGB}{192,210,177}
definecolor{EBC-Grey}{RGB}{123, 121, 121}
definecolor{green_colour}{RGB}{191,201,176}

pagestyle{fancyplain}
fancyhf{}

fancyhead[L]{%
fancyplain
{%
raisebox{-dpstrutbox}{%
begin{tikzpicture}
node[anchor=south east,gray,fill,text=white,font=bfseries,inner xsep=0.3cm,outer sep=0pt](n)at(headwidth,0){RESEARCH ARTICLE};
useasboundingbox(0,0)--(n.south east);
shade[left color=white,right color=gray](0.3,0)rectangle([yshift=1pt]n.south west);
node[anchor=south west] at (0,0) .
{includegraphics[width=.4textwidth]{Logo/EBC-Logo}};
end{tikzpicture}%
}%
}
{Castillo and Ladio 2019. Zootherapy and rural livestock farmers in
semiarid Patagonia: the transfer of animal aptitudes for health\
textbf{Ethnobio Conserv 8:2}}% settings for page style fancy
}

fancyfoot[L]{textcolor{EBC-Green}{rule[.6ex]{linewidth}{1pt}}}
fancyfoot[C]{colorbox{AbstractColor}{textcolor{EBC-Green}thepage}}
renewcommand{headrulewidth}{0pt}% Remove header rule
renewcommand{footrulewidth}{0pt}% Remove footer rule (default)s

newtcolorbox{AbstractBox}[1]{enhanced,
before skip=5mm,after skip=5mm,
boxrule=0.4pt,left=5mm,right=5mm,top=5mm,bottom=5mm,
colback=AbstractColor,
colframe=AbstractColor,
sharp corners,rounded corners=southeast,arc is angular,arc=10mm,
#1}



date{}
title{color{EBC-Green}vspace{0cm}{textbf{Zootherapy and rural livestock farmers in semiarid Patagonia: the transfer of animal aptitudes for health}}}
author{Lucía Castillo and Ana Ladio}

begin{document}
maketitle

begin{AbstractBox}
begin{linenumbers}
subsubsection*{ABSTRACT}
lipsum[1]
paragraph{Keywords:} hibernation, black forest, ducks
end{linenumbers}
end{AbstractBox}
begin{multicols}{2}
lipsum[1-10]
end{multicols}
end{document}









share|improve this question



























    0














    How can I have two header templates with fancyhdr, according to the model of the image.



    enter image description hereenter image description here



    The code below causes problem, as you show the images.



    enter image description hereenter image description here



    documentclass[12pt,a4paper]{article}

    usepackage{lipsum}% only for dummy text
    usepackage{showframe}% don't use in real document
    renewcommand*ShowFrameColor{color{red}}% don't use in real document

    usepackage{fancyhdr}
    usepackage[left=3cm, right=3cm, top=2cm, bottom=2.0cm]{geometry}
    usepackage{multicol}
    usepackage[most]{tcolorbox}
    usepackage{tikz}
    usetikzlibrary{shadings}
    usepackage{lineno}

    definecolor{AbstractColor}{RGB}{238,243,235}
    definecolor{EBC-Green}{RGB}{43,107,0}
    definecolor{textnumberbox}{RGB}{192,210,177}
    definecolor{EBC-Grey}{RGB}{123, 121, 121}
    definecolor{green_colour}{RGB}{191,201,176}

    pagestyle{fancyplain}
    fancyhf{}

    fancyhead[L]{%
    fancyplain
    {%
    raisebox{-dpstrutbox}{%
    begin{tikzpicture}
    node[anchor=south east,gray,fill,text=white,font=bfseries,inner xsep=0.3cm,outer sep=0pt](n)at(headwidth,0){RESEARCH ARTICLE};
    useasboundingbox(0,0)--(n.south east);
    shade[left color=white,right color=gray](0.3,0)rectangle([yshift=1pt]n.south west);
    node[anchor=south west] at (0,0) .
    {includegraphics[width=.4textwidth]{Logo/EBC-Logo}};
    end{tikzpicture}%
    }%
    }
    {Castillo and Ladio 2019. Zootherapy and rural livestock farmers in
    semiarid Patagonia: the transfer of animal aptitudes for health\
    textbf{Ethnobio Conserv 8:2}}% settings for page style fancy
    }

    fancyfoot[L]{textcolor{EBC-Green}{rule[.6ex]{linewidth}{1pt}}}
    fancyfoot[C]{colorbox{AbstractColor}{textcolor{EBC-Green}thepage}}
    renewcommand{headrulewidth}{0pt}% Remove header rule
    renewcommand{footrulewidth}{0pt}% Remove footer rule (default)s

    newtcolorbox{AbstractBox}[1]{enhanced,
    before skip=5mm,after skip=5mm,
    boxrule=0.4pt,left=5mm,right=5mm,top=5mm,bottom=5mm,
    colback=AbstractColor,
    colframe=AbstractColor,
    sharp corners,rounded corners=southeast,arc is angular,arc=10mm,
    #1}



    date{}
    title{color{EBC-Green}vspace{0cm}{textbf{Zootherapy and rural livestock farmers in semiarid Patagonia: the transfer of animal aptitudes for health}}}
    author{Lucía Castillo and Ana Ladio}

    begin{document}
    maketitle

    begin{AbstractBox}
    begin{linenumbers}
    subsubsection*{ABSTRACT}
    lipsum[1]
    paragraph{Keywords:} hibernation, black forest, ducks
    end{linenumbers}
    end{AbstractBox}
    begin{multicols}{2}
    lipsum[1-10]
    end{multicols}
    end{document}









    share|improve this question

























      0












      0








      0







      How can I have two header templates with fancyhdr, according to the model of the image.



      enter image description hereenter image description here



      The code below causes problem, as you show the images.



      enter image description hereenter image description here



      documentclass[12pt,a4paper]{article}

      usepackage{lipsum}% only for dummy text
      usepackage{showframe}% don't use in real document
      renewcommand*ShowFrameColor{color{red}}% don't use in real document

      usepackage{fancyhdr}
      usepackage[left=3cm, right=3cm, top=2cm, bottom=2.0cm]{geometry}
      usepackage{multicol}
      usepackage[most]{tcolorbox}
      usepackage{tikz}
      usetikzlibrary{shadings}
      usepackage{lineno}

      definecolor{AbstractColor}{RGB}{238,243,235}
      definecolor{EBC-Green}{RGB}{43,107,0}
      definecolor{textnumberbox}{RGB}{192,210,177}
      definecolor{EBC-Grey}{RGB}{123, 121, 121}
      definecolor{green_colour}{RGB}{191,201,176}

      pagestyle{fancyplain}
      fancyhf{}

      fancyhead[L]{%
      fancyplain
      {%
      raisebox{-dpstrutbox}{%
      begin{tikzpicture}
      node[anchor=south east,gray,fill,text=white,font=bfseries,inner xsep=0.3cm,outer sep=0pt](n)at(headwidth,0){RESEARCH ARTICLE};
      useasboundingbox(0,0)--(n.south east);
      shade[left color=white,right color=gray](0.3,0)rectangle([yshift=1pt]n.south west);
      node[anchor=south west] at (0,0) .
      {includegraphics[width=.4textwidth]{Logo/EBC-Logo}};
      end{tikzpicture}%
      }%
      }
      {Castillo and Ladio 2019. Zootherapy and rural livestock farmers in
      semiarid Patagonia: the transfer of animal aptitudes for health\
      textbf{Ethnobio Conserv 8:2}}% settings for page style fancy
      }

      fancyfoot[L]{textcolor{EBC-Green}{rule[.6ex]{linewidth}{1pt}}}
      fancyfoot[C]{colorbox{AbstractColor}{textcolor{EBC-Green}thepage}}
      renewcommand{headrulewidth}{0pt}% Remove header rule
      renewcommand{footrulewidth}{0pt}% Remove footer rule (default)s

      newtcolorbox{AbstractBox}[1]{enhanced,
      before skip=5mm,after skip=5mm,
      boxrule=0.4pt,left=5mm,right=5mm,top=5mm,bottom=5mm,
      colback=AbstractColor,
      colframe=AbstractColor,
      sharp corners,rounded corners=southeast,arc is angular,arc=10mm,
      #1}



      date{}
      title{color{EBC-Green}vspace{0cm}{textbf{Zootherapy and rural livestock farmers in semiarid Patagonia: the transfer of animal aptitudes for health}}}
      author{Lucía Castillo and Ana Ladio}

      begin{document}
      maketitle

      begin{AbstractBox}
      begin{linenumbers}
      subsubsection*{ABSTRACT}
      lipsum[1]
      paragraph{Keywords:} hibernation, black forest, ducks
      end{linenumbers}
      end{AbstractBox}
      begin{multicols}{2}
      lipsum[1-10]
      end{multicols}
      end{document}









      share|improve this question













      How can I have two header templates with fancyhdr, according to the model of the image.



      enter image description hereenter image description here



      The code below causes problem, as you show the images.



      enter image description hereenter image description here



      documentclass[12pt,a4paper]{article}

      usepackage{lipsum}% only for dummy text
      usepackage{showframe}% don't use in real document
      renewcommand*ShowFrameColor{color{red}}% don't use in real document

      usepackage{fancyhdr}
      usepackage[left=3cm, right=3cm, top=2cm, bottom=2.0cm]{geometry}
      usepackage{multicol}
      usepackage[most]{tcolorbox}
      usepackage{tikz}
      usetikzlibrary{shadings}
      usepackage{lineno}

      definecolor{AbstractColor}{RGB}{238,243,235}
      definecolor{EBC-Green}{RGB}{43,107,0}
      definecolor{textnumberbox}{RGB}{192,210,177}
      definecolor{EBC-Grey}{RGB}{123, 121, 121}
      definecolor{green_colour}{RGB}{191,201,176}

      pagestyle{fancyplain}
      fancyhf{}

      fancyhead[L]{%
      fancyplain
      {%
      raisebox{-dpstrutbox}{%
      begin{tikzpicture}
      node[anchor=south east,gray,fill,text=white,font=bfseries,inner xsep=0.3cm,outer sep=0pt](n)at(headwidth,0){RESEARCH ARTICLE};
      useasboundingbox(0,0)--(n.south east);
      shade[left color=white,right color=gray](0.3,0)rectangle([yshift=1pt]n.south west);
      node[anchor=south west] at (0,0) .
      {includegraphics[width=.4textwidth]{Logo/EBC-Logo}};
      end{tikzpicture}%
      }%
      }
      {Castillo and Ladio 2019. Zootherapy and rural livestock farmers in
      semiarid Patagonia: the transfer of animal aptitudes for health\
      textbf{Ethnobio Conserv 8:2}}% settings for page style fancy
      }

      fancyfoot[L]{textcolor{EBC-Green}{rule[.6ex]{linewidth}{1pt}}}
      fancyfoot[C]{colorbox{AbstractColor}{textcolor{EBC-Green}thepage}}
      renewcommand{headrulewidth}{0pt}% Remove header rule
      renewcommand{footrulewidth}{0pt}% Remove footer rule (default)s

      newtcolorbox{AbstractBox}[1]{enhanced,
      before skip=5mm,after skip=5mm,
      boxrule=0.4pt,left=5mm,right=5mm,top=5mm,bottom=5mm,
      colback=AbstractColor,
      colframe=AbstractColor,
      sharp corners,rounded corners=southeast,arc is angular,arc=10mm,
      #1}



      date{}
      title{color{EBC-Green}vspace{0cm}{textbf{Zootherapy and rural livestock farmers in semiarid Patagonia: the transfer of animal aptitudes for health}}}
      author{Lucía Castillo and Ana Ladio}

      begin{document}
      maketitle

      begin{AbstractBox}
      begin{linenumbers}
      subsubsection*{ABSTRACT}
      lipsum[1]
      paragraph{Keywords:} hibernation, black forest, ducks
      end{linenumbers}
      end{AbstractBox}
      begin{multicols}{2}
      lipsum[1-10]
      end{multicols}
      end{document}






      fancyhdr fancyvrb fancybox






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 11 '18 at 20:30









      Itamar Barbosa de Lima

      375




      375



























          active

          oldest

          votes











          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%2f464392%2fhow-to-have-two-headers-in-article-with-fancyhdr%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f464392%2fhow-to-have-two-headers-in-article-with-fancyhdr%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