# Section Text Alignment

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

The below mentioned pictrue is my required output:

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?

You can just locally disable hanging indentation

\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

• @carlisle Your solution is good. I have one doubt?. How to adjust the Section Number and Section Text in between space. Kindly advice – Vetri Mar 7 '15 at 13:48
• @Vetri that is set to 1em by \def\@seccntformat#1{\csname the#1\endcsname\quad} so replace the \quad by whatever, but if you are doing much more than this I'd use a package which gives a more sensible interface to changing the layout as in the other answer. – David Carlisle Mar 7 '15 at 14:04
• @Carlisle I got the solution absolutely. I am happy about your solution – Vetri Mar 7 '15 at 14:27

The block style from titlesec does that. To kill indentation of the first paragraph after a section title, use the \titlespacing* command (note the star):

\documentclass[twocolumn]{article}

\usepackage{lipsum}

\setcounter{secnumdepth}{0}

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

\numbered

\usepackage{titlesec}

\titleformat{\section}[block]{\normalfont\large\bfseries}{\thesection}{0.333em}{}
\titlespacing*{\section}{0pt}{3.5ex}{8.25pt}%
%
\titleformat{\subsection}[block]{\normalfont\large\bfseries}{\thesubsection}{0.333em}{}
\titlespacing*{\subsection}{0pt}{3.25ex}{.1ex}%
%
\titleformat{\subsubsection}[block]{\normalfont\normalsize\bfseries}{\thesubsubsection}{0.333em}{}
\titlespacing*{\subsubsection}{0pt}{3.25ex}{1ex}%
%
\titleformat{\paragraph}[block]{\normalfont\normalsize\bfseries}{\theparagraph}{0.333em}{}
\titlespacing*{\paragraph}{0pt}{3.5ex}{1ex}%

\titleformat{\subparagraph}[block]{\normalfont\normalsize\bfseries}{\theparagraph}{0.333em}{}
\titlespacing*{\subparagraph}{0pt}{3.5ex}{1ex}%
%
\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}


• your logic is working perfectly – Vetri Mar 7 '15 at 14:28