# Tag Info

0

Using the titlesec package should do it. Just try this code: \documentclass[12pt]{amsproc}% http://ctan.org/pkg/amsproc \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{titlesec} \usepackage[dotinlabels]{titletoc} \titleformat{\section}[block]{\bfseries\large\filcenter}{Section \thesection.}{0.4em}{} ...

2

You could update the way the section counter is formatted/printed. This is done by the macro \@seccntformat: \documentclass[12pt]{amsproc}% http://ctan.org/pkg/amsproc \makeatletter \def\@seccntformat#1{% Section~\protect\textup{\protect\@secnumfont \csname the#1\endcsname \protect\@secnumpunct }% } \makeatother \begin{document} ...

1

Read Enrico's comments above: Vertical space at the beginning of pages is removed. That should answer your first question. Coming to the second question, it is possible. I will show at least two ways. Method -1: Load graphicx package and use its scalebox macro like: \titleformat{\section}[display] ...

3

MWE \documentclass[chapterprefix=on]{scrbook} \usepackage{blindtext} \begin{document} \blinddocument \end{document}

4

In addition the the sectsty solution you can also do this with package options and the titlesec package: \usepackage[rm,tiny]{titlesec} The rm option sets the titles in the normal font, while the tiny option makes all headings (except chapter) the same size as the normal font.

2

I'd use titlesec: \documentclass[a4paper]{article} \usepackage[margin=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[brazil]{babel} \usepackage{titlesec} \titleformat{\section}[block] {\normalsize\bfseries} {} {0pt} {\MakeUppercase} \titlespacing{\section} {0pt} {4ex plus 1ex minus 1ex} {1ex} ...

6

Without knowing anything about your setup, here's something quick you can try: \usepackage{sectsty} \allsectionsfont{\normalsize}

0

Short answer Don't use a tikzpicture environment here. Use the inline version, \tikz{...}, instead. \documentclass[12pt]{scrbook} \usepackage{tikz} \usepackage{titlesec} \usepackage{titletoc} \titleformat{\chapter} [hang] {\huge} {} {0em} {} [\large \tikz{\draw [ultra thick] (0,0) -- (0,1);}] \begin{document} \chapter{Introduction} Some text ...

0

I didn't understand why exactly it worked, but I managed to do it. I just had to add \leavevmode at the beginning of the definition: \renewcommand\section{\leavevmode\@startsection{section}{1}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% ...

0

You could use the titlesec package to redefine the \section command. For example, it says: If you dislike typing the full skip values, including the plus and minus parameters, an abreviation *n is provided (where n is an integer). In the beforesep argument this is equivalent to n ex with some stretchability and a minute shrinkability. In the ...

6

There is an error in the line \allsectionsfont{\center \normalfont\scshape} It should be \centering and not \center, i.e. \allsectionsfont{\centering\normalfont\scshape} In fact issuing \center you are saying \begin{center} and the center environment adds vertical space. Making this change, the extra spacing before your sectioning commands is removed. ...

3

Assuming that you have a good reason to do that, here's how you can do. Put, just after each unnumbered subsection, the lines \stepcounter{subsection} \addcontentsline{toc}{subsection}{\thesubsection\hspace*{1em}<name>} where <name> is the name of the subsection. Note that I've used \stepcounter instead of \refstepcounter voluntarily, hoping ...

1

You don't want to add the period to \thesection, but rather to modify how the section titles are typeset, adding a period after the number; unfortunately there's no “official” user interface for this, but it's not difficult either. \documentclass[12pt,a4paper]{article} \usepackage[croatian]{babel} \usepackage{float} \makeatletter ...

7

too late to worry too much about spacing but this does the section levels and the paragraph counting, it takes two passes to get the paragraph counts for each clause. b.cls \LoadClass[a4paper]{article} \RequirePackage[utf8]{inputenc} \def\maketitle{% \begin{center}\large\bfseries\@title \end{center}} ...

2

This is not a complete answer but perhaps somebody else can finish it. Do you want something like the following? \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage[utf8]{inputenc} \usepackage{enumitem} \newlist{contrato}{enumerate}{2} \setlist[contrato,1,2]{wide,,labelindent=0pt} \setlist*[contrato,1]{label={Cláusula ...

0

diabonas answered exactly the question I had asked. But unfortunately his approach caused follow up problems when creating print versions with multiples frames per page (see follow up question) A possibility to avoid these problems is to define an own command for the section pages \documentclass{beamer} \setbeameroption{show notes} % notepage for every ...

7

hyperref is able to cope with \ref but not \eqref; here's how you can teach it: \documentclass{article} \usepackage{amsmath} \usepackage{hyperref} \pdfstringdefDisableCommands{\def\eqref#1{(\ref{#1})}} \begin{document} \begin{align} \label{func1a} U(X,Y) &= 2X + 5Y,\\ \label{func1b} U(X,Y) &= (XY)^{0{.}5},\\ \label{func1c} U(X,Y) ...

2

You are right, chapter and sectioning commands are redefined by tex4ht. Chapter styles are not used at all, but they couldn't work anyway, because tex4ht doesn't know how to translate TeX layout to CSS needed in web pages. It really isn't easy task. So you have to style generated elements yourself. There is the \Css command for providing CSS declarations. ...

9

You can tweak Jake's code. Adjust the colours and font to suit your taste. \documentclass{book} \usepackage[explicit]{titlesec} \usepackage{tikz} \usetikzlibrary{shapes.misc,arrows} %defining subsection titles \newcommand\titlebar{% \tikz[baseline,trim left=0cm,trim right=3cm] { \node [ text = red!70!green, anchor= base east, ...

0

5

You should set the counter secnumdepth. Making this 0 means chapters are numbered but not sections, 1 numbers sections but not subsections. \documentclass{book} \setcounter{secnumdepth}{0} \begin{document} \tableofcontents \chapter{Test} \section{Test section} \subsection{Test subsection} \chapter{More} \end{document}

4

If all you need is to exclude a section from the TOC, you need simply change the tocdepth before you write the section information to the TOC. \documentclass{article} \usepackage{titlesec} \titleformat{\section}{\large\bfseries}{\thesection}{8pt}{\large} \newcommand{\restoretoc}{\addtocontents{toc}{\setcounter{tocdepth}{1}}} ...

3

If you do not want to adapted the spacing in every individual \section*{} you can define your own command for the space \documentclass{article} \usepackage{titlesec} \newcommand{\myspace}{8pt} \titleformat{\section}{\large\bf}{\thesection}{\myspace}{\large} \begin{document} ...

2

The problem is that the title is too long in that particular chapter, so the whole title page block gets moved to the next page, which is numbered. You can change your chapter macro so that the title is set in a box of a fixed height: write \parbox[t][height]... and include some \vspace at the end that can stretch or shrink: \documentclass[10pt]{book} ...

3

Another option following the same pattern as the MWE which uses conditionals to define the background once and forall. I do not like this approach as it is not very modular but since @dcmst asked here's a solution with conditionals. First let's introduce a new conditional for section pages and set it to false \newif\ifinsectionframe \insectionframefalse ...

6

I'll add my answer too, the approach is the same of Bordaigorl but with less code involved. The idea is to create another \setbeamertemplate{background} and embed it into a custom command to be used instead of \frame{\sectionpage} The custom command will redefine the background and then the section page template. Just as an example I used a tikzpicture to ...

2

The problem is that the section page template gets "called" within a frame but the background template can only be changed before starting the frame. Also, setting flags patching \sectionpage probably wont work because it would set them after the background is typeset. So, the simplest solution is to define a macro to create the section frame (instead of ...

8

Something like this? Code \documentclass[a5paper]{article} \usepackage[colorlinks]{hyperref} \begin{document} \tableofcontents \newpage \phantomsection \addcontentsline{toc}{section}{Recipe 1} This is recipe 1 \newpage \phantomsection \addcontentsline{toc}{section}{Recipe 2} This is recipe 2 \newpage \end{document} EDIT In order to achieve what ...

2

As mentioned in comments, you can use the package fncychap for this. I don't know this package at all so maybe I am not referring to the right style, but you can have a look on the documentation for further styles. The style I think you are looking for is calles "Lenny": \documentclass{report} \usepackage[Lenny]{fncychap} \begin{document} \chapter{} ...

2

Remove \thesection the definition for numberless: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{titlesec} \titleformat{\section}[hang] {\usefont{T1}{qhv}{b}{n}} {} {0em} {\hspace{-0.4pt}\Large \thesection\hspace{0.6em}} \titleformat{name=\section,numberless}[hang] {\usefont{T1}{qhv}{b}{n}} {} {0em} ...

2

As proposed by the question-opener in the comments to my first answer, here a different approach: Change section to subsection and include the different decks a sections. No changes in deck_n.tex. Replace \section by \subsection in deck_n_slides.tex. To specify the appearance of the "Deck TOC" use the options for for \tableofcontents. (e.g. use ...

2

The numbering of subsections in the book document class should already be in the format you require. To modify \thesubsubsection to show the final "number" in alphabetical rather than arabic-numeral format, you could issue the commands \makeatletter \renewcommand\thesubsubsection{\thesubsection.\@alph\c@subsubsection} \makeatother in the preamble of your ...

1

This should be more resistent to font changes (Try to set the '12pt' option and uncomment \usepackage{palatino}): \documentclass[11pt]{article} %\usepackage{palatino} \usepackage{tabularx} \newcommand{\frstCVcell}{2.5cm} \begin{document} \section*{WORK SECTION TITLE} \begin{tabularx}{\textwidth}{p{\frstCVcell}Xc} 2008-2010 & SOME PLACE I WORKED & ...

3

The default depth of the ToC in report is 2 (contained within the counter tocdepth). This means that sectional units up to and including this level will be included in the ToC. Here are the levels based on the standard document classes: \part = -1 \chapter = 0 \section = 1 \subsection = 2 \subsubsection = 3 \paragraph = 4 \subparagraph = 5 If you wish ...

5

I leave my original answer. Some possible changes according to the edit in the question are listed below. A little piece to cover all the details of the question is still missing and explained in the last section. Original answer I tried to find a solution within the following design principles: No changes in the files include.tex, deck_1.tex, ...

1

The class file is quite well designed and therefore relatively simple to modify. Add the following to your document preamble. I've made a new command \appalign to align the heading of the appendix only and then redefined the internal command that makes the heading use that command instead of the class \chapalign. Although the value could be hard coded, ...

5

Your Mistake You are actually using the book or report class or something like that. \documentclass{book} \begin{document} \section{Section 1} \section{Section 2} \subsection{SubSection 1} \end{document} So, your output looks like this as reported by you. The Solution Please use the article class in place of book class. \documentclass{article} ...

4

titlesec allows you to define your own styles by providing a .tss "style file": \documentclass{report} \usepackage{filecontents,lipsum}% http://ctan.org/pkg/{filecontents,lipsum} \begin{filecontents*}{chapframe.tss} % Styles % ~~~~~~ % 1:global 2:label 3:sep 4:style 5:after 6:left 7:right 8:title % \ttl@<shape> and \ttlh@<shape> take the ...

8

Add the line \usepackage[T2A,T1]{fontenc} in the preamble so to have the right font encodings. Thus the MWE \documentclass{letter} \usepackage[utf8]{inputenc} \usepackage[T2A,T1]{fontenc} \usepackage[russian]{babel} \begin{document} \MakeUppercase{English Text. Русский текст.} \end{document} yields the desired result P.S.: The T1 option is not ...

5

Here a suggestion using a frame drawing package: \documentclass[10pt]{scrreprt} \usepackage[tikz]{mdframed} \mdfdefinestyle{chapter}{outerlinewidth=3pt,middlelinewidth=1.5pt,innerlinewidth=1pt,% outerlinecolor=blue!70!black,middlelinecolor=white,innerlinecolor=blue!50!black} \makeatletter \renewcommand*{\@@makechapterhead}[1]{% \chapterheadstartvskip {% ...

6

First tried using titlesec. Failed to coax it to work in the manner you wanted. Then redefined the definition from basics. The Solution \documentclass[a4paper,12pt,oneside]{book} \usepackage{calc} \makeatletter \def\@makechapterhead#1{% \vspace*{50\p@} \setlength{\fboxsep}{1.0mm} \setlength{\fboxrule}{1.0mm}\noindent\fbox{% ...

2

Did you try \section* or any other sectioning command with an extra *? It gives you something formatted like that type of section, but doesn't add or change a section counter and doesn't show up in the table of contents. (Merely posting what seems to be the accepted answer as a community wiki.)

5

You don't need to add any \@ifstar to your definitions, because \@startsection already takes care of that. However, some package you are using redefines \@ifstar. For some reason this redefinition uses \new@ifnextchar rather than the standard \@ifnextchar. The old definition would ignore spaces, but this new one does not. You have introduces a space between ...

1

Note how all the default sectional units define their fonts as switches (from article.cls: \newcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} ...

2

Probably the easiest way is to change manually in proper places the behaviour of sections, as in the following example. If, in the example, the next chapter after unnumbered had to have number 3, one should uncomment \stepcounter{chapter}. If figures and tables are needed, please add also changes from egreg's comment. \documentclass{report} ...

3

Use sectsty (or, with some more work, titlesec): \documentclass{article} \usepackage{fontspec} \usepackage{xcolor} \usepackage{sectsty} \colorlet{headercolor}{gray} \newcounter{colorCounter} \newcommand\sectioncolor{% \color{% \ifcase\value{colorCounter}% blue\or red\or orange\or green\or purple\or ...

1

Oh I solved it: \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} % fonts: \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} \setmainfont{DejaVu Sans} \setsansfont{DejaVu Sans} \setmonofont{DejaVu Sans Mono} \usepackage{xcolor} \colorlet{headercolor}{gray} \newcounter{ColorCounter} \newcommand\Color{ \color{% ...

3

Try adding the following code in your preamble: \makeatletter \setcounter{secnumdepth}{3} \titlespacing{\subsubsection}{0em}{.5em}{0em}%[0pt] \ifct@cthesis@hangsubsection \titleformat{\subsubsection}[hang]% {\usekomafont{subsubsection}}% {\color{ctcolorblack}\thesubsubsection\hspace*{10pt}}% {0pt}% ...

5

Option 1: replace \usepackage[nottoc,numbib]{tocbibind} with \usepackage[nottoc]{tocbibind} See section 2 of the tocbibind documentation in case numbib is not self-explanatory. Option 2: As you're using a KOMA-Script class, don't load the tocbibind package at all; instead add the class option bibliography=totoc.

4

Collecting the comments into an answer: The problem isn't \mathsf but \underline. The latter is a fragile command and those frequently pose problems in moving arguments such as section titles. Here are two definitions that should work: \newcommand{\APC}[1]{{\protect\underline{\mathsf{APC}}(#1)}} or ...

Top 50 recent answers are included