发布时间:2012-07-04 00:55:39
文章类别:页面设置
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770102ett3.html
QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载
看图说话:
选自:
http://tex.stackexchange.com/questions/48641/chapter-title-in-rotated-vertical-box-at-the-margin
代码摘选:
%
----------------------------------------------------------------
% Book Class (This is a LaTeX2e document)
%
----------------------------------------------------------------
\documentclass[10pt,x11names,svgnames,twoside]{book}
\usepackage{tikz}
\usetikzlibrary{shapes.misc,calc}
\usepackage{lipsum,fancyhdr}
\usepackage[a4paper,left=1.2in,right=1in,top=1in,bottom=1in,headheight=\baselineskip,
%
----------------------------------------------------------------
\newcommand\MyColor{%
%------------------------------------------
\fancypagestyle{plain}{%
\fancyhead[LE]{%
}
%
----------------------------------------------------------------
\pagestyle{plain}
\renewcommand\chaptermark[1]{\markboth{\thechapter.~#1}{}}
\begin{document}
%
\chapter{First chapter}
\lipsum[1-16]
\cleardoublepage
\chapter{Second chapter}
\lipsum[1-16]
\chapter{Third chapter}
\lipsum[1-16]
\chapter{Fourth chapter}
\lipsum[1-16]
%
\end{document}
\documentclass{book}
\usepackage{background}
\usetikzlibrary{calc}
\usepackage{ifthen}
\usepackage{lipsum}
\pagestyle{plain}
% background common settings
\SetBgScale{1}
\SetBgAngle{0}
\SetBgOpacity{1}
\SetBgContents{}
% auxiliary counter
\newcounter{chapshift}
\addtocounter{chapshift}{-1}
% the list of colors to be used (add more if needed)
\newcommand\BoxColor{%
% the main command; the mandatory argument sets the color of the
vertical box
\makeatletter
\newcommand\ChapFrame{%
\AddEverypageHook{%
\ifthenelse{\isodd{\thepage}}
{\SetBgContents{%
}
{\SetBgContents{%
}
\bg@material}%
}
\makeatother
% redefinition of \chaptermark to contain only the title
\renewcommand\chaptermark[1]{\markboth{\thechapter.~#1}{}}
\begin{document}
\chapter[intro]{Introduction}
\ChapFrame
\lipsum[1-7]
\chapter{Results}
\ChapFrame
\lipsum[1-7]
\chapter{Discussion}
\ChapFrame
\lipsum[1-7]
\end{document}
发表评论 取消回复