2

I came from here as I was looking for a way to get chapterthumb work according to the directions.

I manually installed the chapterthumb.sty package into the texlive2013 distribution. However, the MWE didn't work -- error: File chapterthumb.sty' not found. \pagestyle The textedior (TexStudio) shows that the package is present when I hover the mouse over the \usepackage{chapterthumb}. I don't know whether this is enough to tell that a package is recognized by texlive. What am I missing?

Note:
Xetex compilation.

Update
I have Windows 7 platform, based Chirstian Hupfer's adivse I put the .sty file in the working directory, this worked on the v0.1 chapterthumb package but not on v0.2.

Request
To show in a MWE code:

  1. How one can stop chapterthumb from appearing in table of contents, appendix chapters?
  2. How to change the text of the chapterthumb from Chapter 1 to Introduction, Chapter 2 to Materials & Methods, and so forth, as promised in the linked website above.

MWE

\documentclass{scrbook}
\usepackage{chapterthumb}
\pagestyle{scrheadings}
\lohead[\putchapterthumb]{\putchapterthumb}
\addtokomafont{chapterthumb}{\bfseries}
\begin{document}
\chapter{Am Anfang beginnt es}\dots
\chapter{Weiter}\dots
\chapter{Und weiter}\dots
\chapter{Und noch weiter}\dots
\chapter{Und immer weiter}\dots
\chapter{Geht die Reise}\dots
\chapter{Hinaus}\dots
\chapter{Und weiter hinaus}\dots
\chapter{Immer weiter hinaus}\dots
\end{document} 

Update
there is no guarantee that the code in the MWE nor in solution to work because of the KOMA-script update. The new version of chapterthumb package is no more based on the scrpage2 package, but rather on its successor scrlayer package. Please refer to http://www.komascript.de/chapterthumbs-example for more info.

doctorate
  • 4,173
  • 1
    Where did you install chaptertumb? – egreg Jun 06 '14 at 21:53
  • C:\texlive\2013\texmf-dist\tex\latex\chapterthumb\chapterthumb.sty – doctorate Jun 07 '14 at 06:53
  • Did you rerun texhash or whatever it is called on Windows? Alternatively, as a bypass solution: Install it in your current working directory, i.e. where your document *.tex is placed. –  Jun 07 '14 at 08:17
  • @ChristianHupfer, I put the .sty in the working directory, but then I got a different error: Missing \begin{document}. - – doctorate Jun 07 '14 at 09:11
  • You did not try to run xelatex on chapterthumb.sty, did you? That would not work, since a package itself does not provide the \begin{document} command –  Jun 07 '14 at 09:16
  • @ChristianHupfer, No, I ran xelatex on .tex file. – doctorate Jun 07 '14 at 09:26
  • @ChristianHupfer Hmm, it worked when I put the .sty in the working directory that belong to v0.1. By Markus Kohm on the linked website but not to the updated v0.2! very strange. Most probably something with the updated package itself. – doctorate Jun 07 '14 at 09:31
  • @ChristianHupfer, v0.1 is not desired, the v0.2 handles a very critical issue concerned with stopping chapterthumb manually. – doctorate Jun 07 '14 at 09:40
  • @doctorate: v0.2 runs without any problems on my computer. Is your KOMA installation also up to date? –  Jun 07 '14 at 09:42
  • @ChristianHupfer, what i want is to show in code how to stop chapterthumb from appearing in TOC, appendix, etc. and at the same time how to change the text of the chapterthumb itself; instead of Chapter 1 -> Introduction, Chapter 2 -> Materials & Methods, etc. Is that possible with v0.2? – doctorate Jun 07 '14 at 09:48
  • @ChristianHupfer, I updated the KOMA 3 packages in texlive 2013, restart, nothing changed. – doctorate Jun 07 '14 at 09:52
  • @doctorate: I will look later on that request –  Jun 07 '14 at 09:53

1 Answers1

2

Edit 07/10/2014: ** The question above and the solution are continued in a follow - up question, to be found here: How to get chapterthumbs match their chapter titles in KOMA-Script?, where a better way is provided.

The chapterthumb style can be removed by disabling the pagestyle{scrheadings} from KOMA classes and enabling it later on again where needed.

In order to print the chapter title instead of Chapter 1 etc, one way is to store the current chapter title to be a label content and later use \nameref*to refer to that label name inside a redefined \chapter (catching the [] and * versions) and redefine \chapterthumbformat command from chapterthumb.sty. (For more details about the labelling method, see my question (and answer) to Writing text content as labels and refer to them with \nameref*)

Note: This could lead to very long chapterthumb boxes, however!

Note 2: Source of an error will be the resetting of the chapter number!

\documentclass{scrbook}
\usepackage{chapterthumb}%
\usepackage{etoolbox}%
\usepackage{nameref}%
\lohead[\putchapterthumb]{\putchapterthumb}
\addtokomafont{chapterthumb}{\bfseries}

%
\let\LaTeXStandardChapter\chapter%
\renewcommand*{\chapterthumbformat}{\refcommand{chapter::title::\number\value{chapter}}}%

\makeatletter

\newcounter{totalchaptercounter}%

\newrobustcmd{\WriteChapterTitleToAux}[1]{%
\refstepcounter{totalchaptercounter}%
\immediate\write\@auxout{%
\string\newlabel{chapter::title::\number\value{totalchaptercounter}}{{\thesection}{\thepage}{\unexpanded{#1}}{}}
}% End of writing to AUX file
}%

\newrobustcmd{\refcommand}[1]{%
\nameref*{#1}%
}%

\newcommand{\chapter@noopt}[1]{%
\WriteChapterTitleToAux{#1}%
\LaTeXStandardChapter{#1}%
}%

\newcommand{\chapter@opt}[2][]{%
\WriteChapterTitleToAux{#2}%
\LaTeXStandardChapter[#1]{#2}%
}%


\newcommand{\unstarredchapter}{%
\@ifnextchar[{\chapter@opt}{\chapter@noopt}%
}%

\newcommand{\starredchapter}[1]{%
\LaTeXStandardChapter*{#1}
}%



\renewcommand{\chapter}{%
\@ifstar{\starredchapter}{\unstarredchapter}%
}%


\begin{document}
\pagestyle{plain}%
\tableofcontents
\clearpage
\pagestyle{scrheadings}

\chapter{Am Anfang beginnt es}\dots
\chapter{Weiter}\dots
\chapter{Und weiter}\dots
\chapter{Und noch weiter}\dots
\chapter{Und immer weiter}\dots
\chapter{Geht die Reise}\dots
\chapter{Hinaus}\dots
\chapter{Und weiter hinaus}\dots
\chapter{Immer weiter hinaus}\dots
\clearpage%
\pagestyle{plain} % Or any other user defined style
\appendix%
\section{Appendix A}%
\end{document}

enter image description here