Generalparagraph and subparagraph alignment and indentation

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
d82k
Posts: 7
Joined: Tue Mar 25, 2008 1:33 pm

paragraph and subparagraph alignment and indentation

Post by d82k »

Hi!

I'm writing a document that has a lot of section subsections... paragraph and subparagraph...

here is what I have:

Code: Select all

2.3 Title section
my text my text my text my text 

2.3.1 Title subsection
my text my text my text my text 

2.3.1.1 Title subsubsection
my text my text my text my text 

2.3.1.1.1 Title paragraph\\
     my text my text my text my text 

       2.3.1.1.1.1 Title subparagraph\\
     my text my text my text my text 

How do I "no indent" the my text 2.3.1.1.1 paragraph? (i have tried with \noindent but not working).

how do I align the subparagraph title (2.3.1.1.1.1) with the others, and remove the my text indent?


Thankyou

dk

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

paragraph and subparagraph alignment and indentation

Post by Stefan Kottwitz »

Hi dk,

which documentclass do you use? Can you provida a minimal working example?
You could use renewcommand to change the definition of \subparagraph that comes with your documentclass.

Stefan
d82k
Posts: 7
Joined: Tue Mar 25, 2008 1:33 pm

paragraph and subparagraph alignment and indentation

Post by d82k »

Thankyou for your reply...

I post you the smallest example I could do... here you can see my problem better:

Code: Select all

\documentclass[11pt,a4paper,oneside,openright]{report}

\usepackage{fancyhdr}
\usepackage[scriptsize]{caption2}

\setlength{\paperwidth}{16cm}
\setlength{\paperheight}{24cm}
\setlength{\oddsidemargin} {2. cm}
\setlength{\evensidemargin} {2. cm}
\addtolength{\oddsidemargin} {-0.4 cm}
\addtolength{\evensidemargin} {-0.4 cm}
\linespread{1.3}

\renewcommand{\captionfont}{\normalfont \sffamily \itshape \small}

\pagestyle{empty}

\sloppy
\setcounter{secnumdepth}{6}

\begin{document}

\pagestyle{fancy}
\fancyfoot{}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\fancyhead[LE,RO]{\bfseries\thepage}

\fancyhead[RE]{\bfseries\leftmark}
\fancyhead[LO]{\bfseries\rightmark}
\renewcommand{\headrulewidth}{0.3pt}

\chapter{Title}
\thispagestyle{empty}

\section{Section}
this is may text this is may text this is may text this is may text

this is may text this is may text this is may text this is may text

\subsection{Sub Section}
this is may text this is may text this is may text this is may text

this is may text this is may text this is may text this is may text

\subsubsection{Sub Sub Section}
this is may text this is may text this is may text this is may text

this is may text this is may text this is may text this is may text

\paragraph{Paragraph\\}
NEED TO REMOVE THIS INDENT this is may text this is may text this is may text this is may text

this is may text this is may text this is may text this is may text

\subparagraph{Sub Paragraph (NO INDENT)\\}
NEED TO ALIGN THIS this is may text this is may text this is may text this is may text

this is may text this is may text this is may text this is may text

\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

paragraph and subparagraph alignment and indentation

Post by Stefan Kottwitz »

Hi,

you should remove those linebreaks inside the (sub)paragraph titles.
Try this redefinition in your preamble:

Code: Select all

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {0.0001pt \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {0.0001pt \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\makeatother
You may change the lengths inside these redefinitions.
Btw. the package caption2 is old - you should use caption instead.

Stefan
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

paragraph and subparagraph alignment and indentation

Post by gmedina »

Just to complement the answer of Stefan_K, to change the page layout you can use the geometry package, and you can use the setspace package to modify the inter-line spacing.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
d82k
Posts: 7
Joined: Tue Mar 25, 2008 1:33 pm

Re: paragraph and subparagraph alignment and indentation

Post by d82k »

Thankyou both!!!

This thing was driving me crazy!!!
Post Reply