使用LaTeX的fancyhdr在标题中设置0个边距

时间:2010-05-09 22:25:12

标签: latex

我正在尝试为我正在使用fancyhdr的报告定义自定义布局。在包含章节开头的页面上,我希望我的标题包含跨越整个页面的边框(边距为0厘米),尽管在文本区域保留默认边距。我可以让盒子跨越“边缘注释”区域,但不是另一边。这是我的一些代码:

\fancypagestyle{plain}{ % pages containing chapter start
    \fancyhead{}
    \fancyhead[RO]{\colorbox{NavyBlue}{\textcolor{White}{\raisebox{0cm}[1cm][0.5cm]{\makebox[3cm][c]{\textbf{\CNoV\thechapter}}}}}
}

关于如何做的任何想法?

更新

alt text http://docs.google.com/File?id=dg4jt6qx_10nnpxfqdj_b

正如您所见,我希望我的标题跨越整个页面(在包含章节开头的页面上)。文本应具有正常的边距..

2 个答案:

答案 0 :(得分:1)

我不完全确定你想要什么,但也许就是这样:

\fancypagestyle{plain}{ % pages containing chapter start
        \fancyhead{}
        \fancyhead[RO]{\hspace*{-5cm}
        \colorbox{NavyBlue}{\textcolor{White}{\raisebox{0cm}[1cm][0.5cm]{\makebox[25cm][c]{%
            \textbf{\CNoV\thechapter}}}}}}
}

答案 1 :(得分:1)

查看texample.net网站上的Fancy chapter headings示例。 它似乎是你在寻找的东西。

alt text http://media.texample.net/tikz/examples/PNG/fancy-chapter-headings.png

相关问题