How can I writte the chapter number and chapter title in the same line, and if the title is too long, the second line begins from the begining of the line, not under the first word of the title. For example, in this code:
\documentclass[a4paper,12pt,openany]{memoir}
\usepackage{titlesec}
\usepackage{titletoc}
\begin{document}
\chapter{This is a regular test chapter title in the same line of the chapter number}
\end{document}
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
\documentclass[12pt,a4paper,openany,english]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{blindtext}
\makechapterstyle{custom}{%
\renewcommand*{\printchapternum}{\chapnumfont \thechapter\quad}
\renewcommand*{\afterchapternum}{}
}
\chapterstyle{custom}
\begin{document}
\chapter{This is a regular test chapter title in the same line of the chapter number}
\blindtext
\end{document}
More details can be found in the manual (Section 6.5.1 - Defining chapter styles, p. 81ff).
I'm a total LaTeX noob and I've been searching forever for how to do this. Is there a simple way of doing this without resorting to a completely different doctype? I'm trying to make the chapter format be like this:
# Chaptertitle
For example,
1 Introduction
as it is in the ToC. I've already removed the word "Chapter" by using \renewcommand{\chaptername}{}, but now I just need to get the number and title on the same line. Can anyone help spell out how to do this simply, ideally without using other packages (surely there must be something built in for such a simple formatting task)?
Thanks
Last edited by cgnieder on Thu Apr 11, 2013 7:20 pm, edited 1 time in total.
I suggest that you would open a new topic and explain your problem in detail. I doubt that the people, who discussed here 4 yours ago, 2009, read your follow-up question, and that many other readers might see this topic of 2009 again. Just to improve your chance to get a solution.
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