# Tag Info

4

The code snippet in \@sect (see the LaTeX format file latex.ltx) #6{% \@hangfrom{\hskip #3\relax\@svsec}% \interlinepenalty \@M #8\@@par}% is basically responsible for typesetting the section number and section title. #6 is actually a command from \@startsection and is related to font settings. \@svsec will do \the... effectively, i.e. ...

0

There are two counters determining the look of the ToC and if the section levels are numbered in the running text tocdepth decides which depth of sectioning appears in the ToC, the larger the number the deeper the sections do appear in the ToC: \setcounter{tocdepth}{-1} does allow only part, the numbers from 1 to 6 are used for chapter, section, ...

2

\newtheorem{prop}{Proposition} in your preamble, then \begin{prop} Blah blah \end{prop} in the body of the document.

1

Do not use \include but \input \documentclass{beamer} \author[N. Surname]{Name Surname} \begin{filecontents}{dummyslide} \subsection{dummy1} \frame{Dummyslide} \end{filecontents} \begin{document} \frame{\titlepage} \begin{frame}{Outline} \tableofcontents \end{frame} \section{sec1} \input{dummyslide} \end{document}

0

One possible workaround is to insert the \section{} command in the included file: \documentclass{beamer} \author[N. Surname]{Name Surname} \begin{filecontents}{dummyslide} \section{sec1} \subsection{dummy1} \frame{Dummyslide} \end{filecontents} \begin{document} \frame{\titlepage} \begin{frame}{Outline} \tableofcontents \end{frame} ...

2

You can modify the \@makecol macro in the output routine so it reboxes the page to its natural height rather than forcing it to be text height, then set \pdfpageheight to the height of that box (plus some extra for the 1in offset TeX uses, and the page margins). \documentclass{article} % make all pages long \usepackage[paperheight=26in,top=20pt]{geometry} ...

1

There is an KOMA-Script option numbers. Default is numbers=auto. That means there will be no period at the end of the numbers if only arabic numbers are used. But if there are roman numbers or letters in the numbering scheme there will be a dot at the end of every number. If you decide there should be no period at the end of the numbers use ...

0

Here a simple solution for biblatex. Then you can omit the heading and just add a sections as you like. \section{References} \printbibliography[heading=none]

-1

I had the same problem on a very large document, and based on Jörg suggestion, I just removed the call to hyperref package (and \hypersetup ) in the difference tex file and it compiled fine. Just a fast workaround.

1

If you use the explicit option for titlesec then you can use #1 for the section title in the definition. I've minimised your example: \documentclass{article} \usepackage{xcolor} \usepackage{fontspec} \newfontface\secfont{Quintessential-Regular} \definecolor{sectioncolor}{HTML}{58170D} \definecolor{sectionoutline}{HTML}{D0D2C7} ...

1

You could switch to the KOMA-classes and patch \addsec. This would also remove the need for the \addcontentsline. But imho the numbering is curious. It looks as if the typesetter made an error and forget a number. \documentclass{scrartcl} \usepackage{etoolbox} \pretocmd\addsec{\refstepcounter{section}}{}{} \begin{document} \tableofcontents \section{First ...

0

Just define a special command, instead of abusing \section*. When you'll change your mind and decide not to do such a funny thing, you'll just have to replace \specialsection with \section. \documentclass{article} \begin{document} \tableofcontents \section{First Section Title} \section{Second Section Title} \section*{Third Section Title} ...

0

A quick and dirty way is to patch the \@startsection command, which is responsible for the starting of a section and look for the \@ifstar macro inside. Add a \stepcounter{section} there only if the section level is section (`\refstepcounter is of no use, in my point of view). This must be done after \tableofcontents since all ToC-like commands use ...

5

Try escaping the asterisk using a backslash: latexdiff --exclude-textcmd="section\*" a.tex b.tex > c.tex

2

book and report are the same in this respect, just continue to use \include for chapters and then \input the files with sections.

1

For such an appendix you don't really want the figures to float at all so rather than specifying that they float and hoping they don't, use [H] to tell latex not to float them, then the usual rules about keeping section headings with teh first text in the section will kick in. I also added some % to ends of lines to avoid the overfull box warnings in the ...

2

Don't put formatting in the \section argument! Just define section to be inline rather than display (by changing the sign of the space argument) \documentclass[english]{amsart} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{amsthm} \usepackage{setspace} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. ...

1

This seems like the least hacky approach: \documentclass{article} \begin{document} \paragraph*{Some title stuff}\leavevmode\\ blah blah blah \end{document} It tests OK with \documentclass{report|book} too. The * in \paragraph*{} is not essential; it just keeps the heading out of a Table of Contents. If you want the text indented, you can add a blank ...

1

The following answer makes use of http://tex.stackexchange.com/a/73346/36296 and http://tex.stackexchange.com/a/244024/36296 The idea of the following answer is not to reset the total frame number, but to calculate the length of the current part. \documentclass{beamer} \usepackage{etoolbox} \makeatletter \newcount\beamer@partstartframe ...

3

Here is a solution. I didn't load tocloft, since I use titletoc. Also I added a formatting for thoe unnumbered sections which should appear in the table of contents: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[showframe]{geometry} \usepackage{titlesec} \usepackage{titletoc} \addto\captionsenglish{ ...

1

With KOMA-Script Version 3.19a or newer you can redefine \chapterlinesformat: \documentclass[ fontsize=12pt, a4paper, parskip=half, ngerman, headinclude=true, footinclude=false, captions=tableheading, numbers=noenddot, headings=big ]{scrreprt}[2015/10/03] \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage{xcolor} ...

0

Yes you can use (expandable) tests in the beforeskip-argument: \documentclass{article} \newif\iflarge \makeatletter \renewcommand\section{\@startsection {section}{1}{\z@}% {\iflarge -6cm \else -3.5ex \@plus -1ex \@minus -.2ex\fi}% {2.3ex \@plus.2ex}% ...

3

The \chapter command sets the \thispagestyle{chapter} explicitly which has no header by default. To trick memoir it's possible to use \aliaspagestyle, but ideally one would copy the original chapter page style first. \documentclass{memoir} \makepagestyle{generalstyle} \makeevenhead{generalstyle}{}{HEADER}{} \makeoddhead{generalstyle}{}{HEADER}{} ...

0

4

Memoir includes code based on both the titling and abstract packages so you should use these facilities for modifying the layout. The abstract is not a section but, rather, a specialised environment of its own with its own settings and configuration. Note that using Memoir's tools for configuring the title means that the relevant pieces of data are ...

2

I don't know why this has to reproduced, but this is a starter (only), without a further package. \documentclass[a4paper,11pt,openany,leqno]{memoir} \usepackage{blindtext} \begin{document} {% \centering {% \large \textsc{Transport Architectures for an evolving internet}% by \textsc{Keith Winstein}% } \vskip\baselineskip Submitted to the Department of ...

2

Here's an implementation using the enumitem to do some of the lifting with formating: In the code below, we have: \newlist{exercise}{enumerate}{5} \setlist[exercise]{label*=\arabic*.,ref=\arabic*,before={\subsection*{Exercises}}} This defines a list-like environment called exercise. The next bit, % copy \item into \ex \let\ex\item defines \ex as ...

1

Don't load both sectsty and titlesec. The font commands for section titles must be defined in the preamble, not in the main body of the document. Also, a priori, text color is black, unless otherwise specified, so you don't need to mention it: \titleformat{\section} {\sffamily\bfseries} {\thesection.}{1em}{} ...

1


5

I get the error with tl14 and it goes away if I add the calc package: \documentclass[a4paper]{abntex2} \usepackage{calc} \begin{document} \chapter{Glossário de siglas} Teste \end{document} But I have no idea if this a workaround which only hides some other problem, or the real solution.

0

The abntex2 class supports chapter, but it's easy to fool this mechanism: \documentclass{abntex2} \renewcommand{\thesection}{\arabic{section}} \begin{document} \section{First section} \end{document}

3

The class is designed for something like a book or report rather than an article. Hence, it is designed for documents which are divided into chapters: \documentclass{abntex2} \begin{document} \chapter{First Chapter} \section{First section} \end{document}

0

As a variation on Hupfer's solution: \documentclass[a4paper,oneside, 12pt]{book} \usepackage{xcolor} \usepackage{showframe} \usepackage{blindtext} \newcommand{\mysection}[1]{\section[#1]% {\hfill{#1}\hfill{\color{white}\quad\thesection}}} \begin{document} \tableofcontents \mysection{Ukarranta} \blindtext[2] \end{document}

2

You could provide the following instructions in the preamble: \usepackage{sectsty} \allsectionsfont{\centering} This will center all section, subsection, and subsubsection headers. If you want to center only section-level headers, change the second command to \sectionfont{\centering}

1

This works out of the box (remove \usepackage{showframe} later on!) \documentclass[a4paper,oneside, 12pt]{book} \usepackage{xcolor} \usepackage{showframe} \usepackage{blindtext} \begin{document} \section{\protect\centering\textcolor{blue}{Ukaaranta}} \section*{\centering\textcolor{blue}{Ukaaranta}} \blindtext[2] \end{document}

2

You're forgetting \ignorespaces: with \noindent you start a paragraph, so spaces are not ignored, unless you tell TeX to. \outer\def\section#1{% \medbreak \noindent{\bf#1}\par \nobreak\smallskip \noindent\ignorespaces } Note that \nobreak should go before \smallskip because TeX is allowed to break at glue, if not preceded by discardable items ...

3

Using \noindent means that your heading command has already started the first paragraph. If you know that sections always start with text this is OK (and in the spirit of plain tex commands that aim to be simple and easily customised rather than generally robust). The disadvantage is if you want to start any section with any vertical display material such ...

1

I finally figured it out How to insert symbol before section part. for alignment I should have more train I guess \newcommand{\iconsection}[2]{% \titleformat{\section} % Customise the \section command {\Large\scshape\raggedright} % Make the \section headers large (\Large), % small capitals (\scshape) and left ...

1

\documentclass{report} \usepackage{kpfonts} \usepackage[explicit]{titlesec} \usepackage{tikz} \makeatletter \newcommand{\gettikzxy}[3]{% \tikz@scan@one@point\pgfutil@firstofone#1\relax \edef#2{\the\pgf@x}% \edef#3{\the\pgf@y}% } \makeatother \titleformat{\chapter} {\normalfont\sffamily\Huge\scshape} {}{0pt} ...

1

Redo the relevant \titleformat command: \documentclass[headinclude, oneside]{scrbook} \usepackage[eulerchapternumbers,beramono,pdfspacing]{classicthesis} \usepackage{arsclassica} \usepackage{setspace} \usepackage{lipsum} \titleformat{\section} {\singlespacing} {\textsc{\MakeTextLowercase{\thesection}}} {1em} {\spacedlowsmallcaps} \begin{document} ...

2

If an article - like documentclass is used, then redefinition of \thesubsection is basically sufficient, if this kind of numbering is requested. Each LaTeX counter has a predefined \the... command which defaults to use \arabic{...}, i.e. printing the counter value with arabic numbers. The structure commands use a somewhat recursive setup, referring to the ...

0


0

using titlesec : \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[frenchb]{babel} \usepackage{titlesec} \usepackage{lipsum} \setcounter{secnumdepth}{0} \leftskip=3cm \titlespacing{\section}{-2cm}{1cm}{-.8cm} \titleformat{\section} ...

4

How about a named reference, i.e. to the name of the starred section? This can be done with \nameref or \nameref* if no link is needed! \documentclass{article} \usepackage{blindtext} \usepackage{hyperref} \begin{document} \section{A section} In \textbf{\nameref*{abus}} we will see a lot of boring stuff and here's a link to it: \nameref{abus} ...

2

Your problem comes from incorporating \normalsize to the argument of \section: it is included in rightmark, thus overwriting the \tiny specification of fancyhdr. I also took the liberty to replace your hyphen dashes with more relevant endashes. Here is a simple solution with \titlesec: \documentclass[12pt, a4paper]{book} \usepackage[utf8]{inputenc} ...

0

Size \tiny seems too small, but it's your document, not mine. Don't use explicit font commands in titles, use a higher level package like sectsty. For the dot after the number, redefine \@seccntformat. \documentclass[12pt, a4paper]{book} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \usepackage{sectsty} \pagestyle{fancy} \fancyhf{} ...

3

You're putting #1 in the wrong place: the title is the last argument. Without the explicit option (that is usually unnecessary) the code should be \documentclass{article} \usepackage{titlesec} \usepackage[showframe=true]{geometry} \titleformat{\section}% {\Large\sffamily\bfseries}% format {\makebox[0pt][r]{\thesection\hspace{12pt}}}% label {0pt}% ...

4

Maybe something like this... The \llap has nothing to do with the problem. But what I did change was to take #1 and place it inside of a \parbox. \documentclass{article} \usepackage[explicit]{titlesec} \usepackage[showframe=true]{geometry} \titleformat{\section}% {\Large\sffamily\bfseries}% format {\llap{% label ...

1

The following is not thoroughly tested, but should suffice with some tweaking. The idea is to update \newchap to include some code from needspace. This allows you to force a new page based on the amount of space available on the page, and condition accordingly between issuing \thispagestyle{plain} and \thispagestyle{fancy}: \documentclass{article} ...

1

It is better to draw the rule directly instead of using \uuline. An easy way to draw a rule that extends the whole width of the text is \hrule. For example: \makeatletter \let\oldsection\section \def\section{\@ifstar\s@section\@section} \newcommand{\@section}[2][\relax]{\oldsection[#1]{#2}\hrule\bigskip} ...

Top 50 recent answers are included