# Tag Info

6

There must be two \expandafter statements. The first to generate the command sequence and then for the \titleformat to expand in the internal setup (I've not looked into the package, however) \documentclass[11pt,oneside,a4paper]{article} \usepackage{titlesec} \newcommand{\sectionfamily}[2]{% \expandafter\titleformat\expandafter{\csname ...

4

Use expl3 (loaded by xparse): \documentclass[11pt,oneside,a4paper]{article} \usepackage{titlesec} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\sectionfamily}{mm} { \fennell_section_family:nn { #1 } { #2 } } \cs_new_protected:Npn \fennell_section_family:nn #1 #2 { \tl_clear:N \l_fennell_section_font_tl \tl_clear:N ...

4


3

It's easy with titlesec: \documentclass{article}% http://ctan.org/pkg/amsproc \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage{titlesec} \titleformat{\section}{\vbox{\rule{\linewidth}{0.8pt}}\bigskip\LARGE\bfseries}{\thesection}{1em}{} \begin{document} v = \sqrt{2gl(\cos\phi_0 - \cos \phi)} ...

3

You didn't give the documentclass you are using. So I will let loose my guess that it is book. Here the default space above is defined by \vspace*{50\p@}. This can be patched as in this code: \documentclass{book} \usepackage{blindtext,showframe} %% just for demo \usepackage{xpatch} \makeatletter ...

3

The \part macro from report.cls always has a \thispagestyle{plain} in its setup, so redefining the plain style with a header rule of thickness 0.1mm will show such one. \fancyhf{} does only clear the individual fields of the header and footers, but not the header or footer rules. To clear this, I added \renewcommand{\headrulewidth}{0pt} to the partpagestyle ...

3

The easiest way seems to be etoc by your fellow user [tag:jfbu] here, just using the \localtableofcontents where appropiate \documentclass{article} \usepackage{etoc} \usepackage{blindtext} \begin{document} \tableofcontents \clearpage \section{One} \localtableofcontents \subsection{First} \blindtext \clearpage \section{Two} \localtableofcontents ...

2

This uses a temporary counter to store the section counter value before the first \input is used. In addition, the \input command is changed to \refstepcounter a input counter, which then resets the section counter in turn. Edit Automated storing of the section counter value for first \input. Some drawback: Each time if \input is used the section counter ...

2

Define an auxiliary counter and use it for temporary storage of the section number. Then use \inputreset{file} for inputting a file where you want to reset the equation number. However, you'll have big problems as soon as you try loading hyperref. \newcounter{storedsection} \newcommand{\inputreset}[1]{% \setcounter{storedsection}{\value{section}}% ...

2

A quick trial, but I have to think about the numbering \documentclass{book} \usepackage{etoolbox} \let\latexchapter\chapter \let\latexsection\section \newcommand{\OneLevelDeeper}{% \let\chapter\section \let\section\subsection } \begin{document} \tableofcontents \chapter{First} \section{Section} \subsection{Subsection} \OneLevelDeeper ...

2

without evidence to the contrary, \hip appears to be a "fragile" command. adding \protect before a fragile command in a "moving argument" (the argument to a command like \paragraph that can potentially also be used somewhere else, such as in the toc) will avoid the problem. so here, \protect\hip. more information on this situation can be found with the ...

2

All LaTeX counters automatically define a counter format routine, named \the..., e.g. if the counter is named foo, than there is \thefoo. This defaults to \arabic{foo}, i.e. arabic numbers, unless a driver counter was given too. \renewcommand{\thesubsection}{\arabic{section}\roman{subsection}} will use the arabic format of section and the roman format ...

2

Temporarily change \chapter into \section: \documentclass{book} \usepackage{algorithm} \begin{document} \chapter{A chapter} \begingroup \renewcommand{\listalgorithmname}{Algorithmenverzeichnis} \let\chapter\section \listofalgorithms \endgroup \begin{algorithm} \caption{An algorithm} \end{algorithm} \end{document} The grouping above limits the ...

1

After spending half a day digging through the sources, I think I may have discovered the cause of this problem. All LaTeX \section commands contain the macro \refstepcounter, which is responsible for updating section counters. It is redefined by cleveref to store additional information about the current section in \cref@currentlabel. This information is ...

1

You probably don't want the rule before the first section, nor when a section starts at the top of a page. The following code accomplishes this. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{titlesec} \usepackage{lipsum} \titleformat{\section} {\sectionrule\Large\bfseries} {\thesection} {1em} {} % this ...

1