First Page Heading Placed Wrong in Memoir when Redefining Empty












1














For the drafts of my document, I am trying to add a date and time to each page and I decided to use the headers/footers for this. I want the timestamp to be on pages that normally have pagestyle{empty}, so I added the headers like so:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makeevenhead{empty}{draftdate}{}{}
makeoddhead{empty}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{empty}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This results in this clearly wrong header on the first page:



Output of the broken MWE showing the incorrect header placement



The "Copyright Page" also using the empty style is correct, as is the following page using the plain style.



Replacing empty with a new page style foo fixes the problem:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makepagestyle{foo}
makeevenhead{foo}{draftdate}{}{}
makeoddhead{foo}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{foo}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This however, is not a full solution, since I want later empty pages created with cleardoublepage or inserted between chapters to also have the timestamp.



Interestingly, using a header like makeoddhead{empty}{}{any text}{draftdate} works correctly.



What is happening here?










share|improve this question






















  • Seems you encountered a bug with empty... and were understandably confused. This is also why you could make it work with a different style (which isn't buggy).
    – whatisit
    Dec 15 '18 at 2:43






  • 1




    The memoir empty style are best left alone as it is intentionally missing features that other styles have. Either use makepagestyle{myempty}copypagestyle{empty}{myempty} or use makeheadfootstrut{empty}{strut}{strut}, the former is the preferred method.
    – daleif
    Dec 15 '18 at 4:19










  • Thanks, @daleif! This is the solution I will use.
    – Scott Colby
    Dec 17 '18 at 2:11
















1














For the drafts of my document, I am trying to add a date and time to each page and I decided to use the headers/footers for this. I want the timestamp to be on pages that normally have pagestyle{empty}, so I added the headers like so:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makeevenhead{empty}{draftdate}{}{}
makeoddhead{empty}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{empty}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This results in this clearly wrong header on the first page:



Output of the broken MWE showing the incorrect header placement



The "Copyright Page" also using the empty style is correct, as is the following page using the plain style.



Replacing empty with a new page style foo fixes the problem:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makepagestyle{foo}
makeevenhead{foo}{draftdate}{}{}
makeoddhead{foo}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{foo}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This however, is not a full solution, since I want later empty pages created with cleardoublepage or inserted between chapters to also have the timestamp.



Interestingly, using a header like makeoddhead{empty}{}{any text}{draftdate} works correctly.



What is happening here?










share|improve this question






















  • Seems you encountered a bug with empty... and were understandably confused. This is also why you could make it work with a different style (which isn't buggy).
    – whatisit
    Dec 15 '18 at 2:43






  • 1




    The memoir empty style are best left alone as it is intentionally missing features that other styles have. Either use makepagestyle{myempty}copypagestyle{empty}{myempty} or use makeheadfootstrut{empty}{strut}{strut}, the former is the preferred method.
    – daleif
    Dec 15 '18 at 4:19










  • Thanks, @daleif! This is the solution I will use.
    – Scott Colby
    Dec 17 '18 at 2:11














1












1








1







For the drafts of my document, I am trying to add a date and time to each page and I decided to use the headers/footers for this. I want the timestamp to be on pages that normally have pagestyle{empty}, so I added the headers like so:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makeevenhead{empty}{draftdate}{}{}
makeoddhead{empty}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{empty}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This results in this clearly wrong header on the first page:



Output of the broken MWE showing the incorrect header placement



The "Copyright Page" also using the empty style is correct, as is the following page using the plain style.



Replacing empty with a new page style foo fixes the problem:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makepagestyle{foo}
makeevenhead{foo}{draftdate}{}{}
makeoddhead{foo}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{foo}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This however, is not a full solution, since I want later empty pages created with cleardoublepage or inserted between chapters to also have the timestamp.



Interestingly, using a header like makeoddhead{empty}{}{any text}{draftdate} works correctly.



What is happening here?










share|improve this question













For the drafts of my document, I am trying to add a date and time to each page and I decided to use the headers/footers for this. I want the timestamp to be on pages that normally have pagestyle{empty}, so I added the headers like so:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makeevenhead{empty}{draftdate}{}{}
makeoddhead{empty}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{empty}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This results in this clearly wrong header on the first page:



Output of the broken MWE showing the incorrect header placement



The "Copyright Page" also using the empty style is correct, as is the following page using the plain style.



Replacing empty with a new page style foo fixes the problem:



documentclass{memoir}

setbinding{0in}
setlrmarginsandblock{1in}{1in}{*}
setulmarginsandblock{1in}{1in}{*}
checkandfixthelayout

usepackage[en-US]{datetime2}
usepackage{xcolor}
usepackage{lipsum}

newcommand{draftdate}{color{gray}sffamilysmallDTMsetstyle{default}DTMNow}

makepagestyle{foo}
makeevenhead{foo}{draftdate}{}{}
makeoddhead{foo}{}{}{draftdate}

makeevenhead{plain}{draftdate}{}{}
makeoddhead{plain}{}{}{draftdate}

begin{document}
pagestyle{foo}

noindent Title Page Stuff

clearpage

noindent Copyright Page Stuff

clearpage

pagestyle{plain}
lipsum
end{document}


This however, is not a full solution, since I want later empty pages created with cleardoublepage or inserted between chapters to also have the timestamp.



Interestingly, using a header like makeoddhead{empty}{}{any text}{draftdate} works correctly.



What is happening here?







memoir






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 14 '18 at 17:47









Scott Colby

20117




20117












  • Seems you encountered a bug with empty... and were understandably confused. This is also why you could make it work with a different style (which isn't buggy).
    – whatisit
    Dec 15 '18 at 2:43






  • 1




    The memoir empty style are best left alone as it is intentionally missing features that other styles have. Either use makepagestyle{myempty}copypagestyle{empty}{myempty} or use makeheadfootstrut{empty}{strut}{strut}, the former is the preferred method.
    – daleif
    Dec 15 '18 at 4:19










  • Thanks, @daleif! This is the solution I will use.
    – Scott Colby
    Dec 17 '18 at 2:11


















  • Seems you encountered a bug with empty... and were understandably confused. This is also why you could make it work with a different style (which isn't buggy).
    – whatisit
    Dec 15 '18 at 2:43






  • 1




    The memoir empty style are best left alone as it is intentionally missing features that other styles have. Either use makepagestyle{myempty}copypagestyle{empty}{myempty} or use makeheadfootstrut{empty}{strut}{strut}, the former is the preferred method.
    – daleif
    Dec 15 '18 at 4:19










  • Thanks, @daleif! This is the solution I will use.
    – Scott Colby
    Dec 17 '18 at 2:11
















Seems you encountered a bug with empty... and were understandably confused. This is also why you could make it work with a different style (which isn't buggy).
– whatisit
Dec 15 '18 at 2:43




Seems you encountered a bug with empty... and were understandably confused. This is also why you could make it work with a different style (which isn't buggy).
– whatisit
Dec 15 '18 at 2:43




1




1




The memoir empty style are best left alone as it is intentionally missing features that other styles have. Either use makepagestyle{myempty}copypagestyle{empty}{myempty} or use makeheadfootstrut{empty}{strut}{strut}, the former is the preferred method.
– daleif
Dec 15 '18 at 4:19




The memoir empty style are best left alone as it is intentionally missing features that other styles have. Either use makepagestyle{myempty}copypagestyle{empty}{myempty} or use makeheadfootstrut{empty}{strut}{strut}, the former is the preferred method.
– daleif
Dec 15 '18 at 4:19












Thanks, @daleif! This is the solution I will use.
– Scott Colby
Dec 17 '18 at 2:11




Thanks, @daleif! This is the solution I will use.
– Scott Colby
Dec 17 '18 at 2:11










2 Answers
2






active

oldest

votes


















1














In memoir the empty style have a slightly special setup. All pagestyle, except empty gets some struts added for consistency. The empty style does not, otherwise you cannot create a doc where the text block is almost the same size as paper size (at least not without memoir warning about it).



The missing struts in the empty style can lead to unpredictable behaviour as you have already seen.



It is rather rare users mess with the empty style, but if you want to, this is the proper method: (a) First create a new empty page style, with a name different from empty:



makepagestyle{myempty}


This is now an empty page style with struts.



Next overwrite the existing empty style:



copypagestyle{empty}{myempty}  


Then add your changes to empty.





Personally, I would not use the header/footers to add draft information. I'd use a package that can place stuff at an absolution position on all pages. Even though it an old package, my go to is often eso-pic.



Or you can combine the page style and eso-pic (or similar packages) to only have this information on the start of chapters (adding it to the chapter style. I use this in a book to add last changed information to each chapter (separate files) from my subversion archive.






share|improve this answer





























    1














    Here's a fix. (While this answer provides a workaround and observations of what works/doesn't work, @daleif says that you should really be creating a new style, such as myempty, rather than using empty).



    Replace:



    makeoddhead{empty}{}{}{draftdate}


    with:



    makeoddhead{empty}{}{~}{draftdate}


    That's it!



    Now, lets look at the behavior. It seems to stem from the right-side section of the header. This behavior appears to affect both makeevenhead{empty}{}{}{} and makeoddhead{empty}{}{}{}.



    Using makeoddhead{empty}{draftdate}{}{} (no problem):
    memomir empty style, left header



    Using makeoddhead{empty}{}{draftdate}{} (no problem):
    memomir empty style, center header



    Using makeoddhead{empty}{}{}{draftdate} (WHAT??):
    memomir empty style, right header



    Using makeoddhead{empty}{draftdate}{test}{} (no problem):
    memomir empty style, left and center header



    Using makeoddhead{empty}{draftdate}{}{test} (WHAT??):
    memomir empty style, left and right header



    Using makeoddhead{empty}{}{draftdate}{test} (no problem):
    memomir empty style, center and right header



    Sooooo, as you can see, there are two headers that behave in different ways for the right header within the empty page styles in memoir:




    • the right-only header

    • the left and right header


    Therefore, if you want to use only the right header or the right header with the left header, you can trick it. Bypass the issue by putting a space into the center header slot!






    share|improve this answer























    • It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
      – daleif
      Dec 15 '18 at 3:49






    • 1




      I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
      – whatisit
      Dec 15 '18 at 4:00










    • In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
      – daleif
      Dec 15 '18 at 4:03










    • If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
      – daleif
      Dec 15 '18 at 4:12










    • You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
      – daleif
      Dec 15 '18 at 4:17











    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%2f464874%2ffirst-page-heading-placed-wrong-in-memoir-when-redefining-empty%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














    In memoir the empty style have a slightly special setup. All pagestyle, except empty gets some struts added for consistency. The empty style does not, otherwise you cannot create a doc where the text block is almost the same size as paper size (at least not without memoir warning about it).



    The missing struts in the empty style can lead to unpredictable behaviour as you have already seen.



    It is rather rare users mess with the empty style, but if you want to, this is the proper method: (a) First create a new empty page style, with a name different from empty:



    makepagestyle{myempty}


    This is now an empty page style with struts.



    Next overwrite the existing empty style:



    copypagestyle{empty}{myempty}  


    Then add your changes to empty.





    Personally, I would not use the header/footers to add draft information. I'd use a package that can place stuff at an absolution position on all pages. Even though it an old package, my go to is often eso-pic.



    Or you can combine the page style and eso-pic (or similar packages) to only have this information on the start of chapters (adding it to the chapter style. I use this in a book to add last changed information to each chapter (separate files) from my subversion archive.






    share|improve this answer


























      1














      In memoir the empty style have a slightly special setup. All pagestyle, except empty gets some struts added for consistency. The empty style does not, otherwise you cannot create a doc where the text block is almost the same size as paper size (at least not without memoir warning about it).



      The missing struts in the empty style can lead to unpredictable behaviour as you have already seen.



      It is rather rare users mess with the empty style, but if you want to, this is the proper method: (a) First create a new empty page style, with a name different from empty:



      makepagestyle{myempty}


      This is now an empty page style with struts.



      Next overwrite the existing empty style:



      copypagestyle{empty}{myempty}  


      Then add your changes to empty.





      Personally, I would not use the header/footers to add draft information. I'd use a package that can place stuff at an absolution position on all pages. Even though it an old package, my go to is often eso-pic.



      Or you can combine the page style and eso-pic (or similar packages) to only have this information on the start of chapters (adding it to the chapter style. I use this in a book to add last changed information to each chapter (separate files) from my subversion archive.






      share|improve this answer
























        1












        1








        1






        In memoir the empty style have a slightly special setup. All pagestyle, except empty gets some struts added for consistency. The empty style does not, otherwise you cannot create a doc where the text block is almost the same size as paper size (at least not without memoir warning about it).



        The missing struts in the empty style can lead to unpredictable behaviour as you have already seen.



        It is rather rare users mess with the empty style, but if you want to, this is the proper method: (a) First create a new empty page style, with a name different from empty:



        makepagestyle{myempty}


        This is now an empty page style with struts.



        Next overwrite the existing empty style:



        copypagestyle{empty}{myempty}  


        Then add your changes to empty.





        Personally, I would not use the header/footers to add draft information. I'd use a package that can place stuff at an absolution position on all pages. Even though it an old package, my go to is often eso-pic.



        Or you can combine the page style and eso-pic (or similar packages) to only have this information on the start of chapters (adding it to the chapter style. I use this in a book to add last changed information to each chapter (separate files) from my subversion archive.






        share|improve this answer












        In memoir the empty style have a slightly special setup. All pagestyle, except empty gets some struts added for consistency. The empty style does not, otherwise you cannot create a doc where the text block is almost the same size as paper size (at least not without memoir warning about it).



        The missing struts in the empty style can lead to unpredictable behaviour as you have already seen.



        It is rather rare users mess with the empty style, but if you want to, this is the proper method: (a) First create a new empty page style, with a name different from empty:



        makepagestyle{myempty}


        This is now an empty page style with struts.



        Next overwrite the existing empty style:



        copypagestyle{empty}{myempty}  


        Then add your changes to empty.





        Personally, I would not use the header/footers to add draft information. I'd use a package that can place stuff at an absolution position on all pages. Even though it an old package, my go to is often eso-pic.



        Or you can combine the page style and eso-pic (or similar packages) to only have this information on the start of chapters (adding it to the chapter style. I use this in a book to add last changed information to each chapter (separate files) from my subversion archive.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 17 '18 at 8:16









        daleif

        32.2k252115




        32.2k252115























            1














            Here's a fix. (While this answer provides a workaround and observations of what works/doesn't work, @daleif says that you should really be creating a new style, such as myempty, rather than using empty).



            Replace:



            makeoddhead{empty}{}{}{draftdate}


            with:



            makeoddhead{empty}{}{~}{draftdate}


            That's it!



            Now, lets look at the behavior. It seems to stem from the right-side section of the header. This behavior appears to affect both makeevenhead{empty}{}{}{} and makeoddhead{empty}{}{}{}.



            Using makeoddhead{empty}{draftdate}{}{} (no problem):
            memomir empty style, left header



            Using makeoddhead{empty}{}{draftdate}{} (no problem):
            memomir empty style, center header



            Using makeoddhead{empty}{}{}{draftdate} (WHAT??):
            memomir empty style, right header



            Using makeoddhead{empty}{draftdate}{test}{} (no problem):
            memomir empty style, left and center header



            Using makeoddhead{empty}{draftdate}{}{test} (WHAT??):
            memomir empty style, left and right header



            Using makeoddhead{empty}{}{draftdate}{test} (no problem):
            memomir empty style, center and right header



            Sooooo, as you can see, there are two headers that behave in different ways for the right header within the empty page styles in memoir:




            • the right-only header

            • the left and right header


            Therefore, if you want to use only the right header or the right header with the left header, you can trick it. Bypass the issue by putting a space into the center header slot!






            share|improve this answer























            • It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
              – daleif
              Dec 15 '18 at 3:49






            • 1




              I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
              – whatisit
              Dec 15 '18 at 4:00










            • In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
              – daleif
              Dec 15 '18 at 4:03










            • If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
              – daleif
              Dec 15 '18 at 4:12










            • You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
              – daleif
              Dec 15 '18 at 4:17
















            1














            Here's a fix. (While this answer provides a workaround and observations of what works/doesn't work, @daleif says that you should really be creating a new style, such as myempty, rather than using empty).



            Replace:



            makeoddhead{empty}{}{}{draftdate}


            with:



            makeoddhead{empty}{}{~}{draftdate}


            That's it!



            Now, lets look at the behavior. It seems to stem from the right-side section of the header. This behavior appears to affect both makeevenhead{empty}{}{}{} and makeoddhead{empty}{}{}{}.



            Using makeoddhead{empty}{draftdate}{}{} (no problem):
            memomir empty style, left header



            Using makeoddhead{empty}{}{draftdate}{} (no problem):
            memomir empty style, center header



            Using makeoddhead{empty}{}{}{draftdate} (WHAT??):
            memomir empty style, right header



            Using makeoddhead{empty}{draftdate}{test}{} (no problem):
            memomir empty style, left and center header



            Using makeoddhead{empty}{draftdate}{}{test} (WHAT??):
            memomir empty style, left and right header



            Using makeoddhead{empty}{}{draftdate}{test} (no problem):
            memomir empty style, center and right header



            Sooooo, as you can see, there are two headers that behave in different ways for the right header within the empty page styles in memoir:




            • the right-only header

            • the left and right header


            Therefore, if you want to use only the right header or the right header with the left header, you can trick it. Bypass the issue by putting a space into the center header slot!






            share|improve this answer























            • It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
              – daleif
              Dec 15 '18 at 3:49






            • 1




              I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
              – whatisit
              Dec 15 '18 at 4:00










            • In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
              – daleif
              Dec 15 '18 at 4:03










            • If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
              – daleif
              Dec 15 '18 at 4:12










            • You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
              – daleif
              Dec 15 '18 at 4:17














            1












            1








            1






            Here's a fix. (While this answer provides a workaround and observations of what works/doesn't work, @daleif says that you should really be creating a new style, such as myempty, rather than using empty).



            Replace:



            makeoddhead{empty}{}{}{draftdate}


            with:



            makeoddhead{empty}{}{~}{draftdate}


            That's it!



            Now, lets look at the behavior. It seems to stem from the right-side section of the header. This behavior appears to affect both makeevenhead{empty}{}{}{} and makeoddhead{empty}{}{}{}.



            Using makeoddhead{empty}{draftdate}{}{} (no problem):
            memomir empty style, left header



            Using makeoddhead{empty}{}{draftdate}{} (no problem):
            memomir empty style, center header



            Using makeoddhead{empty}{}{}{draftdate} (WHAT??):
            memomir empty style, right header



            Using makeoddhead{empty}{draftdate}{test}{} (no problem):
            memomir empty style, left and center header



            Using makeoddhead{empty}{draftdate}{}{test} (WHAT??):
            memomir empty style, left and right header



            Using makeoddhead{empty}{}{draftdate}{test} (no problem):
            memomir empty style, center and right header



            Sooooo, as you can see, there are two headers that behave in different ways for the right header within the empty page styles in memoir:




            • the right-only header

            • the left and right header


            Therefore, if you want to use only the right header or the right header with the left header, you can trick it. Bypass the issue by putting a space into the center header slot!






            share|improve this answer














            Here's a fix. (While this answer provides a workaround and observations of what works/doesn't work, @daleif says that you should really be creating a new style, such as myempty, rather than using empty).



            Replace:



            makeoddhead{empty}{}{}{draftdate}


            with:



            makeoddhead{empty}{}{~}{draftdate}


            That's it!



            Now, lets look at the behavior. It seems to stem from the right-side section of the header. This behavior appears to affect both makeevenhead{empty}{}{}{} and makeoddhead{empty}{}{}{}.



            Using makeoddhead{empty}{draftdate}{}{} (no problem):
            memomir empty style, left header



            Using makeoddhead{empty}{}{draftdate}{} (no problem):
            memomir empty style, center header



            Using makeoddhead{empty}{}{}{draftdate} (WHAT??):
            memomir empty style, right header



            Using makeoddhead{empty}{draftdate}{test}{} (no problem):
            memomir empty style, left and center header



            Using makeoddhead{empty}{draftdate}{}{test} (WHAT??):
            memomir empty style, left and right header



            Using makeoddhead{empty}{}{draftdate}{test} (no problem):
            memomir empty style, center and right header



            Sooooo, as you can see, there are two headers that behave in different ways for the right header within the empty page styles in memoir:




            • the right-only header

            • the left and right header


            Therefore, if you want to use only the right header or the right header with the left header, you can trick it. Bypass the issue by putting a space into the center header slot!







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 15 '18 at 4:07

























            answered Dec 15 '18 at 2:42









            whatisit

            897313




            897313












            • It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
              – daleif
              Dec 15 '18 at 3:49






            • 1




              I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
              – whatisit
              Dec 15 '18 at 4:00










            • In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
              – daleif
              Dec 15 '18 at 4:03










            • If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
              – daleif
              Dec 15 '18 at 4:12










            • You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
              – daleif
              Dec 15 '18 at 4:17


















            • It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
              – daleif
              Dec 15 '18 at 3:49






            • 1




              I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
              – whatisit
              Dec 15 '18 at 4:00










            • In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
              – daleif
              Dec 15 '18 at 4:03










            • If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
              – daleif
              Dec 15 '18 at 4:12










            • You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
              – daleif
              Dec 15 '18 at 4:17
















            It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
            – daleif
            Dec 15 '18 at 3:49




            It is not a bug, it is specifically designed that way. If you want to overwrite the empty style, you first need to make it into a proper page style. For example by making a myempty style and then aliasing the empty style to it.
            – daleif
            Dec 15 '18 at 3:49




            1




            1




            I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
            – whatisit
            Dec 15 '18 at 4:00




            I'm not sure I understand why it's designed this way. The right-side header works as expected in all but two situations. I couldn't find anything in the memoir manual about a special situation with empty, but since I seem to have missed it please point me there. As for creating a new style, I am not disagreeing - I was responding to the specific question in the OP.
            – whatisit
            Dec 15 '18 at 4:00












            In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
            – daleif
            Dec 15 '18 at 4:03




            In general the empty style should be left alone. There are various things not added to empty under that assumption that it should be empty.
            – daleif
            Dec 15 '18 at 4:03












            If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
            – daleif
            Dec 15 '18 at 4:12




            If you want to mess with a common empty style, you need to do makepagestyle{myempty}copypagestyle{empty}{myempty} first. Otherwise the style is not adjustable and messing wit it can lead to unpredictable stuff.
            – daleif
            Dec 15 '18 at 4:12












            You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
            – daleif
            Dec 15 '18 at 4:17




            You can also use makeheadfootstrut{empty}{strut}{strut}, but as I said empty is special don't mess with it directly.
            – daleif
            Dec 15 '18 at 4:17


















            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%2f464874%2ffirst-page-heading-placed-wrong-in-memoir-when-redefining-empty%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?