LaTeX:文档标题中的未编号部分 [英] LaTeX: Unnumbered section in header of document

查看:347
本文介绍了LaTeX:文档标题中的未编号部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文档,希望在标题中放置一个未编号的部分.我使用的是fancyhdr软件包,对于带编号的部分,我会做这样的事情:

I have a document where I want to place an unnumbered section in my header. I use the fancyhdr package, and for a numbered section, I would had done something like this:

\lhead{\leftmark}

但是这不适用于未编号的部分. 我正在解决文档中的数学问题,所以我不想使用分节和带编号的节

But this don't work with unnumbered sections. I'm solving math-problems in my document, so I don't want part-sections and numbered sections

谁知道,这是怎么做到的?

Anyone, who knows, how this is done?

推荐答案

使用

      \chapter*{Preface\markboth{Preface}{}}

用于您未编号的部分. (您应该用实际使用的内容替换chapter.)

for your unnumbered section. (You should replace chapter with whatever you are actually using.)

您甚至可以尝试

\newcommand{\mysection}[1]{\section*{{#1}\protect\markboth{#1}{}}}

但要小心-可能会导致TOC或参考出现一些问题.

but be careful -- it may create some problems with TOC or references.

这篇关于LaTeX:文档标题中的未编号部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆