使用 fanchdr 添加 90 度旋转的章节字

使用 fanchdr 添加 90 度旋转的章节字

如果我的问题看起来难以理解,我深感抱歉。

我想替换包含章节号的蓝色矩形

图片1

在此邮政,用这个

图片2

在此邮政保持章节字旋转90度。

预先感谢您的帮助!

答案1

是的,你可以按照你建议的方式将这两个答案结合起来。如果你对代码的特定部分有疑问,请随时提问。我唯一添加到答案中的就是在local bounding box装饰物周围添加一个,这样就可以轻松地定位旋转的Chapter

\documentclass{book}
\usepackage{xcolor}
\usepackage[explicit]{titlesec}
\usepackage{lmodern}
\usepackage{tikz}
\usepackage{pgfornament}
\usetikzlibrary{calc}
\definecolor{myblue}{RGB}{0,0,122}
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries\raggedleft}
  {\begin{tikzpicture}
   \begin{scope}[local bounding box=orna]
    \node[text width=3cm,align=center] (chapnum)
      {\fontsize{100}{130}\color{gray}\selectfont\thechapter};%
    \node[shift={(-1cm,1cm)},anchor=north west](CNW)
      at (chapnum.north west) {\pgfornament[width=1.75cm]{61}};
    \node[shift={(1cm,1cm)},anchor=north east](CNE)
      at (chapnum.north east) {\pgfornament[width=1.75cm,symmetry=v]{61}};
    \node[shift={(-1cm,-1cm)},anchor=south west](CSW)
      at (chapnum.south west) {\pgfornament[width=1.75cm,symmetry=h]{61}};
    \node[shift={(1cm,-1cm)},anchor=south east](CSE)
      at (chapnum.south east) {\pgfornament[width=1.75cm,symmetry=c]{61}};
   \end{scope}  
   \node[rotate=90,anchor=south,inner sep=0pt,font=\Huge\sffamily] at (orna.west) {\chaptertitlename};  
  \end{tikzpicture}
  }{0pt}{\fontsize{33}{40}\selectfont\color{myblue}#1}[\vskip10pt\Large]
\titlespacing*{\chapter}{0pt}{50pt}{10pt}


\begin{document}


\chapter{Test chapter}


\end{document}

在此处输入图片描述

相关内容