Page Layouttitlesec - problem with aligning paragraphs headings

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
MCForgi
Posts: 1
Joined: Fri Aug 20, 2010 11:01 pm

titlesec - problem with aligning paragraphs headings

Post by MCForgi »

Hi everybody,

when I use the titlesec package to for leftmargin paragraph headings,
this headings will align perfectly with normal text, but they won't
align with an equation- or an itemize-environment in the first line.
How do I make them align?

See this pdf for a visualisation of the problem:
http://www.scribd.com/doc/36184235/Titl ... eft-Margin

Code:
\documentclass[]{article}

\usepackage{geometry}
\geometry{a4paper,left=9cm,right=3cm, top=2cm, bottom=3cm}

\usepackage{titlesec}
\titleformat{\paragraph}[leftmargin]{\normalfont\vspace{14pt}\sffamily
\filleft}{\theparagraph}{0em}{}[]
\titlespacing{\paragraph}{15pc}{-0.5pc}{1pc}

\begin{document}
\paragraph{Was versteht man unter einer Draisine bzw. einer
Laufmaschine?}
Die Draisine oder Laufmaschine (so auch der vom Erfinder verwendete
Name) ist ein einspuriges, von Menschenkraft betriebenes Fahrzeug ohne
Pedale, das als Urform des heutigen Fahrrads gilt.
\paragraph{Wie viel ist dreizehn mal acht?}
\begin{equation}
7\times8=8+8+8+8+8+8+8+8+8+8+8+8+8=56
\end{equation}

\paragraph{Aus welchen Zutaten besteht Schokolade?}
\begin{itemize}
\item Kakao
\item Milch
\item Zucker
\end{itemize}

\end{document}

Thanks for any ideas,
Mcforgi
Attachments
titlesec_paragraph_leftmargin.PDF
(42.96 KiB) Downloaded 197 times

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: 10324
Joined: Mon Mar 10, 2008 9:44 pm

titlesec - problem with aligning paragraphs headings

Post by Stefan Kottwitz »

For your information this topic has been posted to at least three forums at the same time.

Other forums: Just to inform you if you don't wishto waste time in the case that solutions would appear somewhere else.

Stefan
LaTeX.org admin
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

titlesec - problem with aligning paragraphs headings

Post by gmedina »

1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: titlesec - problem with aligning paragraphs headings

Post by Stefan Kottwitz »

Thanks gmedina,

I would have helped (probably easier than to talk about crossposts), but I feel a bit fooled being asked to solve a problem without knowing that other places are already on it as well.

Stefan
LaTeX.org admin
Post Reply