[Tex/LaTex] Section Text Alignment

indentationsectioning

I need to define customize head levels. The numbered section wrapping text indentation should be removed.

The below mentioned pictrue is my required output:

enter image description here

MWE:

\documentclass[twocolumn]{article}

\usepackage{lipsum}

\setcounter{secnumdepth}{0}

\def\numbered{\setcounter{secnumdepth}{5}}

\numbered


\makeatletter

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {8.25pt}%
                                   {\normalfont\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {.1ex}%.0001ex
                                     {\normalfont\large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {.1ex}%11.5pt
                                     {\normalfont\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                {-3.5ex \@plus -1ex \@minus -.2ex}%3.25ex \@plus1ex \@minus.2ex
                                    {.1ex}%
                                    {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
                              {-3.5ex \@plus -1ex \@minus -.2ex}%3.25ex \@plus1ex \@minus .2ex
                                       {.1ex}%
                                      {\normalfont\normalsize\bfseries}}
\makeatother



\begin{document}

\section{Anatomically and geometrically accurate representations of the
cortex are needed for realistic modeling of SD}

\lipsum[1-5]

\subsection{Anatomically and geometrically accurate representations of the
cortex are needed for realistic modeling of SD}

\lipsum[6]

\subsubsection{Anatomically and geometrically accurate representations of the
cortex are needed for realistic modeling of SD}

\lipsum[7]

\paragraph{Anatomically and geometrically accurate representations of the
cortex are needed for realistic modeling of SD}

\lipsum[8]

\subparagraph{Anatomically and geometrically accurate representations of the
cortex are needed for realistic modeling of SD}

\lipsum[9]

\end{document}

Please advice the how to get the above mentioned picture "CORRECT" output.

Please provide solution how to adjust the section number and section text in between space?

Best Answer

You can just locally disable hanging indentation

enter image description here

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {8.25pt}%
                                   {\let\hangindent\dimen@\normalfont\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {.1ex}%.0001ex
                                     {\let\hangindent\dimen@\normalfont\large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {.1ex}%11.5pt
                                     {\let\hangindent\dimen@\normalfont\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                {-3.5ex \@plus -1ex \@minus -.2ex}%3.25ex \@plus1ex \@minus.2ex
                                    {.1ex}%
                                    {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
                              {-3.5ex \@plus -1ex \@minus -.2ex}%3.25ex \@plus1ex \@minus .2ex
                                       {.1ex}%
                                      {\normalfont\normalsize\bfseries}}
\makeatother
Related Question