General ⇒ Chapters, headings, spellchecking, oh my...
Chapters, headings, spellchecking, oh my...
Chapters.
They leave a large amount of white space when they start, I know this is intentional but not required as part of the formatting of my document, and given the the cost of printing the document I'd like to use this white space. Not only that it is more a technical report and less a book, I have managed to remove the world "Chapter" by use of \renewcommand{\chaptername}{} however I'd like a chapter to show as
1. Introduction
As opposed to
1
Introduction
Headings
I'd like the header to display the current section, but not on pages that are the start of chapters, such as
3.2 Yes, another subsection__________
<body>
_______________________________________
<footnotes> Page Number
Spellchecker
My current editor has some basic spell checker functionality, though not great, are there any such checkers for windows (I could also use a Linux based one, but as most of my development tools for this project are windows based I'd rather not have to reboot or fire up vmware or similar)
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Chapters, headings, spellchecking, oh my...
welcome to the board!
Which document class do you use? report, book, oder something else?
Stefan
Re: Chapters, headings, spellchecking, oh my...
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Chapters, headings, spellchecking, oh my...
It is not very easy to alter the behaviour of chapters at the beginning.
I will give you a complete example, where I redefined \@makechapterhead. You could take the lines between \makeatletter ... \makeatother (including these commands) into your own document. And of course you may make more changes. The original \@makechapterhead you will find in report.cls.
For the headings you may use \pagestyle{headings} like in my example. When a chapter starts, the pagestyle will automatically be plain, without heading.
The package fancyhdr is very useful for making headings, if you want to do more than the standard allowes.
Here comes the example, with some text and pages:
Code: Select all
\documentclass[a4paper,10pt,twoside]{report}\usepackage[english]{babel}\usepackage{blindtext}\pagestyle{headings}\makeatletter\renewcommand*\@makechapterhead[1]{%{\parindent \z@ \raggedright \normalfont\huge\bfseries\ifnum \c@secnumdepth >\m@ne\thechapter\space\fi#1\par\nobreak\vskip 20\p@}}\makeatother\begin{document}\tableofcontents\chapter{One}\blindtext[2]\chapter{Two}\section{TwoOne}\blindtext[2]\newpage\section{TwoTwo}\blindtext[2]\newpage\section{TwoThree}\blindtext[2]\end{document}
Chapters, headings, spellchecking, oh my...
Code: Select all
\makeatletter\let\@makechapterheadOLD\@makechapterhead\renewcommand{\@makechapterhead}{\mbox{}\vspace*{-50pt}\@makechapterheadOLD}\let\@makeschapterheadOLD\@makeschapterhead\renewcommand{\@makeschapterhead}{\mbox{}\vspace*{-50pt}\@makeschapterheadOLD}\makeatother
Re: Chapters, headings, spellchecking, oh my...
B.A.
Re: Chapters, headings, spellchecking, oh my...
If I use that Stefan's code, how can I adjust the space between the chapter number and the text? I very new to LaTeX so I don't completely understand what the code actually does. Is the \space somehow related to the space I want to modify?
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Chapters, headings, spellchecking, oh my...
welcome to the forum!
\space ist just a whitespace, its original definition is:
Code: Select all
\def\space{ }
Stefan
-
- Posts: 6
- Joined: Sun Nov 07, 2010 5:08 am
Re: Chapters, headings, spellchecking, oh my...
I use your code to reduce the space before chapter. It works! But it did not show Chapter 1, instead it only show "1" followed by the text of chapter title.
How can I let it show "chapter 1 introduction" again or "A 1 introduction" instead of "1 introduction" ?
Thanks.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Chapters, headings, spellchecking, oh my...
which document class do you use? Perhaps post a minimal example showing the problem.
Stefan