12 votes

Ordinal numbers in chapter number

I suggest you employ the machinery of the fmtcount package to achieve your formatting goal for chapter numbers. How to "decorate" the chapter header further is a topic best left to another ...
Mico's user avatar
  • 496k
8 votes

Add circled letters in titles

I'd avoid code duplication: your commands can be defined in terms of a two-argument command, that supplies the needed TikZ instructions and can be made into something different when typesetting the ...
egreg's user avatar
  • 1.1m
8 votes
Accepted

How to start at Part 0 in LaTeX?

If you're using the article document class, part-level headers are numbered with uppercase-Roman numerals: I, II, III, etc. Because the ancient Romans didn't know about the number "0", there'...
Mico's user avatar
  • 496k
7 votes

What is this symbol in LaTeX? And where do I get it?

I used only PDF primitive operations to create the symbol. \pdfliteral primitive from pdftex is used. We need not TikZ. The symbol: \pdfliteral{q 1 0 0 .8 5 0 cm 0 0 m 20 10 40 10 50 0 c 60 -10 80 -...
wipet's user avatar
  • 72.2k
7 votes
Accepted

Add circled letters in titles

You need to be cautions when using macros inside section titles, because these titles will appear at several other places in the document, such as in PDF bookmarks or in the page headers or footers. ...
Jasper Habicht's user avatar
7 votes

Why does \renewcommand{ ... }{ ... } not work with \section (or \subsection)?

\section* is \section * the command looks for a * it is not part of the name, so you have programmed a non terminating loop \section -> \section* -> \section** ->... eventually you have ...
David Carlisle's user avatar
7 votes

`{` in the definition of a macro?

Strange as it may seem, there are times when TeX isn't the answer. Given an original document \documentclass{article} \begin{document} \section*{\huge CHAPTER 1.\\ Introduction} \addcontentsline{toc}...
David Carlisle's user avatar
6 votes

How to remove "0" from numbers of paragraphs when they are not in subsubsection

The code given below does what the OP wants. I can't help but remark that it's decidedly poor and sloppy typographic practice to skip subsubsection-level headers when also using paragraph-level ...
Mico's user avatar
  • 496k
4 votes
Accepted

Amsart: Section and subsection titles not formatted properly

The amsart class is not compatible with authblock titlesec Remove them and the related commands. The class typesets the keywords as a footnote to the first page. You might want to set them ...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Latex different appendix section label

I suggest you insert the instruction \renewcommand\thesection{F.\arabic{section}} immediately before the first \section directive following the \appendix directive. \documentclass[12pt]{report} \...
Mico's user avatar
  • 496k
4 votes
Accepted

Remove one empty page between subsection and subsubsection

This is a false problem. LaTeX will never break a page just after a section header and you have \subsection{FRP laminate} It has three main types of GFRP, CFRP, and AFRP. \subsubsection{Near Surface ...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Formatting of displayed section numbers

I think that what you want is to define a counter called, say, block, and "tie" the section counter (that's the counter that's stepped each time the \section macro is executed) to the block ...
Mico's user avatar
  • 496k
4 votes
Accepted

Centering headers

The ncc class has its own method. \documentclass[11pt]{ncc} \usepackage{lipsum} % for mock text \TitleBeforeAuthor \sectionstyle{center} \indentaftersection \begin{document} \title{Test} \author{...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Left align the title of sections and subsections

You need to allocate a fixed amount of space for the (sub)section counter typesetting. Here I chose 40pt; however, if your section or subsection numbering extend into double digits, you may need to ...
Steven B. Segletes's user avatar
4 votes
Accepted

Changing the first argument of l@chapter

The chapter number is printed in the \@chapter command, not in the \l@chapter command. So you need to patch both commands to do what you want without using one of the TOC packages: \documentclass{...
Alan Munn's user avatar
  • 215k
4 votes
Accepted

How can I use titlesec to put a tcolorbox around a section title?

You may want to use load the tcolorbox packge with the explicit option, which allows you to use #1 as placeholder for the section title in the defintion of the \section command. Also, I think the ...
Jasper Habicht's user avatar
4 votes

how to use `\texorpdfstring' correctly and properly

The command \texorpdfstring takes two arguments: what should be typeset in the PDF, and what should appear in the bookmark. In your code \texorpdfstring{$\mu=0$} is the first argument is $\mu=0$ and ...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Automatic Chapter or Section Title in Bold face and Small Caps

As already told in Will's answer to the question vou've linked, you should not use \sc, because this deprecated font command does also deactivate the previous \bfseries. Use \scshape instead: \...
cabohah's user avatar
  • 9,401
3 votes
Accepted

Change font in section headings only

The two packages fight each other in how to define \sfdefault. I suggest to first load sourcesanspro and make it \rmdefault. Then you can load montserrat. \documentclass[a4paper,12pt]{book} \...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Warnings from hyperref whenever using \part{} with amsbook

hyperref is making the outline/bookmark text for PDF, This has to be plain text so hyperref removes/simplifies any tex constructs. Some commands it "knows" Sometimes it is given text ...
David Carlisle's user avatar
3 votes
Accepted

How to count subsections and subsubsections without giving them a title

This looks like a list with the section number prefixed to the enumeration. Such adjustments to list parameters are provided by enumitem. Here's a mockup that matches your output: \documentclass{...
Werner's user avatar
  • 598k
3 votes
Accepted

How can I make long section titles wrap all the way to the margin?

titleformat from titlesec is usually the way to format sections (link to documentation). In your case, change the default shape from [hang] to [block]. Extra spacing can be adjusted by \titlespacing* ...
Celdor's user avatar
  • 8,818
3 votes

How can I make long section titles wrap all the way to the margin?

The KOMA-Script classes provide their own interface to configure headings. To not use hanging headings, just remove the \@hangfrom from the default definition of \sectionlinesformat (shown in the user ...
cabohah's user avatar
  • 9,401
3 votes

Numeration layout

The "outer" question is set as a blank \item[] within an "inner" list. The following achieves that, with a newly-defined question environment and \subquestion macro (for context): ...
Werner's user avatar
  • 598k
3 votes
Accepted

Cannot add to "after" hook of sectioning command

This is documented in the section 2. Restrictions and Operational details, and particularly the example of cmd/section/after is given: This boils down to how each command is implemented, and as the ...
Phelype Oleinik's user avatar
3 votes
Accepted

Page number missing specifically on second page and only that page

UPDATED In the file diku.sty use \renewcommand*{\maketitle}{%Define the content of the frontpage \newgeometry{margin=1.5cm}% here <<<<<<<<<< \begin{titlepage} ...
Simon Dispa's user avatar
  • 38.6k
3 votes
Accepted

Modular option for tikz lecture heading

I'd probably make use of the titlesec pacakge and do something like this: \documentclass{book} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usepackage[explicit]{titlesec} \def\chaptername{...
Jasper Habicht's user avatar
3 votes
Accepted

Section and subsection formatting

The academic-cv class defines its own sectioning commands, so you are right that these are what need to be changed. So the following additions need to be made to the class: First, we make some ...
Alan Munn's user avatar
  • 215k
3 votes
Accepted

Reduce whitespace between words in section headings

As it's a once-off hack, maybe just change the spacing, eg \section{\spaceskip2pt Here is my section title} or \section{Here\thinspace is\thinspace my\thinspace section\thinspace title} but don't ...
Peter Flynn's user avatar
  • 2,851
3 votes
Accepted

How do you make whitespace the afterskip of a runin subsubsection in KOMA script?

The key takes a length you can include stretch and shrink components so that the white space helps justify the line \documentclass{scrbook} % Specifying titles \RedeclareSectionCommand[runin=true,...
David Carlisle's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible