Thanks to all who have provided relevant links w/information, but after all that reading, I'm still not sure what I need to change in the code to get an elegant hanging section with as little code manipulation as possible.
Have a look at my Makefile code (set up to run sixteen units of a course filled with numerous chemical structures):
Code: Select all
\documentclass{book}
\usepackage{fancyhdr}
\usepackage[asymmetric, total={336pt,624pt}, top=96pt, left=208pt, reversemp]{geometry}
\usepackage[fleqn]{amsmath}
\usepackage{chemarrow}
\usepackage{amssymb,amsfonts,wrapfig,amscd,times,curves,amsthm}
\usepackage{enumerate}
\usepackage{mdwlist}
\usepackage{sectsty}
\usepackage{fancyvrb}
\usepackage{paralist}
\usepackage{picinpar}
\usepackage{graphicx}
\usepackage{array}
\usepackage[hang,bottom]{footmisc}
\usepackage{dcolumn}
\usepackage{titlesec}
\usepackage{varioref}
\usepackage{array}
\usepackage{makeidx}
\usepackage[hang,bf,nooneline,justification=raggedright]{caption}
\usepackage{polynom}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\usepackage{xymtexps,chmst-ps,lewis}
%--------------------------------------------------------------------------------
\pagestyle{fancy} \fancyhf{}
\renewcommand{\footrulewidth}{0.25pt}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[LE,RO]{\footnotesize \thepage}
\fancyfoot[LO]{\footnotesize{\itshape Organic Chemistry I}}
\fancyfoot[RE]{\footnotesize Chemistry $350$ / \textbf{Study Guide}}
\fancyfootoffset[LE,LO]{120pt} \fancypagestyle{plain}
\setlength{\marginparwidth}{6em}
\makeatletter
\renewcommand\footnoterule{
\vspace{1.5em} \kern-3\p@\hrule\@width.4\columnwidth \kern6\p@}
\makeatother
\makeatletter
\newlength{\myFootnoteWidth}
\newlength{\myFootnoteLabel}
\setlength{\myFootnoteLabel}{0.4em}
\renewcommand{\@makefntext}[1]{
\setlength{\myFootnoteWidth}{\columnwidth}
\addtolength{\myFootnoteWidth}{-\myFootnoteLabel}
\noindent
\makebox[\myFootnoteLabel][r]{\@makefnmark\ }
\parbox[t]{\myFootnoteWidth}{#1}
} \makeatother
\interfootnotelinepenalty=10000
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty=10000
\vfuzz
\hfuzz
\raggedbottom
\renewcommand{\arraystretch}{1.5}
\newcommand{\Tiny}{\fontsize{4pt}{4pt}}
\renewcommand{\textbullet}{\small{$\bullet$}}
\newcolumntype{d}{D{.}{.}{-1}}
\clubpenalty=10000 \widowpenalty=10000
\raggedright
\parindent=0pt
\setlength{\parskip}{2ex} \footskip=24pt \hoffset=0pt
\paperwidth=597pt
\renewcommand\chaptertitlename{Unit}
\setcounter{secnumdepth}{0} \frenchspacing
\newcommand{\degree}{\ensuremath{^\circ}}
\titleformat{\chapter}[display]
{\normalfont\filright\bf}
{\vspace{-7pc}
\huge{\chaptertitlename} \thechapter}
{1pc}
{\vspace{-2pc}
\LARGE\rm}
%------------------------------------------------------------------------------
\vfuzz2pt % Don't report over-full v-boxes if over-edge is small
\hfuzz2pt % Don't report over-full h-boxes if over-edge is small
% THEOREMS -------------------------------------------------------
\renewcommand{\thefigure}{\thechapter.\arabic{figure}}
% typesets single, double, or triple bond
%(e.g., C\bond2{O} gives C=O
%
\def\bond#1{\relax
\hbox \bgroup
\kern 0.1em
\setbox0=\hbox{X}%
\vbox to \ht0 \bgroup
\vss
\ifcase#1
\or
\hrule width 1.4em depth 0pt height 0.03em
\or
\hrule width 1.4em depth 0pt height 0.03em
\vskip 0.2em%changed jms89 from 0.1
\hrule width 1.4em depth 0pt height 0.03em
\or
\hrule width 1.4em depth 0pt height 0.03em
\vskip 0.2em%changed jms89 from 0.1
\hrule width 1.4em depth 0pt height 0.03em
\vskip 0.2em%changed jms89 from 0.1
\hrule width 1.4em depth 0pt height 0.03em
\fi
\vss
\egroup
\kern 0.1em
\egroup
}%
\makeindex
\begin{document}
%\include{350intro}
%\include{350unit01}
%\include{350unit02}
%\include{350unit03}
%\include{350unit04}
%\include{350unit05}
%\include{350unit06}
%\include{350unit07}
%\include{350unit08}
%\include{350unit09}
%\include{350unit10}
%\include{350unit11}
%\include{350unit12}
%\include{350unit13}
%\include{350unit14}
%\include{350unit15}
%\include{350unit16}
\printindex
\end{document}
This is the code I'm using now to get the chapter title:
Code: Select all
\chapter{Structure and Bonding}
\vspace{-3.5pc}
\hspace{-120pt}\rule{456pt}{0.25pt}
\vspace{0.25pc}
This is the code I'm using now in my document to get a hanging section:
Code: Select all
\section{\hspace{-3em}1.12{\hspace{1em}}\rm{Drawing Chemical Structures}}
\rule{336pt}{0.25pt}
The trouble with my section code is that when the amount of section digits change, e.g., 1.1, 1.11, 10.12, etc. ..., I need to readjust the \hspace to align the titles with the rule, esp. for titles running on two lines or more. Also, I am manually typing in the section numbers.
Please see the sample PDFs for the \chapter and \section styles.
Note that I am also using the XyMTeX postscript package to create chemical structures throughout.
I would appreciate any help I can get at this point.
Thanks,
audreyk