[Tex/LaTex] Lyx: heading texts overlap with heading numbers in Toc

table of contents

I am using Lyx and I have met a problem in my table of contents: the heading texts overlap with the heading numbers. I have found similar questions people asked here before, but unfortunately, I still could not fix it based on previous solutions. I am attaching the source code of my Lyx file as the following. Thanks in advanced!

% Preview source code

%% LyX 2.0.7.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage{babel}
\usepackage{float}
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
 {hyperref}
\hypersetup{pdftitle={A DNA Realization of Chemical Reaction Networks},
 pdfauthor={Yuan-Jyue Chen, Neil Dalchau, Cezanne Camacho, Matt Olson, David Soloveichik, Andrew Phillips, Luca Cardelli, and Georg Seelig}}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%\newref{fig}{refcmd = {Fig.~\ref{#1}}}
%\newref{tab}{refcmd = {Table~\ref{#1}}}
%\newref{sub}{refcmd = {\ref{#1}}}
%\newref{sec}{refcmd = {\ref{#1}}}
%\usepackage{prettyref}
%\newrefformat{fig}{Fig.~\ref{#1}}
%\newrefformat{sub}{Section~\ref{#1}}
%\newrefformat{sec}{Section~\ref{#1}}
%\newrefformat{tab}{Table~\ref{#1}}
%\newrefformat{eq}{(\ref{#1})}

\usepackage{mathpazo}
\usepackage[small,bf]{caption}

% allow minimal text w. figs
\renewcommand{\textfraction}{0.001}
\renewcommand{\topfraction}{0.95} 

%\renewcommand{\arraystretch}{1.2}
\usepackage{caption}
\usepackage{graphicx} % Inserting images
%\usepackage{subfig}
\usepackage{wrapfig} % Wrapping text around figure
\usepackage{sidecap}
\usepackage{subcaption}

\makeatother

\begin{document}

\section*{Supporting information}

~

\noindent Ben Groves$^{1}$, Yuan-Jyue Chen$^{1}$, Sergii Pochekailov$^{1}$,
Chiara Zurla$^{2}$, Philip Santangelo$^{2}$, and Georg Seelig$^{1,3}$

~

\noindent $^{1}$ Department of Electrical Engineering, University
of Washington

\noindent $^{2}$ Wallace H. Coulter Department of Biomedical Engineering,
Georgia Tech and Emory University

\noindent $^{3}$ Department of Computer Science \& Engineering, University
of Washington\tableofcontents{}

\renewcommand{\thesection}{S\arabic{section}}
\renewcommand{\thefigure}{S\arabic{figure}} 
\renewcommand{\thetable}{S\arabic{table}}

\newpage{}

\newpage{}


\section{Effect of covalent modifications on strand exchange kinetics}

test test test\newpage{}


\section{Control of double-stranded strand exchange kinetics by varying toehold
and double-stranded domain length}

\newpage{}


\section{In vitro test of different transfection reagents}

\newpage{}


\section{Sequential transfection versus co-transfection}

\newpage{}


\section{Impact of increasing the length of the double-stranded domain on
reporter activation in cells}



\newpage{}


\section{Reporter: sensitivity to spurious targets}

\newpage{}


\section{The impact of transfection regime on gate colocalization in cells}

\newpage{}


\section{Colocalization of activated reporter with endosome markers}

\newpage{}


\section{Circuit performance using different concentrations of nucleic acids}

\newpage{}


\section{Stability of double-stranded nucleic acid complexes}

\newpage{}


\section{AND logic gate: sensitivity to spurious targets}

\newpage{}


\section{OR logic gate based on 3-way strand displacement}

\newpage{}


\section{Material and methods}


\subsection{Sequence design}


\subsection{In vitro experiments}


\subsection{In vivo experiments}


\subsection{Melt curves}

\newpage{}


\section{Tables of sequences}
\end{document}

Best Answer

You can use the tocloft package for this. Insert this in your Lyx document preamble:

\usepackage{tocloft}
\cftsetindents{section}{0em}{3em}
\cftsetindents{subsection}{3em}{4em}

MWE

Related Question