Command : \noindent not working

3,626

The image you show is not generated by posted code, in article class \paragraph is an inline heading so produces

Para Blah blah

The word Para is not indented so it is hard to guess what effect you intended \noindent to have. Note that \paragraph is a section head and should only be used in the sequence \section, \subsection, \subsubsection, \paragraph. \noindent should rarely (arguably never) be used within the document and certainly never applied to a heading.

If you want to redefine \paragraph to be a display heading rather than inline, then

\documentclass{article}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {-3.25ex \@plus -1ex \@minus -.2ex}%
                                    {1sp}%
                                    {\normalfont\normalsize\bfseries}}

\makeatother
\begin{document}

\paragraph{Para}
Blah blah blah ...
\end{document}

but as noted above \paragraph should only follow \subsubsection

Share:
3,626

Related videos on Youtube

Atinesh
Author by

Atinesh

THINK ACT BECOME

Updated on March 12, 2020

Comments

  • Atinesh
    Atinesh over 3 years

    I'm want a simple paragraph in my document with no indentation. I'm using the command \noindent at the beginning of the paragraph, But its not working. Here's the code I'm using

    \documentclass{article}
    \begin{document}
    \paragraph{Para \\}
    \noindent
    Blah blah blah ...
    \end{document}
    

    enter image description here

    Can anybody tell me why its not working. I'm using 'Texworks'

    • touhami
      touhami over 8 years
      make sure you didnot redefine \paragraph
    • David Carlisle
      David Carlisle over 8 years
      \noindent is working (but does nothing there as para is not indented already). So you need to say what you wanted to happen. Is the image intended to show your required output?
    • Atinesh
      Atinesh over 8 years
      I've edited the code please see again
  • Atinesh
    Atinesh over 8 years
    I've edited the code please see again
  • David Carlisle
    David Carlisle over 8 years
    @Atinesh updated answer