I am writing a amsbook document in Latex. The \chapter{On Banach Spaces} command produces something like this:
CHAPTER 1
On Banach Spaces
I would like it to say
CHAPTER
On Banach Spaces
instead. (No trailing chapter number.)
Why do I want this? I like the layout of amsbook and for the very first chapter I want the leading text to say "INTRODUCTION" then in a next line the title of the introduction. After this introduction I want normal chapter numbering.
This somehow works when I use
\renewcommand{\chaptername}{Introduction}
before the introduction chapter, then
\setcounter{chapter}{0}
\renewcommand\chaptername{Chapter}
just before the second chapter.
Unfortunately this gives me a "INTRODUCTION 1", however I want "INTRODUCTION". So basically, I like to suppress the chapter number.
(Edited.)
I'm not sure I understand your problem 100%, but here are two things to try.
First, I don't know from amsbook, but the regular old book class defines three very-high-level sectioning commands, \frontmatter, \mainmatter, and \backmatter. If you put \frontmatter immediately after \begin{document}, and \mainmatter immediately before the \chapter command for the first chapter that should have a number, then that might well do what you want. However, it may have other effects that you don't want, like changing page breaks or taking things out of the table of contents. (I can't find any online reference for these commands, say sorry.)
A more low-level approach is to use secnumdepth to suppress section numbers. Try something like this:
\setcounter{secnumdepth}{-1}
\chapter{Introduction}
...
\setcounter{secnumdepth}{1} % or 2 for numbered sections, or whatever
\setcounter{chapter}{0}
\chapter{The first chapter}
...
Just type
\chapter*{Introduction}
Then, from the next chapter,
\chapter{The Title of The First Chapter}
Related
I just started using the article chapterstyle in Memoir.
I'm composing in LyX, with each section of the article in a child document.
When compiling from the main document, I want each section to be numbered as follows:
1. Introduction
2. Related Literature
2.1 Literature from Long Ago
2.2 Literature from Yesterday
... Etc.
n-1. Conclusion
n. References
To accomplish this the top-level section headings use \chapter. Numbering, formatting, etc. is perfect. Except: each \chapter is triggering a page eject, and I can't figure out how to fix this.
What's the easiest way to make each \chapter (section of the article) begin below the preceding one when there's space on the page?
memoir has a macro called \clearforchapter that normally ensures that chapters start at the correct page. You can disable it like this:
\documentclass{memoir}
\renewcommand{\clearforchapter}{}
\begin{document}
\chapter{test}
test
\chapter{test2}
test
\end{document}
In the documentation for the IEEEtran LaTeX class, it's mentioned that the two columns on the last page need to be manually adjusted in order to be balanced (have the same length).
I see that \newpage will allow me to break the first column so the rest of the content is on the second column. This allows for paragraph-level equalization, and looks good, but I'm having trouble with line-level equalization, that is, breaking the column by lines instead of by paragraphs.
When I insert \newpage in the middle of a paragraph (instead of between paragraphs), LaTeX effectively splits the paragraph in two. The second part goes to the top of the second column (as desired) and the first part remains in the first column. There are two issues I've found with this, and I've only solved one of them.
The first issue is that the partial paragraph on the top of the second column is treated by LaTeX as a new paragraph, so it's indented. I fixed this by adding \noindent after \newpage so that it's not indented.
The second issue is that for the partial paragraph in the first column, the paragraph is justified (as expected), but the last line is ragged (no justification). Is there a way to force justification of this last line? LaTeX has environments and commands to disable justification, but I can't find anything to fully justify a paragraph, including the last line.
Two possibilities:
Ending a line with \linebreak will force the line to be justified, no matter how empty it is.
To do what you are trying to do you could replace \newpage \noindent with \linebreak \newpage \noindent.
Note this will create a blank line before the end of the page, which may or may not be a problem. In certain cases it could create an empty page between your pages.
Another option would be \pagebreak. It tells LaTeX to start a new page when you get to the end of the current line. You don't have control of the exact word where the page break occurs.
What about making the last page (column) shorter using
\enlargethispage{-50mm}
and maybe forcing LaTeX to split after the appropriate line? Of course the amount of shortening should be guessed by trial and error, and re-guessed after changing the text. (Just an idea, may be impossible to implement in your case.)
(Posting for the googlers landing here)
The quickest solution is
\usepackage{pbalance}
(Package documentation at https://ctan.org/pkg/pbalance?lang=de)
In case that does not work, one can try the special command \IEEEtriggeratref{10}, which adds a column break before reference 10. Replace 10 by the actual number of the reference. See the documentation of IEEEtran, section "XIV. Last Page Column Equalization" for more details).
You can adjust the following lengths to make LaTeX fill the last line of a paragraph. Put this in your preamble:
\newcommand{\filllastline}[1]{
\setlength\leftskip{0pt}
\setlength\rightskip{0pt}
\setlength\parfillskip{0pt}
#1}
Then in your document do this:
\filllastline{The text for your partial para in 1st col goes here...}
(For future LaTeX questions you should probable post to https://tex.stackexchange.com/)
I'm writing a booklet for my debate club in LyX, and it is a collection of Prep Cases - each prep case is a chapter. Currently I have a "new page" after every chapter, but I want something more - I want to make sure chapters begin in odd numbered pages, so that when I print the whole booklet in duplex - each prep case will be a standalone, separable unit. Is that possible in LyX or plain LaTeX?
Edit: silly me. I meant to say sections and not chapters. Is this possible with sections?
I'm not sure how to do this in Lyx, but if it will let you slip in some raw LaTeX, put this in your preamble:
\let\originalsection=\section
\renewcommand\section{\par\cleardoublepage\originalsection}
Normally, this is done using the openright option on the document class. This causes \chapter to use \cleardoublepage internally, thus starting on an odd page.
You can also use \cleardoublepage manually instead but just using the option is more convenient.
I am using the Exam class (based on Article) and I got this to work in LyX 2.2 with the following:
Document>Document Settings>Page Layout>Two-sided document
Insert>Formatting>Clear Double Page whenever you want to force a part of your document to start on an odd-numbered page.
I have a thesis in which I want to group some chapters together, using the \part command.
What I would like is to have the following:
Chapter 1
Part I
Chapter 2
Chapter 3
Part II
Chapter 4
Chapter 5
Chapter 6
So the last chapter should again be on the same level as the parts. In the table of contents of the text you can't really detect it, because Parts are on the same level anyway.
The problem is that in the PDF, the chapter 6 is added under Part II.
Does anyone know of a way to change that?
The bookmark package can do this quite nicely, among other things. It also only uses a single pass to embed PDF bookmarks into the document.
\part{...}
\chapter{...}
\bookmarksetup{startatroot}
\chapter{...}
The fact that LaTeX does it wrong probably means that something is wrong with the structure of your document: \part is not meant to group chapters, but to devide the document in parts. The difference is that every chapter should be in a part.
Try 'introduction' or 'preliminaries' as a name for the part containing chapter 1.
It might be possible to work around, but you'd have to redefine command throughout the document. It might be worthwhile to use \chapter* for chapters not in a pat, step the chapter-counter manually, and manually call \addcontentsline with the right argument. However, this is IMHO bad use of LaTeX: for well-structured documents, the standard LaTeX commands should suffice.
In my LaTeX document I've got a table of contents that is automatically generated by collecting everything that is of the form \chapter.
However, I've got an acknowledgements chapter before the table of contents and I don't want it to be automatically labelled "Chapter 1" or captured in the table of contents. Should I be avoiding \chapter altogether and use \section instead? I want to keep the font/formatting that other chapters have though.
The usual way to handle that kind of thing is with the \frontmatter command. Put it after the \begin{document}, and then put \mainmatter right before the \chapter you want to correspond to chapter 1. This may only work in the book class. If you're using \chapter in a report, then \chapter* should also create a chapter that has no number and won't show up in the table of contents.
Indeed, as unknown (google) mentioned, using \frontmatter and \mainmatter is the best solution. This will also adjust your page numbering to lowercase roman numerals for the front matter. However, it works only on book and similar document classes.
In case you're using report, try \chapter*. This will create a chapter without a number that does not appear in the table of contents.
For articles \chapter* does not appear to work. Instead use \section*.