3

I am using the "thumbs" package to generate tumb indices on my pages with the chapter information in them.

\addthumb{First Section}{\thesection}{white}{lightgray}

What I would like to do is to rotate the text by 90°. I tried the "rotating" package, which does not work for me:

\addthumb{First Section}{\begin{sideways}\parbox{5cm}{\centering \Large \textbf{\thesection}}\end{sideways}}{white}{lightgray}

The term on its own does work fine, just not in the thumbindex environment. Is there any possibility to achieve that?

Thank you for any advice!

UPDATE:


\documentclass[a4paper,10pt,titlepage]{article}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{color}
\usepackage[width=1cm, height=1.2cm, eventxtindent=5pt, oddtxtexdent=5pt]{thumbs}
\usepackage{rotating}

\begin{document}

\section{Intro} \label{chap:1}
\addthumb{First Section}{\thesection}{white}{lightgray}

text

\end{document}

andehhh
  • 133

1 Answers1

2

Here is a tikz solution.

\documentclass{article}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay, remember picture] \node[coordinate] (#1) {};}

\newcommand{\mythumb}{%
\tikzmark{a}%     %% <---put a % here
\begin{tikzpicture}[remember picture,overlay]
\node[rotate=90,minimum width=1.2cm,minimum height=1cm,fill=gray!30,font=\large\bfseries,text=white,anchor=south west] at ([yshift=1cm]a-|current page.north east) {\thesection};
\end{tikzpicture}%
}

\begin{document}
\section{Intro} \label{chap:1}
\mythumb
text

\end{document}

enter image description here