精致的章节样式 - Eufisky - The lost book
LaTeX手工制作漂亮的章节样式
精致的章节样式

精致的章节样式

Eufisky posted @ 2014年6月19日 03:45 in LaTeX with tags latex 章节设计 , 1024 阅读

在TeX使用中,很多时候想别出心裁地设计属于自己的版面或者文章样式,尤其是用TeX来设计版面和样式,做起来非所见所得,对于设计来说有了更高要求,需要我们有较多绘图和版面的知识。  

如下几个样式来自网络供大家参考:选自:http://web.slzm.de/blog/latex/schone-kapiteltitelseiten-in-latex/

效果图:

代码设计:

 

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage
{xcolor}
\usepackage{blindtext}
\usepackage{fix-cm}
\usepackage{titlesec}
\usepackage{tikz} % Style 2, 3, 4
\usetikzlibrary{calc} % 2, 3, 4
\usetikzlibrary{decorations,decorations.shapes,shapes} % 3
% Style 1
%\renewcommand{\thechapter}{\Roman{chapter}}
\titleformat{\chapter}[display]
{\bfseries\Large}
{ %\Huge\textsc{\chaptertitlename}
\hfill\fontsize{120}{70}\selectfont\color{lightgray}\textbf{\thechapter}}
{-2ex}
{\filleft\fontsize{50}{70}\selectfont\scshape}
[\vspace{0ex}]
% Style 2
\titleformat{\chapter}[display]
{\bfseries\Large}
{\hfill \tikz[remember picture] \node[] (nr) {\fontsize{120}{70}\selectfont\color{lightgray}\textbf{\thechapter}};
\begin{tikzpicture}[overlay,remember picture]
\coordinate (leftborder) at ($(nr)-(100,0)$);
\coordinate (left) at ($(nr.west)-(1.5,0)$);
\draw[line width=2em] ($(nr.north east)+(0,1)$) -- ($(nr.north west)+(0,1)$) -- (left) -- (leftborder);
\end{tikzpicture}}
{-2ex}
{\filleft\fontsize{50}{70}\selectfont\scshape}
[\vspace{0ex}]
% Style 3
\titleformat{\chapter}[display]
{\bfseries\Large}
{\hfill \tikz[remember picture] \node[] (nr) {\fontsize{120}{70}\selectfont\color{lightgray}\textbf{\thechapter}};
\begin{tikzpicture}[overlay,remember picture]
\coordinate (leftborder) at ($(nr)-(100,0)$);
\coordinate (left) at ($(nr.west)-(1.5,0)$);
\draw[decoration={shape backgrounds,shape size=.5cm,shape=signal},signal from=west, signal to=east,decorate, draw=red!50!black, fill=red!50, decoration={shape sep=.5cm},line join=round] (leftborder) -- (left);
\end{tikzpicture}}
{-2ex}
{\filleft\fontsize{50}{70}\selectfont\scshape}
[\vspace{0ex}]
% Style 4
\titleformat{\chapter}[display]
{\bfseries\Large}
{\hfill \tikz[remember picture] \node[] (nr) {\fontsize{120}{70}\selectfont\color{blue!50!black}\textbf{\thechapter}~};
\begin{tikzpicture}[overlay,remember picture]
\coordinate (leftborder) at ($(nr)-(100,0)$);
\coordinate (leftborderhigh) at ($(nr.north west)-(100,0)$);
\coordinate (leftborderlow) at ($(nr.south west)-(100,0)$);
\coordinate (left) at ($(nr.west)-(1.5,0)$);
\fill[blue!20!white] (leftborderhigh) -- ($(nr.north west)+(0,0.5)$) -- (left) -- (leftborder) -- cycle;
\fill[blue!20!white] (leftborderlow) -- ($(nr.south west)-(0,0.5)$) -- (left) -- (leftborder) -- cycle;
\draw[blue!50!black,line width=0.1em,line join=round] (left) -- ($(nr.south west)-(0,0.5)$) -- ($(nr.south east)-(0,0.5)$) -- ($(nr.north east)+(0,0.5)$) -- ($(nr.north west)+(0,0.5)$) -- (left) -- (leftborder);
\end{tikzpicture}}
{-2ex}
{\filleft\fontsize{50}{70}\selectfont\scshape}
[\vspace{0ex}]
% ==========================
% DOKUMENT
% ==========================
\begin{document}
\chapter{Einleitung}
\blindtext
\chapter{Hauptteil}
\blindtext
\chapter{Schluss}
\blindtext
\end{document}

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter