|
カテゴリ:LaTeX
LaTeXでbook環境にて本を作っていると、ヘッダの章・節見出しが付きますね。 \section[shorttitle]{long long long title} とすれば ページをはみ出るタイトルを短くできます。しかし問題があり、目次も短いタイトルのまま出てしまいます。これは問題!ということで、次のような対処法をとりあえず提案します。command定義のときにオプション指定をすればもっとシンプルになる気もしますが、まずは今回書いたものがエンジンになります。 追記:下記のやり方で難しい場合、tocファイルを書き直した上で\nofilesをプリアンブルに宣言するのが地道ですが確実です。nofilesの使い方は各自で別途調べてください。 \documentclass[12pt]{scrbook}\usepackage[automark,headsepline]{scrpage2} \newcommand{\kurza}{Abkuerzung fuer Kopfzeile 1} \newcommand{\kurzb}{Abkuerzung fuer Kopfzeile 2} \defpagestyle{kurztita}{% {\kurza\hfill\thesection}% {\thesubsection\hfill\kurza}% {blablabla \hfill \kurza}% }% {{}{}{}} \defpagestyle{kurztitb}{% {\kurzb\hfill\thesection}% {\thesubsection\hfill\kurzb}% {blablabla \hfill \kurzb}% }% {{}{}{}} %http://www.rrzn.uni-hannover.de/fileadmin/kurse/material/latex/scrguide.pdf \begin{document} \tableofcontents \chapter{erst} %\section[Abkuerzung fuer Kopfzeile 1]{sehr sehr sehr langer erster Titel} \pagestyle{kurztita} \section{sehr sehr sehr langer erster Titel} blablabla ... \pagestyle{headings} \section{Abkuerzung ist nicht benoetigt} blablabla ... %\section[Abkuerzung fuer Kopfzeile 2]{sehr sehr sehr langer zweiter Titel} \pagestyle{kurztitb} \section{sehr sehr sehr langer zweiter Titel} blablabla ... \pagestyle{headings} \section{Abkuerzung ist wieder nicht benoetigt} blablabla ... \end{document} お気に入りの記事を「いいね!」で応援しよう
[LaTeX] カテゴリの最新記事
多少振り回されたのですが、下記の方法がスマートです。
http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/7231.html (2013年03月11日 20時50分21秒) |