Text FormattingHow to change chapter title alignment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Isenthia
Posts: 2
Joined: Tue Oct 29, 2013 9:53 pm

How to change chapter title alignment

Post by Isenthia »

Hi,

I'm working at the manuscript for a book, for which the publisher provided a style file. I use the book document class. I've sent sample pages to the lector and she asked me to change the format for chapter titles that run over two lines as follows.

It now looks like:

2 A rather long chapter title that is wrapped
to the next line

The lector wants it to look like:

2 A rather long chapter title that is
=1wrapped to the next line.

In other words, the beginning of the first word on the second line is supposed to be aligned to the beginning of the first word of the first line.

From what I gathered searching this on the internet, I need to change the definition for makechapterhead in book.cls (or maybe the publisher style file?). But what is it that I need to change to get the required output?

Any ideas would be very welcome. And if someone does have an idea: please be as explicit about what to do as you can, as, although I've been using LaTeX for a while now, I have pretty much no experience with redefining stuff myself.

Cheers

Recommended reading 2024:

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

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to change chapter title alignment

Post by Johannes_B »

Hi,

Code: Select all

\documentclass[a4paper]{book}
\begin{document}
\chapter{A very long chapter title going over two lines}
\section{A very long section title going over two lines but it needs to be longer longer longer}
\end{document}
This is the standard behaviour (click on open in writelatex to see the output). I guess in the style file your editor did provide, this is redefined, maybe using a package. Try to prepare a minimal working example. You can also attach files to your post.
I somehow feel, that if the stylefiles redefines the appearance of chapters, the publisher should provide correct stylefiles, maybe using options.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Isenthia
Posts: 2
Joined: Tue Oct 29, 2013 9:53 pm

How to change chapter title alignment

Post by Isenthia »

Hi Johannes_B,

thanks for your answer. I am aware of the standard behaviour, having written the whole thing using plain old book document class to start with. I'm also a bit angry as well about the publishing house as well that they would have preferred the manuscript in Word and that the style file they provided me with turns out to be so painful.

That said, (I feel a bit better now) here comes my MWE. I commented all packages that aren't necessary for the MWE, but left them in so you know what else I'm using in my master file. Also, this works when I run pdfLaTeX on it, but it "exists abnormally" in LaTeX mode. I'll attach the style files "publisher" as well as "nfssext", which the former requires.

Code: Select all

\documentclass[english]{book}
\usepackage[small]{publisher}
%\usepackage[paper=a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
\usepackage[T1]{fontenc}
%\usepackage{booktabs}
%\usepackage{stmaryrd}
%\usepackage{amssymb}
%\usepackage{amsmath}
%\usepackage{makeidx}            %for making an index
%\usepackage{mdwlist}            %for \resume{enumerate}
%\usepackage{natbib}             %for bibliography styles
%\usepackage{graphicx}
%\usepackage[nocenter]{qtree}
%\qtreecenterfalse
%\usepackage{latexsym}           %for funny maths symbols
%\usepackage{avm}               %for Pustejovsky-style feature structures
%\usepackage{gb4e+}              %for example & glosses
%\exewidth{(1000)}
%\usepackage[T1]{tipa}

\begin{document}

\chapter{A long chapter title that cannot reasonably be reduced and
  thus runs over two lines}

In this chapter, I will argue against the standard notions of bla bla bla

\end{document}
I somehow feel, that if the stylefiles redefines the appearance of chapters, the publisher should provide correct stylefiles, maybe using options.
I absolutely agree. However, this seems to be some sort of "beta-version". I had to mess around with it myself before I got a decent result with pdflatex that didn't end "abnormally". This really shouldn't be the case, especially since the reason had to do how the use of fonts was defined within that file. But that's another story.
Attachments
nfssext.sty
(3.29 KiB) Downloaded 427 times
publisher.sty
(35.03 KiB) Downloaded 441 times
Post Reply