[texhax] newb question - line after section heading

Steve Schwartz s.schwartz at imperial.ac.uk
Thu Feb 10 17:52:14 CET 2011


Joe,


On Thu, 2011-02-10 at 07:58 +0000, Joe P King wrote:
> My code is, I am using the packages that a friend recommended but
> there might be a conflict, I am using my abstract as testing page, I
> centered the first line so I can see the spacing better:

My strong advice to someone who describes their question as from a
"newb" would be to start simple and build up rather than start with a
long list of packages in the preamble. There are at least 3
\usepackage{titlesec} calls in your preamble. And with so many packages
it's difficult to easily test which might be conflicting.

Try the following code, which seems to look like what you want, and then
ADD other packages one by one as (and IF) you need them. Check the
documentation either within your own latex installation or online via
the TeX FAQ pages:
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes

HTH
Steve

PS: latex isn't adding a "line" after your section head, it is skipping
a prescribed amount of space. Also, for testing purposes it would be
better to start with some ordinary text, not something in a
\begin{center}\end{center} environment just to be sure it wasn't that
environment that was introducing the extra space.

\documentclass[12pt,letterpaper]{article}
\usepackage{titlesec}
\titlespacing{\section}{0em}{*0}{*0}

\begin{document}

\section{Abstract Abstract Abstract Abstract}

\begin{center}

stuff

\end{center}

stuff

\newpage

\end{document}


-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz        Phone: +44-(0)20-7594-7660
Head, Space & Atmospheric Physics  Fax:   +44-(0)20-7594-7772
The Blackett Laboratory            E-mail: s.schwartz at imperial.ac.uk
Imperial College London            Office: Huxley 6M67A 
London SW7 2AZ, U.K.               Web: www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list