# Tag Info

3

The standard setup of classicthesis uses soul for spacing small caps; add the pdfspacing options that uses microtype features: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[nochapters,pdfspacing]{classicthesis} \begin{document} \section{umlauts å à É Ü} text ...

0

#+OPTIONS: H:3 * section ** subsection *** subsubsection Works for me under Org-mode version 8.2.5h (8.2.5h-30-gdd810b-elpa @ /…/org-20140303/). Make sure you apply the option on the first line with C-c C-c.

5

You can use the explicit option for titlesec to place the title inside a \parbox of the desired length; notice that now you need to use #1 (typically in the last mandatory argument for \titleformat) to get the title for the sectional unit. I used \textwidth-3em as the width for the box, but you can change this value according to your needs. In the example ...

3

I'd say is to be expected since lstlisting will be found still in vertical mode and the environment doesn't take any precautions here. You can prevent the undesired result using \leavevmode before the offending listing: \documentclass[twocolumn]{article} \usepackage{listings} \begin{document} \section{Lorem ipsum} Consectetur adipiscing elit. ...

5

The problem here is that you set the section title in a TikZ \node, and by default this is a box that doesn't allow line breaking, it will just become as wide as the contents of the node. To fix this, set a text width for the node, this will cause the node text to break when exceeding that width. You probably also want to change the anchor of that node, or ...

0

If the problem is only mimic the Word style, may be you will find simpler start with the wordlike package. With the basic option typesets section headings in times roman bold and normal size: \documentclass[basic,12pt]{article} \usepackage{wordlike} \usepackage{blindtext} \title{Word-like document} \author{By a fake Word user} \begin{document} \maketitle ...

3

You can use the sectsty or titlesec packages to set the desired formatting for the sectional unit headings. An example with sectsty: \documentclass[a4paper,11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathptmx} \usepackage{sectsty} \sectionfont{\fontsize{12}{14.4}\selectfont} \begin{document} \section{A test section} ...

3

The titlesec package redefines \chapter at begin document, so you have to delay your own redefinition. I present the version with the glossary, to show that everything goes well; I removed the hack for tocvsec2 since I updated my distributions. \documentclass{book} \usepackage{lipsum} \usepackage{xparse,xpatch} \usepackage{tocvsec2} \usepackage{titleps} ...

4

I assume you set secnumdepth to -1 to manually adjust the sectional naming. If you strategically update the three requirements (ToC/header/naming) and only use \section to represent your Exercises, then the following will suffice: \documentclass{article} \usepackage{etoolbox,fancyhdr}% http://ctan.org/pkg/{etoolbox,fancyhdr} \fancyhf{}% Clear ...

3

The simplest way to do it is to use \section[Exercise x]{Exercise x - name}. The mandatory argument is used in the text, and the optional argument is used in the headings and the table of contents. To make it easier to write you could define the command \newcommand{\exercise}[2]{\section[Exercise #1]{Exercise #1 - #2}} and use it with ...

6

You just need to redefine \glossarysection again before the final \printglossary so that it now uses \chapter*: \documentclass[12pt]{report} \usepackage{makeidx} \usepackage{sectsty} \allsectionsfont{\bfseries} \chapterfont{\centering\Large} \sectionfont{\normalsize} \subsectionfont{\normalsize} \usepackage[subfigure]{tocloft} \usepackage{tocloft} ...

6

The immediate problem is that you need the counter for paragraphs to be reset when you start a new subsubsubsection. To do this, all you need to do is add: \@addtoreset{paragraph}{subsubsubsection} Note, though, that you probably will also find you want to add some further resets depending on the structure of your document. More generally, I have to say ...

2

Just redefine \AtBeginSection before the final slide: \documentclass{beamer} \usetheme[hideothersubsections]{Hannover} \begin{document} %=======BEGIN OUTLINE COMMANDS============ \AtBeginSubsection { \begin{frame}<beamer>{Outline} \tableofcontents[currentsection,currentsubsection] \end{frame} } \AtBeginSection { ...

-1

Try protect'ing the section, as in \section\protect{This title contains mathematics such as $\beta_i$}

3

One option using titlesec: \documentclass{article} \usepackage{titlesec} \titleformat{\subsection}[runin] {\normalfont\large\bfseries}{\thesubsection}{1em}{} \titleformat{\subsubsection}[runin] {\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{} \begin{document} \section{Test section} test text \subsection{Test subsection} test text ...

2

You can do this out of the box with package etoc. The code: \documentclass{article} \usepackage{etoc} \begin{document} \tableofcontents \section{First Section} Hello \subsection{A} \subsection{B} \section{Second Section} \etocsettocdepth.toc {section} \subsection {EXCLUDE ME}\label{ssec:excluded} \etocsettocdepth.toc {subsection} \subsection {D} ...

2

If you want all \subsections to be removed from the ToC, then all you need in your document preamble is \setcounter{tocdepth}{1} which would set the maximum depth of entries in the ToC to 1 (or \section). If you only want selected \subsections to be inserted/not in the ToC, then you should use a different technique. The following defines \stoptocentries ...

3

Here's what happens. A section title is a moving argument, which means it's stored in memory and written out in the .aux file when the next page shipout occurs. When the write operation is performed, TeX expands macros without executing commands; moreover it is not in math mode at the time (it is in no mode, actually). This means that the conditional is ...

2


4

If you would like to have the \S as a feature of the section number everywhere else that it occurs (such as cross-references), then you can define \thesection to contain a \S symbol first, and then define \thetheorem, etc. to remove this symbol as a part of creating the theorem number. Preamble. Consider the following minimal preamble: ...

6

Load the package titlesec and add this line to your preamble: \titleformat{\section}{\normalfont\Large\bfseries}{\S\thesection}{1em}{}[] MWE: \documentclass{article} \usepackage{titlesec} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{defn}[theorem]{Definition} ...

4

Redefine it in this way (you were missing a \par at least, and use \dimexpr\linewidth-2\fboxsep-2\fboxrule instead of simply \linewidth to avoid bad boxes) \def\@makeschapterhead#1{% \noindent\fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{% \centering\large\bfseries #1% }}\par\nobreak} MWE: \documentclass{report} \makeatletter ...

1

I just found the way to solve the problem (please, if somebody can explain to me why does it works, I will be delighted). I changed the definition of makeschapterhead by the following: \def\@makeschapterhead#1{ \begin{center} \fbox{\parbox{\linewidth}{\centering \large\bfseries #1 }} \end{center} } That is, I just enclosed my definition ...

7

2

For the formatting of title in the form Appendix A (title) and entries in the TOC, there is a 'quick-and-dirty' solution, by redefinition of the section command, however, not the \autoref issue. \documentclass{scrbook} \usepackage[manualmark]{scrpage2} \usepackage{blindtext} % Not really needed \usepackage{hyperref} ...

3


2

The answer to the LaTeX part of this can be found in How to change the numbering of \part, \chapter, \section, ... to alphabetical, Roman numbers, etc. You need to such commands to the preamble, by going to Document --> Settings --> LaTeX preamble. To get the result you ask for, add \renewcommand\thesection{\Roman{section}} ...

2

The above solutions would give you a footnote marker using the same fontsize of the section title, which might be undesirable. If you want it small: %%PREAMBLE \usepackage[stable]{footmisc} %%BODY \section{Your Title \textsuperscript{\footnotesize{\footnote{Your foonote}}}}

8

The default article provides the following levels of sectioning \part (level 0) \section (level 1) \subsection (level 2) \subsubsection (level 3) \paragraph (level 4) \subparagraph (level 5) If you wish to add levels below this, see How to add an extra level of sections with headings below \subsubsection. Note that more levels are rarely required, since ...

6

By default the article supports only the \part \section \subsection \subsubsection as well as \paragraph and \subparagraph. It is possible to add additional sections but you should check if it's not easier to switch the class. Here's an example how it may look like (taken from my blog post, uses the KomaScript scrartcl class): \documentclass{scrartcl} ...

3

Here's another option: \documentclass[ 11pt, pagesize=auto, version=last, chapterprefix=true ]{scrbook} \usepackage[frenchb]{babel} \usepackage[babel=true]{csquotes} \usepackage[T1]{fontenc} \usepackage[explicit]{titlesec} \usepackage{xcolor} \usepackage{charter} \definecolor{mybluei}{RGB}{28,138,207} \definecolor{myblueii}{RGB}{131,197,231} ...

5

\chapter* doesn't increment the chapter counter, which resets the section counter. It's easiest to just reset the section counter to 0: \chapter*{Conclusion} \addcontentsline{toc}{chapter}{Conclusion} \setcounter{section}{0}

5

One way to achieve your objective would be to (i) make sure that the definition and theorem environments share the same counter and (ii) redefine the \section command in a way that resets this counter to 0, regardless of whether the sections are numbered or not. The example below does these things, while using the amsthm package. \documentclass{article} ...

2

In Texmaker, there is no code folding feature for \include it's only available for \part, \chapter, \section,.., \begin{foo} \end{foo}. Place a feature request with clear demo at issue tracker. Note: Use \usetikzlibrary{external} and \tikzsetnextfilename{figure-name} as shown in ...

0

First of all, note that I canceled the "fullpage" and "doublespace" option. They are needless. (If you want doublespaced lines just use the setspace package.) The solution to you actual problem consists in reseting the section counter manually when \chapter or \chapter* is invoced. (For some reason \@addtoreset failed.) Then, you simply need to redefine ...

4

With the help of enumitem, you can define a new environment enumsec which does what you want (I hope): \newlist{enumsec}{enumerate}{1} \setlist[enumsec,1]{% align=right, leftmargin=0pt, parsep=0pt, itemsep=\topsep, listparindent=\parindent, label=\arabic*. } MWE: \documentclass{article} \usepackage{enumitem} ...

2

Another solution, also with titlesec, but using tabular environments: \documentclass[12pt,a4paper]{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[svgnames, x11names]{xcolor} \newcommand*\ftsize[1]{\fontsize{#1pt}{\numexpr 1.2*#1\relax pt}\selectfont} ...

7

This is an approach with »titlesec« where you perhaps need to incorporate your font settings. \documentclass[11pt]{report} \usepackage[T1]{fontenc} \usepackage[explicit]{titlesec} \usepackage{calc} \usepackage{lmodern} \usepackage{lipsum} \titleformat{\chapter}[hang] {\filcenter} {\parbox{\widthof{\LARGE\sffamily\MakeUppercase{\chaptername}\enspace}}{% ...

6

You can simply set the 4th argument of \titleformat to a negative value. In the following MWE I've set it at the left margin of the page: \documentclass[a4paper,12pt]{report} \usepackage{tikz} \usetikzlibrary{backgrounds} \usepackage[uppercase, sf, explicit, raggedright]{titlesec} % \usepackage{xcolor} \usepackage{lipsum} % only for the example ...

4

I'm not sure if this is what you want: \documentclass{article} \makeatletter \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \fi \addcontentsline{toc}{part}{#1}% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \LARGE \bfseries #2% \markboth{}{}\par}% \nobreak ...

2

Remove the \protect before \thepart. The mark mechanism relies on its expansion when the mark is emitted and not when it's typeset. You are protecting \thepart and therefore it gets expanded in the headline, but at that point the value can be the wrong one. On the other hand, \thepage must be protected, because it's supposed to print the value when the ...

2

Chapter headings are set, by default, using \raggedright. However, this does not avoid hyphenation necessarily. Yet one can patch the respective chapter heading macros to avoid hyphenation via \hyphenpenalty=10000: \documentclass{report}% \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox % ...

2

The problem is the \part{A Problem} is executed on the last page of your first part, and the value of \thepart is the part number at the end of the current page. Since you start a new part on that page, even though the part title is printed on the next, your part counter is increased. The solution is to manually enter a \newpage before \part. This will not ...

0

After perusing the FAQ some more, I came across this answer, which gives another solution: Download and incorporate the package lcsect.sty into your source .tex file. Use the \lcsection command for sections, but convert the text to upper case by hand to stay consistent with the other titles. \documentclass{sig-alternate} \usepackage{lcsect} ...

6

Another option, sig-alternate.cls uses \uppercase in \@sect to format sectional unit titles; you can patch \@sect to use \MakeTextUppercase (from the textcase package) instead; in this way, the case of any math expressions in the titles won't be changed and the arguments of \cite, \label and \ref will also be prevented from being uppercased: ...

2

If this isn't too much of a nuisance... \documentclass{sig-alternate} \begin{document} \section{Introduction} \label{sec:introduction} The introduction. \def\x{\ref{sec:introduction}} \section{The section after Section~\x} \end{document}

3

The trick is to make \chapter* call the original \chapter. However, one has to patch \tableofcontents and the other list making commands because they have \chapter* in them. \documentclass{book} \usepackage{xparse,xpatch} \usepackage{lipsum} \usepackage{tocvsec2} \let\ORIchapter\chapter \RenewDocumentCommand\chapter{som}{% \IfBooleanTF{#1} { ...

5

Martin's answer at Fancy Chapter Headings produced the following output (zoomed): The comment by the OP discussed taking Martin's definition of \titleformat: \titleformat{\chapter}[display] {\normalfont\Large\raggedleft} {\MakeUppercase{\chaptertitlename}% \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}} {10pt}{\Huge} and adding ...

6

I am not sure if something like this is what you want: \documentclass{book} \usepackage{titlesec} \usepackage[tracking=true]{microtype} \usepackage{lipsum}% juts to generate text for the example \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\filcenter\underline{\MakeUppercase{\textls[400]{\chaptertitlename}}\ \thechapter}}{20pt}{\Huge} ...

4

You have a simple solution with the enumitempackage (no need to manually number the outer enumerate). The idea is just to close the enumerate environment at the end of the subsection and to open another one with the resume*option after the beginning of the next section: \documentclass[12pt, a4paper]{article} \usepackage[utf8]{inputenc} ...

Top 50 recent answers are included