在奇数页和偶数页上绘制边框

在奇数页和偶数页上绘制边框

请帮我解决奇数页/偶数页上的边框不同问题

在此处输入图片描述

\documentclass{article}
\usepackage{tikz-page}
\usepackage{lipsum}
\usetikzlibrary{shadows.blur}
    
\tikzset{
        secnode/.style={
                minimum height=1cm,
                inner xsep=20pt,
                rotate=90,
                anchor=north east,
                draw=white,
                fill=olive,
                text=white,
                blur shadow={shadow blur steps=5,shadow blur extra rounding=1.3pt}},
        pagenode/.style={
                minimum width=5mm,
                minimum height=1cm,
                inner sep=2pt,
                anchor=south east,
                draw=white,
                fill=olive,
                text=white,
                blur shadow={shadow blur steps=5,shadow blur extra rounding=1.3pt}}
        }
\newcommand{\tikzpagelayout}{
        \draw[olive,line width=2pt,rounded corners=20pt] ([xshift=5mm]page.northwest) |- ([xshift=-2cm,yshift=5mm]page.southeast);
        \node[secnode] at (page.northwest) {Chapitre 05.\quad FONCTIONS LOGARTITHMES};
        \node[pagenode] at ([xshift=-1cm]page.southeast) {1};
      }
         
\pagestyle{plain}
\begin{document}
    \lipsum[1-3]
\end{document}

答案1

就像我说的,用来\tpflip设计夜间和奇数页面样式。 tkz-page 有偶数页和奇数页

\documentclass{article}
\usepackage{tikz-page}
\usepackage{lipsum}
\usetikzlibrary{shadows.blur}
    
\tikzset{
        secnode/.style={
                minimum height=1cm,
                inner xsep=20pt,
                rotate=90,
                anchor=north east,
                draw=white,
                fill=olive,
                text=white,
                blur shadow={shadow blur steps=5,shadow blur extra rounding=1.3pt}},
        pagenode/.style={
                minimum width=5mm,
                minimum height=1cm,
                inner sep=2pt,
                anchor=south east,
                draw=white,
                fill=olive,
                text=white,
                blur shadow={shadow blur steps=5,shadow blur extra rounding=1.3pt}}
        }
\newcommand{\tikzpagelayout}{
        \tpflip{
            \draw[olive,line width=2pt,rounded corners=20pt] ([xshift=5mm]page.northwest) |- ([xshift=-2cm,yshift=5mm]page.southeast);
            \node[secnode] at (page.northwest) {Chapitre 05.\quad FONCTIONS LOGARTITHMES};
            \node[pagenode] at ([xshift=-1cm]page.southeast) {1};
            }
            {
            \draw[olive,line width=2pt,rounded corners=20pt] ([xshift=-5mm]page.northeast) |- ([xshift=2cm,yshift=5mm]page.southwest);
            \node[secnode,anchor=south east] at (page.northeast) {Chapitre 05.\quad FONCTIONS LOGARTITHMES};
            \node[pagenode,anchor=south west] at ([xshift=1cm]page.southwest) {1};
            }
      }
         
\pagestyle{plain}
\begin{document}
    \lipsum[1-14]
\end{document}

相关内容