GeneralAn author and a title on chapter page

LaTeX specific issues not fitting into one of the other forums of this category.
krz
Posts: 63
Joined: Thu Jul 22, 2010 5:03 pm

An author and a title on chapter page

Post by krz »

Hi!
I need to prepare to print the first book in my life. I've chosen LaTeX and need some help. It will be conference proceedings and I don't know how to change default \chapter command. I need to write an author's name, a name of city and a title on every chapter page. When use \chapter I get only the number of chapter and the title (as you know, of course). I tried to use fncychap, but it gave only different style. I found an information about substr and titlesec, but I really don't know how to use it (I'm still really new in LaTeX).
Thanks for any help.
Krz
Last edited by krz on Tue Dec 28, 2010 8:59 am, edited 1 time in total.

Recommended reading 2024:

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

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

Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

An author and a title on chapter page

Post by Montag »

I can't find the beginner's section on here right now, but I suggest you read "Chapter 1 Things You Need To Know" from the lshort-guide! :) (I'm referring to the English version.)

It'll help you a lot for future issues with LaTeX.

Concerning the customization of the first page of a chapter, you could use

Code: Select all

\titleformat{...}
from the titlesec-package.
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

An author and a title on chapter page

Post by localghost »

Montag wrote:I can't find the beginner's section on here right now, […]
Right on top of every forum among the »Announcements«.


Thorsten
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

Re: An author and a title on chapter page

Post by Montag »

Well, not the main page where I looked and I entered this thread by clicking on "View new posts". Yes, I could have looked into a forum.
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
krz
Posts: 63
Joined: Thu Jul 22, 2010 5:03 pm

Re: An author and a title on chapter page

Post by krz »

Montag, thanks for answer. I started to study LaTeX from lshort. It's good instruction and I still study it.
I was sure that titlesec didn't reslove my problems, but maybe I was wrong. I'm studying it today and let you know if it works (or not).
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

An author and a title on chapter page

Post by localghost »

krz wrote:[…] I need to prepare to print the first book in my life. I've chosen LaTeX and need some help. It will be conference proceedings and I don't know how to change default \chapter command. I need to write an author's name, a name of city and a title on every chapter page. […]
The confproc package might be your friend.


Thorsten
krz
Posts: 63
Joined: Thu Jul 22, 2010 5:03 pm

Re: An author and a title on chapter page

Post by krz »

Thanks, Thorsten,
I didn't have time to study titlesec. So, I've just read the short description and now I'm going to start from confproc. It looks really nice.
krz
krz
Posts: 63
Joined: Thu Jul 22, 2010 5:03 pm

An author and a title on chapter page

Post by krz »

Hi,
Unfortunately I still can't resolve my problem. Telling the truth I gave up with confproc manual. My knowledge about LaTeX and generally programming is not enough to understand all this command. So, I decided to use \titlesec and \substr by useing this

Code: Select all

\titleformat{\chapter}[hang]{}{%
   \Huge \thechapter.
}{1cm}{%
   \LARGE \scshape \BeforeSubString{. }{#1}\\
   {\Large \itshape ---\BehindSubString{. }{#1}---}%
}
but I still don't know how to add another line (for city name). I tried all \substr options but it still doesn't work.
Another problem appeared. When use \chapter the header dissapears (and it's ok), but the page number appears in the center of footer. I used \thispagestyle{clear} and \clearpage, but it doesn't work.
Thanks for any help.
krz

Update.
I've just resolved problem with pagenumber. It was the problem in \fancyhdr. Unfortunately I still don't know how to put another line in the example above.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

An author and a title on chapter page

Post by frabjous »

You should be able to create newlines inside a \titleformat command using \\ -- but I don't really understand what you're doing with substr, nor how "#1" can be legitimate there. If the hint about \\ isn't enough, could you provide a self-contained minimal working example showing exactly what's going on there?
krz
Posts: 63
Joined: Thu Jul 22, 2010 5:03 pm

Re: An author and a title on chapter page

Post by krz »

frabjous, I don't know what I really do. I just copy what I find in internet just like a monkey. ;)
I'm not good at programming. LaTeX is my first programming environment and it is why I still can't understand a lot of things.
Yes, I've just found I can use \newline inside {title} and it works. The method that I showed you above is good, because I can use different font size to the title and to the author. How can I change the size if I use \newline? How to make different size behind and after \newline?
Post Reply