9
votes
2answers
92 views

What does \secdef do?

The definition of the chapter command in KOMA-class scrbook is: \newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi \thispagestyle{\chapterpagestyle}% \global\@topnum\z@ ...
3
votes
2answers
54 views

Section command with default spaces between title and rule

Ho can I make a section command that have the same spaces between the \titlerule and the title of the original \section command? The overall look must be equal to the original \section command. So, Is ...
2
votes
2answers
52 views

Renewdefine section with additional argument

My goal is to redefine the command \section with a new argument for labeling: \section[Title in TOC]{Title}{label} \documentclass{article} \let\oldsection\section ...
1
vote
1answer
57 views

Use headings in letters / vertical space

I need to use headings in a letter, more precisely in documentclass dinbrief. Knowing that LaTeX does not support section or subsection commands in this document class I use the following workaround: ...
5
votes
1answer
215 views

force section and subsection to capital letters

hi Im trying to renew the section cmd to make all sections in capitals. i have tried stuff like \newcommand{\tmpsection}[1]{} \let\tmpsection=\section ...
7
votes
1answer
125 views

Using structural commands in \newcommand - structure messed up?

Is it right that usage of structural commands like \chapter, \section, \subsection and the like inside of \newcommand screws up the document's structure? I've got a \section*{...} inside a \newcommand ...
3
votes
2answers
153 views

ignoring chapter easily

When working on a book I'd like to "ignore"(not compile) all chapters but the current one. I know there are methods to use like include and such BUT I do not want to use external files or some complex ...
5
votes
1answer
70 views

Problem setting lengths in an environment (spilling outside of the environment)

I am having with spacing between paragraphs in my document, and I think I have been able to trace back to a custom environment I have defined. \makeatletter \def\remarkname{Remark} ...
1
vote
1answer
130 views

How to modify the typesetting of nomencl header?

The nomencl package typesets the header of the nomenclature list as a \section* in the article document class. How can I change it to \subsection*?
2
votes
1answer
229 views

chapter headings

I'm using document class report and I have decided for chapter headings to use one of the predefined style of Vincent Zoonekynd's with some modification. I would prefer to have \chapter and \chapter* ...
9
votes
1answer
213 views

Macros for hiding empty sections do not work properly

In an attempt to make it possible to outline much of my document by adding new parts to it, but without making parts that I have not written anything on show up in the compiled document, I have ...
15
votes
1answer
391 views

Macro that knows it is at the end of a section?

In Is it a bad idea to use \begin{section} ... \end{section} in LaTeX?, Jan Hlavacek says: Of course it is typically possible to recognize an end of a section, but there is actually a number of ...
4
votes
1answer
286 views

textbf+UpperCase title

I would like to make a section title UpperCase+textbf, however, while trying to define it like this \makeatletter \renewcommand{\section}{ \@startsection {section}{1}{0mm} ...
3
votes
2answers
603 views

Error with \newcommand and \section

I'm trying to typeset an article. In the preamble, I defined these two things: \newcommand{\leftexp}[2]{{\vphantom{#2}}^{#1}{#2}} \newcommand{\hr}{\leftexp{*}{\mathbb{R}}} However, when I try to ...
3
votes
1answer
220 views

Inserting a \bigskip between section and subsection using a macro?

I'm trying to conform to the IoP guidelines, which from the IoP latex files they provide do not seem to follow the IoP guidelines. Several colleagues of mine have altered the files so they do fit the ...
9
votes
1answer
280 views

Hiding section titles when the section is empty

I have created a macro like this: \newcommand{\showsection}[2]{ \ifstrequal{#2}{}{}{\section{#1} #2} } It should be used like this in the document: \showsection{Books}{ Do you know any ...
11
votes
1answer
2k views

How do you insert an inline verbatim?

I'm trying to add an inline verbatim into a \paragraph? Was wondering how do you do that?
1
vote
4answers
113 views

Add a possibility for zero optional inputs to own command

Some very nice people here helped me write the code snippet below. And the code works great it prints out the correct subtext, and have a optional argument by typing * ...
4
votes
1answer
378 views

Current section title macro using titlesec

I have a macro that contains the title for the current section, however when using the titlesec package, it no longer works for \section and \subsection. I know titlesec redefines the functions I'm ...
3
votes
2answers
217 views

Sections with optional counting arguments

I am back for more... =) I am actually trying to fix my own problems, and i feel i learn so much here. Thank you so much for helpin someone as clueless as me ^^ I am attempting to make a text, with a ...
7
votes
3answers
204 views

Own Section command working numbered and unnumbered

I use the following command to have section headings with subtitles \newcommand{\Section}[2]{\section[#1]{#1\\\small »#2«}} But now I only can have numbered sections because the * doesn't work for ...
1
vote
1answer
403 views

Modify chapter command (and KOMA-script addchap)

Is there something like etoolbox's \appto, that also works for \chapter and \addchap? edit: I intend to use it to re-enable page numbering (which may or may not be disabled using ...
2
votes
1answer
361 views

Macro after heading shall not allow page break.

In a previous question I needed a solution for the following problem: I had defined a command for inserting special custom notes in my document with the fixme package and if those notes followed a ...
1
vote
1answer
259 views

renew section command with tabular sections

I want to renew the section command so each section will follow by a fully two columns tabular. it seems that it should be like: \renewcommand{\section}[1] { \hfill\newline {#1}:\newline ...
8
votes
2answers
571 views

“TeX capacity exceeded” because of a couple of raiseboxes in a \section?

In a package, I have the following command defined: \newcommand\fkm{ \ensuremath{\mathrm{ \raisebox{-0.1ex}{\rotatebox{22}{f}}\! \raisebox{0.2ex}{\rotatebox{-15} {k}}\! ...
7
votes
3answers
346 views

defining commands of commands

if you want to include an image in your chapter title, what follows may be an option: \newcommand{\thechapterimage}{} \newcommand{\chapterimage}[1]{\renewcommand{\thechapterimage}{#1}} ...