1. Martin Scharrer
  2. tikzpagenodes
  3. Issues
Issue #2 open

marginpar area with asymmetric option (geometry package) and \reversemarginpar

zunbeltz_izaola
created an issue

marginpar area is not sensitve to the asymemetric option of the geometry package. This option makes to have all the margin notes on the right side, even for twoside documents such as the book class. I would like to use (current marginpar area) when I have the notes on the left (that can be done with asymmetric + \reversemarginpar). 'asymmetric' set \@mparswitchfalse and \reversemarginpar sets \@reversemargintrue. The definition of (current marginpar area) should check this conditions.

Comments (9)

  1. zunbeltz_izaola reporter

    A test file

    \documentclass{book}
    \usepackage{fixltx2e}
    
    
    \usepackage{geometry}
    \geometry{
        showcrop,
        paper = a4paper,
        layout = a4paper,
    %    layoutoffset={1cm,1cm},
        centering,
        marginparwidth = 5cm,
        asymmetric,
        width=10cm,
        bindingoffset=0cm
    }
    \usepackage{tikzpagenodes}
    \usetikzlibrary{calc}
    \usepackage{lipsum}
    
    \reversemarginpar
    \begin{document}
    \lipsum[1]\marginpar{my long marginpar test}
    \tikz[remember picture,overlay] {%
    \draw [blue,line width=2mm]
    (current page.south west)
    rectangle
    (current page.north east)
    ;
    \draw [green]
    (current page text area.south west)
    rectangle
    (current page text area.north east)
    ;
    \draw [yellow]
    (current page marginpar area.south west)
    rectangle
    (current page marginpar area.north east)
    ;
    \draw [red]
    (current page header area.south west)
    rectangle
    (current page header area.north east)
    ;
    \draw [orange]
    (current page footer area.south west)
    rectangle
    (current page footer area.north east)
    ;
    }
    
    \newpage
    \lipsum[1]\marginpar{my long marginpar test}
    \tikz[remember picture,overlay] {%
    \draw [blue,line width=2mm]
    (current page.south west)
    rectangle
    (current page.north east)
    ;
    \draw [green]
    (current page text area.south west)
    rectangle
    (current page text area.north east)
    ;
    \draw [yellow]
    (current page marginpar area.south west)
    rectangle
    (current page marginpar area.north east)
    ;
    \draw [red]
    (current page header area.south west)
    rectangle
    (current page header area.north east)
    ;
    \draw [orange]
    (current page footer area.south west)
    rectangle
    (current page footer area.north east)
    ;
    }
    
    \end{document}
    
  2. Martin Scharrer repo owner

    Your change seems to work with the asymmetric option but not without that option.

    When I turned the \ifoddoronepage clauses around it looks better, but I have to have a closer lock at this.

    I noticed that the frame lines drawn by geometrie are on the opposite side as the text is printed in the marginpars. Any idea about that?

  3. zunbeltz_izaola reporter

    Dear Marti,

    I attached the test files I used and their output. It is long ago, so I don't remember the code very well. I checked the output of the test but I didn't see why you say it is not working.

    You are right that the frame drawn by geometry are reversed. At the moment, I have no idea.

    lr., 2016.eko apiren 23a 20:58(e)an, Martin Scharrer igorleak idatzi zuen:

    --

    Zunbeltz Izaola

  4. Log in to comment