Adjusting position of the page number












1















How can I put the page number to the bottom and very middle of the page? I now have:



documentclass[11pt, a4paper, german]{article}
usepackage{color}
usepackage{amsmath, amsfonts, amsthm,}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage{mathrsfs}
usepackage{amsmath}
usepackage{mathtools}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{graphicx}
usepackage{array}
pagestyle{headings}

pgfplotsset{compat=1.16}
begin{document}
section{A}
end{document}









share|improve this question

























  • Have a look at fancyhdr.

    – JouleV
    11 hours ago
















1















How can I put the page number to the bottom and very middle of the page? I now have:



documentclass[11pt, a4paper, german]{article}
usepackage{color}
usepackage{amsmath, amsfonts, amsthm,}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage{mathrsfs}
usepackage{amsmath}
usepackage{mathtools}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{graphicx}
usepackage{array}
pagestyle{headings}

pgfplotsset{compat=1.16}
begin{document}
section{A}
end{document}









share|improve this question

























  • Have a look at fancyhdr.

    – JouleV
    11 hours ago














1












1








1








How can I put the page number to the bottom and very middle of the page? I now have:



documentclass[11pt, a4paper, german]{article}
usepackage{color}
usepackage{amsmath, amsfonts, amsthm,}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage{mathrsfs}
usepackage{amsmath}
usepackage{mathtools}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{graphicx}
usepackage{array}
pagestyle{headings}

pgfplotsset{compat=1.16}
begin{document}
section{A}
end{document}









share|improve this question
















How can I put the page number to the bottom and very middle of the page? I now have:



documentclass[11pt, a4paper, german]{article}
usepackage{color}
usepackage{amsmath, amsfonts, amsthm,}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage{mathrsfs}
usepackage{amsmath}
usepackage{mathtools}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{graphicx}
usepackage{array}
pagestyle{headings}

pgfplotsset{compat=1.16}
begin{document}
section{A}
end{document}






pagestyle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









Kurt

40.8k850164




40.8k850164










asked 12 hours ago









chri11chri11

734




734













  • Have a look at fancyhdr.

    – JouleV
    11 hours ago



















  • Have a look at fancyhdr.

    – JouleV
    11 hours ago

















Have a look at fancyhdr.

– JouleV
11 hours ago





Have a look at fancyhdr.

– JouleV
11 hours ago










2 Answers
2






active

oldest

votes


















0














Use pagestyle{plain} instead of pagestyle{headings}. This will center the page number at the foot of the page but will not print any headings at the top of the page. If you want both headings and a centered page number use the fancyhdr package (> texdoc fancyhdr for the manual).






share|improve this answer
























  • I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

    – chri11
    11 hours ago











  • You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

    – Bernard
    11 hours ago











  • I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

    – chri11
    11 hours ago











  • Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

    – ferahfeza
    10 hours ago



















0














Well, at last it depends on the content of header and footer you want to use.



If you only want the current page number on the bottom of each page you can -- as already mentioned by @Peter-Wilson -- pagestyle{plain} instead of your used pagestyle{headings}.



If you want for example to have a line before the footer you can use style fancy and define the layout of header and footer by your own, for example with:



usepackage{fancyhdr} % <===============================================
pagestyle{fancy}
fancyhf{}
fancyfoot[C]{thepage} % <================================= page nummer
renewcommand{headrulewidth}{0pt} % <=================== no header rule
renewcommand{footrulewidth}{1pt} % <====================== footer rule


If you use maketitle and tableofcontents things changed and you get the first page displayed without the footline. To get rid of this you can add thispagestyle{fancy}.



There are other definitions of header and footer possible, please see the documentation of fancyhdr ...



Please see the following code (with maketitle and tableofcontents, important code changings marked with <======):



documentclass[11pt, a4paper, ngerman]{article} % <=====================

usepackage{color}
usepackage{amsmath, amsfonts, amsthm,}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage{mathrsfs}
usepackage{mathtools}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{graphicx}
usepackage{array}

usepackage{blindtext} % <========================= to create dummy text

usepackage{fancyhdr} % <===============================================
pagestyle{fancy}
fancyhf{}
fancyfoot[C]{thepage} % <================================= page nummer
renewcommand{headrulewidth}{0pt} % <=================== no header rule
renewcommand{footrulewidth}{1pt} % <====================== footer rule

pgfplotsset{compat=1.16}
title{Title}
author{Author}


begin{document}

maketitle
thispagestyle{fancy} % <===============================================
tableofcontents
section{A}
blinddocument
end{document}


and the result:



result



Please see that I changed your used option class from german to ngerman. BTW: Do not call packages twice ...






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%2f483393%2fadjusting-position-of-the-page-number%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









    0














    Use pagestyle{plain} instead of pagestyle{headings}. This will center the page number at the foot of the page but will not print any headings at the top of the page. If you want both headings and a centered page number use the fancyhdr package (> texdoc fancyhdr for the manual).






    share|improve this answer
























    • I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

      – chri11
      11 hours ago











    • You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

      – Bernard
      11 hours ago











    • I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

      – chri11
      11 hours ago











    • Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

      – ferahfeza
      10 hours ago
















    0














    Use pagestyle{plain} instead of pagestyle{headings}. This will center the page number at the foot of the page but will not print any headings at the top of the page. If you want both headings and a centered page number use the fancyhdr package (> texdoc fancyhdr for the manual).






    share|improve this answer
























    • I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

      – chri11
      11 hours ago











    • You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

      – Bernard
      11 hours ago











    • I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

      – chri11
      11 hours ago











    • Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

      – ferahfeza
      10 hours ago














    0












    0








    0







    Use pagestyle{plain} instead of pagestyle{headings}. This will center the page number at the foot of the page but will not print any headings at the top of the page. If you want both headings and a centered page number use the fancyhdr package (> texdoc fancyhdr for the manual).






    share|improve this answer













    Use pagestyle{plain} instead of pagestyle{headings}. This will center the page number at the foot of the page but will not print any headings at the top of the page. If you want both headings and a centered page number use the fancyhdr package (> texdoc fancyhdr for the manual).







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 11 hours ago









    Peter WilsonPeter Wilson

    8,74211533




    8,74211533













    • I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

      – chri11
      11 hours ago











    • You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

      – Bernard
      11 hours ago











    • I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

      – chri11
      11 hours ago











    • Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

      – ferahfeza
      10 hours ago



















    • I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

      – chri11
      11 hours ago











    • You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

      – Bernard
      11 hours ago











    • I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

      – chri11
      11 hours ago











    • Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

      – ferahfeza
      10 hours ago

















    I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

    – chri11
    11 hours ago





    I tried it with fancyhdr but it doesnt really work for me.. it puts the new headline above my last headline and sometimes there is no headline with fancyhdr..

    – chri11
    11 hours ago













    You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

    – Bernard
    11 hours ago





    You also may try with titleps, from the titlesec bundle. It is simpler to use than fancyhdr, in my opinion.

    – Bernard
    11 hours ago













    I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

    – chri11
    11 hours ago





    I tried both, but i does not really work for me. Can someone post the commands for headline in fancy and page number at the bottom?

    – chri11
    11 hours ago













    Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

    – ferahfeza
    10 hours ago





    Add to your preamble : usepackage{fancyhdr,floatpag} pagestyle{fancy} fancyhf{}% Clear page header/footer renewcommand{headrulewidth}{0pt}% No header rule fancyfoot[C]{thepage} floatpagestyle{fancy}% Page style for float-page only

    – ferahfeza
    10 hours ago











    0














    Well, at last it depends on the content of header and footer you want to use.



    If you only want the current page number on the bottom of each page you can -- as already mentioned by @Peter-Wilson -- pagestyle{plain} instead of your used pagestyle{headings}.



    If you want for example to have a line before the footer you can use style fancy and define the layout of header and footer by your own, for example with:



    usepackage{fancyhdr} % <===============================================
    pagestyle{fancy}
    fancyhf{}
    fancyfoot[C]{thepage} % <================================= page nummer
    renewcommand{headrulewidth}{0pt} % <=================== no header rule
    renewcommand{footrulewidth}{1pt} % <====================== footer rule


    If you use maketitle and tableofcontents things changed and you get the first page displayed without the footline. To get rid of this you can add thispagestyle{fancy}.



    There are other definitions of header and footer possible, please see the documentation of fancyhdr ...



    Please see the following code (with maketitle and tableofcontents, important code changings marked with <======):



    documentclass[11pt, a4paper, ngerman]{article} % <=====================

    usepackage{color}
    usepackage{amsmath, amsfonts, amsthm,}
    usepackage[utf8]{inputenc}
    usepackage[ngerman]{babel}
    usepackage{mathrsfs}
    usepackage{mathtools}
    usepackage{amssymb}
    usepackage{pgfplots}
    usepackage{graphicx}
    usepackage{array}

    usepackage{blindtext} % <========================= to create dummy text

    usepackage{fancyhdr} % <===============================================
    pagestyle{fancy}
    fancyhf{}
    fancyfoot[C]{thepage} % <================================= page nummer
    renewcommand{headrulewidth}{0pt} % <=================== no header rule
    renewcommand{footrulewidth}{1pt} % <====================== footer rule

    pgfplotsset{compat=1.16}
    title{Title}
    author{Author}


    begin{document}

    maketitle
    thispagestyle{fancy} % <===============================================
    tableofcontents
    section{A}
    blinddocument
    end{document}


    and the result:



    result



    Please see that I changed your used option class from german to ngerman. BTW: Do not call packages twice ...






    share|improve this answer




























      0














      Well, at last it depends on the content of header and footer you want to use.



      If you only want the current page number on the bottom of each page you can -- as already mentioned by @Peter-Wilson -- pagestyle{plain} instead of your used pagestyle{headings}.



      If you want for example to have a line before the footer you can use style fancy and define the layout of header and footer by your own, for example with:



      usepackage{fancyhdr} % <===============================================
      pagestyle{fancy}
      fancyhf{}
      fancyfoot[C]{thepage} % <================================= page nummer
      renewcommand{headrulewidth}{0pt} % <=================== no header rule
      renewcommand{footrulewidth}{1pt} % <====================== footer rule


      If you use maketitle and tableofcontents things changed and you get the first page displayed without the footline. To get rid of this you can add thispagestyle{fancy}.



      There are other definitions of header and footer possible, please see the documentation of fancyhdr ...



      Please see the following code (with maketitle and tableofcontents, important code changings marked with <======):



      documentclass[11pt, a4paper, ngerman]{article} % <=====================

      usepackage{color}
      usepackage{amsmath, amsfonts, amsthm,}
      usepackage[utf8]{inputenc}
      usepackage[ngerman]{babel}
      usepackage{mathrsfs}
      usepackage{mathtools}
      usepackage{amssymb}
      usepackage{pgfplots}
      usepackage{graphicx}
      usepackage{array}

      usepackage{blindtext} % <========================= to create dummy text

      usepackage{fancyhdr} % <===============================================
      pagestyle{fancy}
      fancyhf{}
      fancyfoot[C]{thepage} % <================================= page nummer
      renewcommand{headrulewidth}{0pt} % <=================== no header rule
      renewcommand{footrulewidth}{1pt} % <====================== footer rule

      pgfplotsset{compat=1.16}
      title{Title}
      author{Author}


      begin{document}

      maketitle
      thispagestyle{fancy} % <===============================================
      tableofcontents
      section{A}
      blinddocument
      end{document}


      and the result:



      result



      Please see that I changed your used option class from german to ngerman. BTW: Do not call packages twice ...






      share|improve this answer


























        0












        0








        0







        Well, at last it depends on the content of header and footer you want to use.



        If you only want the current page number on the bottom of each page you can -- as already mentioned by @Peter-Wilson -- pagestyle{plain} instead of your used pagestyle{headings}.



        If you want for example to have a line before the footer you can use style fancy and define the layout of header and footer by your own, for example with:



        usepackage{fancyhdr} % <===============================================
        pagestyle{fancy}
        fancyhf{}
        fancyfoot[C]{thepage} % <================================= page nummer
        renewcommand{headrulewidth}{0pt} % <=================== no header rule
        renewcommand{footrulewidth}{1pt} % <====================== footer rule


        If you use maketitle and tableofcontents things changed and you get the first page displayed without the footline. To get rid of this you can add thispagestyle{fancy}.



        There are other definitions of header and footer possible, please see the documentation of fancyhdr ...



        Please see the following code (with maketitle and tableofcontents, important code changings marked with <======):



        documentclass[11pt, a4paper, ngerman]{article} % <=====================

        usepackage{color}
        usepackage{amsmath, amsfonts, amsthm,}
        usepackage[utf8]{inputenc}
        usepackage[ngerman]{babel}
        usepackage{mathrsfs}
        usepackage{mathtools}
        usepackage{amssymb}
        usepackage{pgfplots}
        usepackage{graphicx}
        usepackage{array}

        usepackage{blindtext} % <========================= to create dummy text

        usepackage{fancyhdr} % <===============================================
        pagestyle{fancy}
        fancyhf{}
        fancyfoot[C]{thepage} % <================================= page nummer
        renewcommand{headrulewidth}{0pt} % <=================== no header rule
        renewcommand{footrulewidth}{1pt} % <====================== footer rule

        pgfplotsset{compat=1.16}
        title{Title}
        author{Author}


        begin{document}

        maketitle
        thispagestyle{fancy} % <===============================================
        tableofcontents
        section{A}
        blinddocument
        end{document}


        and the result:



        result



        Please see that I changed your used option class from german to ngerman. BTW: Do not call packages twice ...






        share|improve this answer













        Well, at last it depends on the content of header and footer you want to use.



        If you only want the current page number on the bottom of each page you can -- as already mentioned by @Peter-Wilson -- pagestyle{plain} instead of your used pagestyle{headings}.



        If you want for example to have a line before the footer you can use style fancy and define the layout of header and footer by your own, for example with:



        usepackage{fancyhdr} % <===============================================
        pagestyle{fancy}
        fancyhf{}
        fancyfoot[C]{thepage} % <================================= page nummer
        renewcommand{headrulewidth}{0pt} % <=================== no header rule
        renewcommand{footrulewidth}{1pt} % <====================== footer rule


        If you use maketitle and tableofcontents things changed and you get the first page displayed without the footline. To get rid of this you can add thispagestyle{fancy}.



        There are other definitions of header and footer possible, please see the documentation of fancyhdr ...



        Please see the following code (with maketitle and tableofcontents, important code changings marked with <======):



        documentclass[11pt, a4paper, ngerman]{article} % <=====================

        usepackage{color}
        usepackage{amsmath, amsfonts, amsthm,}
        usepackage[utf8]{inputenc}
        usepackage[ngerman]{babel}
        usepackage{mathrsfs}
        usepackage{mathtools}
        usepackage{amssymb}
        usepackage{pgfplots}
        usepackage{graphicx}
        usepackage{array}

        usepackage{blindtext} % <========================= to create dummy text

        usepackage{fancyhdr} % <===============================================
        pagestyle{fancy}
        fancyhf{}
        fancyfoot[C]{thepage} % <================================= page nummer
        renewcommand{headrulewidth}{0pt} % <=================== no header rule
        renewcommand{footrulewidth}{1pt} % <====================== footer rule

        pgfplotsset{compat=1.16}
        title{Title}
        author{Author}


        begin{document}

        maketitle
        thispagestyle{fancy} % <===============================================
        tableofcontents
        section{A}
        blinddocument
        end{document}


        and the result:



        result



        Please see that I changed your used option class from german to ngerman. BTW: Do not call packages twice ...







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        KurtKurt

        40.8k850164




        40.8k850164






























            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%2f483393%2fadjusting-position-of-the-page-number%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

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks