# Suppress numbering for newcommand and contional mesh up of text

I have two questions. First I would like to add subsection to the tableofcontent of my document to structure a little bit the toc without repeating the subsection in the docoment. And I already found out that this code:

\documentclass[]{scrartcl}
\usepackage{cook}
\usepackage[T1]{fontenc}
\usepackage{wallpaper}
\usepackage{longtable}

% NEW CODE FOR THE PROBLEM!!!
\newcommand{\fakesubsection}[1]{%
% Add more content here, if needed.
}
\tableofcontents

\fakesubsection{subsection}
\input{site1.tex}
\input{site2.tex}
\input{site3.tex}

\input{site1.tex}
\input{site2.tex}
\input{site3.tex}

\end{document}


works for me but now I would like to suppress the numbering of the subsections and I didn't find a solution for this problem that's why I am hopping someone here can give me a hint how I can do this.

My second question can I use something like conditional meshed for the text so that every entry that start after a section a meshed up 2 cm and every entry that starts after a subsection 4 cm so that I get a structure like

Header AAA
Subsection aaa
Site 1
Site 2
Site 3

Site 4
Site 5
Site 6


I hope my explation is good enough to understand what I am looking for and of course I would very thankful for every hint. best regards Dan

• Welcome to TeX.SX! Please do not post two different (and apparently totally unrelated) issues in one question. – user31729 Jul 3 '16 at 10:24
• If you want to remove the numbering, just remove the \protect\numberline{\thesubsection} code snippet in \addcontentsline – user31729 Jul 3 '16 at 10:29
• Crosspost: mrunix.de/forums/showthread.php?77109 – esdd Jul 4 '16 at 11:09

scrartcl is a KOMA-Script class. So you can use

\newcommand{\fakesubsection}[1]{%
}


Update using scrreprt which provides chapters (based on the MWE and the informations in this post on mrunix.de)

\documentclass[]{scrreprt}[2016/05/10]

% Inputencoding hier selbst festlegen
\usepackage{cook}% see https://sourceforge.net/projects/chilicookbook/
\usepackage[utf8]{inputenc}

\usepackage{longtable}

\recipecolor{C20E0F}

\setcounter{secnumdepth}{-1}
\setcounter{tocdepth}{\subsectiontocdepth}

\RedeclareSectionCommand[%
beforeskip=-2cm,%
font=\rmfamily\Huge\color{darkred},%
tocentryformat=\sffamily\Large\textbf%
]{chapter}
\renewcommand\raggedchapter{\centering}

\RedeclareSectionCommand[%
tocbeforeskip=5pt plus .2pt,%
toclinefill=\hfill,%
tocpagenumberformat=\blank,%
tocentryformat=\textbf%
]{section}
\newcommand\blank[1]{}

\newcommand{\fakesection}[1]{%
}

\begin{document}
\tableofcontents
\chapter{Hauptgericht}
\fakesection{Deutsche Küche}
\begin{recipe}[]{Bandnudeln mit Lachs}{Quelle?}{}
\ingredient{Salz, Pfeffer}
\ingredient{Bandnudeln}
\step
Ins Restaurant gehen und kaufen, essen und freuen
\end{recipe}

\begin{recipe}[]{Apfelpfannkuchen}{Quelle?}{}
\ingredient{2 Äpfel}
\ingredient{Prise Salz}
\step
Chips sind auch lecker
\end{recipe}

\chapter{Gebäck}
\begin{recipe}[]{Apfel-Zimt-Muffins}{Quelle?}{}
\ingredient{120g Vollkorn-Weizenmehl}
\ingredient{250g Äpfel}
\step
Äpfel sind auch so gesund
\end{recipe}

\begin{recipe}[]{Apfelkuchen mit Mandel-Zimt Streuseln}{}
\par
\ingredient{1 Päckchen Vanillezucker}
\ingredient{2 Eier}
\ingredient{Zimt}
\ingredient{Salz}
\step
Kekse kann man auch kaufen
\end{recipe}
\end{document}