我正在使用下面显示的代码片段,其中每个部分都有特定的形状,但在双面模式下存在问题。
我该如何解决这个问题?
感谢您的帮助。
\documentclass[twoside]{report}
\usepackage[a4paper, width=13cm, left=1cm]{geometry}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{lastpage}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage{makeidx}
\makeindex
\usepackage[pagebackref=false]{hyperref}
\makeatletter
\makeatother
\titleformat{\section}[display]
{\normalfont\color{black}}
{\filleft\large
\vspace*{1ex}
$\begin{tikzpicture}
\draw node(a) (8,0) [xshift=8.1cm,inner sep=12pt,draw] {\thesection};
\draw (a.east)(8.8,0) -- (11,0) ;
\draw (a.east)(8.8,-0.3) -- (11,-0.3) ;
\draw (a.east)(8.8,0.4) -- (11,0.4) ;
\draw (a.east)(8.8,0.2) -- (11,0.2) ;
\draw (a.west)(-7,-0.3) -- (7.3,-0.3);
\end{tikzpicture}$
}
{-10ex}
{\filleft \large\bfseries} []
\titleformat{name=\numberless}[display]
{\normalfont\color{black}} {}
%{0.5ex}
{\vspace*{3ex}\huge} []
\begin{document}
\pagenumbering{arabic}
\chapter{chapter}
\lipsum
\section{section}
\lipsum
\section{section}
\end{document}
结果如下: