I want to use a little banner as title in \section. It should look like the banner above "vocabulaire" but the text doesn't change its size and I would like to get rid of the section numbering. My second problem is that I want the banner to appear in the body of the document but not in the table of contents. Is it possible to have only the date there?
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
\usepackage[sfdefault]{ClearSans}
\usepackage[utf8]{inputenc}
\setlength{\parskip}{1.2ex}
\setlength{\parindent}{0em}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols,shadows}
\definecolor{bancolor}{RGB}{62,96,111}
\DeclareRobustCommand\datebanner[2]{\begin{tikzpicture}
\node[
signal,
signal from=north,
signal pointer angle=150,
fill=bancolor!75,
drop shadow={shadow xshift=0pt, color=bancolor},
rotate=-90,
text width=2cm,
text height=1.5cm,
anchor=north west
] (banner) at (0,0) {};
% the text in the banner
\node[
anchor=south,
text width=3cm,
align=center,
font=\itshape]
at ([yshift=1cm]banner.east) {#1 \\ #2};
\end{tikzpicture}}
\begin{document}
\tableofcontents
\section{\datebanner{2. April}{2018}}
\vspace{64pt}
\begin{tikzpicture}
\node[
signal,
signal from=north,
signal pointer angle=150,
fill=bancolor!75,
drop shadow={shadow xshift=0pt, color=bancolor},
rotate=-90,
text width=2cm,
text height=1.5cm,
anchor=north west
] (banner) at (0,0) {};
% the text in the banner
\node[
anchor=south,
text width=3cm,
align=center,
font=\itshape]
at ([yshift=1cm]banner.east) {28. April \\ 2018};
\end{tikzpicture}
\subsection{Vocabulaire}
\subsection{film}
\subsection{grammaire}
\subsubsection{Si + ...}
\subsection{orthographie}
\end{document}
So far it looks like this
\section
s like this? I.e., do you want to hide the numbering of all the\section
s? For the second part,\section[2. April 2018]{\datebanner{2. April}{2018}}
. The optional argument to\section
is used to define an alternative text for the ToC.font=\itshape
withfont=\normalsize\itshape
to overwrite the font size set by\section
.