GeneralNeed Help to write elegant project in latex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Hoda
Posts: 3
Joined: Tue Nov 11, 2008 11:29 pm

Need Help to write elegant project in latex

Post by Hoda »

Hi ,
I am new in Latex,try to write my project.
I am using documentclass {report}

After writing this code
\chapter{\textsf{Introduction}}
\section{\textsf{Overview}}


I will see the following presentation in pdf data

Chapter 1
Introduction
1.1 Overview


Does anyone has an idea how to omit the text "Chapter1"?

I mean I want to see

Introduction
1.1 Overview


rather than

Chapter 1
Introduction
1.1 Overview


it seems to be easy but I have no idea...

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Need Help to write elegant project in latex

Post by phi »

Hello,

there are several possibilities. First of all, you could redefine the \chapter command yourself. This gives the greatest possible flexibilitiy, but is tedious and hard to get right. Second, there are specialized packages like titlesec/titletoc that allow for the definition of individual heading formats. Third, there exist document class bundles that replace the standard classes entirely, like the KOMA-Script classes. I would suggest that you try it with the KOMA-Script bundle (by replacing "\documentclass{report}" with "\documentclass{scrreprt}"). This prints, among other things, all headings in a sans-serif font and removes the "chapter" prefix. Furthermore, a lot of styling details can be easily changed.
You should try to avoid things like "\section{\textsf{Overview}}". It is better to change things like heading fonts globally in your document preamble to separate the content and structure of your document from the presentation. So, if you want a section called Overwiew, just write "\section{Overview}" and let LaTeX take care of the presentational details. Then you can control the format of section or chapter headings with one single command. (Actually, if you use KOMA-Script, it uses a sans-serif font by default, so perhaps you don't have to change anything.)
KOMA-Script should be available in your distribution and comes with an extensive documentation (scrguien.pdf) that explains all features.
If you just want to remove the number from one single chapter, then you can use the starred version: "\chapter*{Introduction}". But this doesn't work correctly if your chapter contains sections (the sections will be numbered in a wrong way). To get your exact result, you would have to adjust the chapter counter manually (\refstepcounter{chapter}). But this is probably confusing for the reader, since he expects something with number 1 if there is something with number 1.1.
Still another possibility could be the redefinition of \thechapter to hide chapter numbers globally: \renewcommand*\thechapter{}\renewcommand*\thesection{\arabic{chapter}.\arabic{section}}
This also works, but gives the same confusing result as the last one. So my suggestion is to use the scrreprt class and keep its default settings, since they are very reasonable for many applications.
Hoda
Posts: 3
Joined: Tue Nov 11, 2008 11:29 pm

Re: Need Help to write elegant project in latex

Post by Hoda »

Hi phi,
thanks for ur help and advise.
I try documentclass{scrreprt} as u recommended,the "chapter" prefix is removed but as u mentioned a lot of styling details changed which reduce my page up to 10 ! :shock: !! It is not desirable... :lol:
Do u have any suggestion to avoid such changes?The font sans-serif for all headings is nice but the distance should be also controllable is there any command.
by the way I did't get the feature of KOMA-Script!!!

I appritiate the time u took to write me in detail...
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Need Help to write elegant project in latex

Post by phi »

The KOMA classes use a different method for calculating the page margins. You can increase the margins by lowering the DIV value, for example like this:

Code: Select all

\documentclass[DIV8]{scrreprt}
(Look into the documentation for a comprehensive explanation how the margins are calculated)

Which other distances do you want to control?
Hoda
Posts: 3
Joined: Tue Nov 11, 2008 11:29 pm

Re: Need Help to write elegant project in latex

Post by Hoda »

Hi PHI
Again thanks it work and now i am happy...
nice day ...
Post Reply