I am having trouble with my custom made titletoc/titlesec. I read in the documentation (missed it?), googled and searched this forum but could not find what I needed.
First what I want:
I have a long chapter title and I want a short version of it in the TOC. I found so far to use:
\usepackage[toctitles]{titlesec}
\chapter[short for TOC]{long for chapter heading}
As I redefined my own TOC this does not work. I guess I would have to enter this in my redefined TOC, but I don’t know how and where. Here what I did in a minimal example:
\documentclass[12pt,twoside,reqno]{amsbook}
%linksbuendige chapter, section, subsection
\usepackage{titlesec}
\newcommand*{\justifyheading}{\raggedright}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\scshape\justifyheading}{\chaptertitlename\ \thechapter}
{14pt}{\Large\scshape}
\titleformat{\section}
{\normalfont\large\bfseries\justifyheading}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\normalsize\bfseries\justifyheading}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\normalsize\justifyheading}{\thesubsubsection}{1em}{}
\titleformat{\paragraph}
{\normalfont\normalsize\itshape\justifyheading}{\theparagraph}{1em}{}
%Inhaltsverzeichnis formatieren
\usepackage{titletoc}
\newcommand\frontmatterchaptoc{%
\titlecontents{chapter}
[1.4em]{\addvspace{3pt}}
{\contentslabel{-0.25em}\hspace{2em}}
{\hspace*{-1.3em}\bfseries}% \MakeUppercase removed
{\titlerule*[0.3pc]{.}\contentspage}
}
\titlecontents{section}[3.7em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}}
{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{subsection}[5.9em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}}
{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{subsubsection}[8.9em]{}{\contentslabel{3em}}{\hspace*{-3.3em}}
{\titlerule*[0.3pc]{.}\contentspage}
\titlecontents{paragraph}[12.6em]{}{\contentslabel{3.7em}}{\hspace*{-3.7em}}
{\titlerule*[0.3pc]{.}\contentspage}
\begin{document}
\tableofcontents
\chapter[Title I want to see in TOC - short]{Title I am seeing in TOC - long}
This is chapter 1
\end{document}
It does not matter if I enter
\usepackage[toctitles]{titlesec}
or just
\usepackage{titlesec}
I hope someone knows how to integrate this into what I have so far!
Cheers
Summer
\documentclass{amsbook} \begin{document} \tableofcontents \chapter[Capybara]{Wombat} \end{document}What i want to say: This is one of the documented features ofamsbook. – Johannes_B Aug 02 '16 at 14:38