Tag Info

1

3

For section titles, you can use titlesec and do \usepackage{titlesec} \titleformat*{\section}{\color{magenta}} \titleformat*{\subsection}{\color{Brown}} To use Brown colour, you have to pass dvipsnames option to xcolor package. For theorem titles etc you can do \newtheorem{theorem}{\color{blue}Theorem} ...

2

Version 2.4a of fontspec no longer loads the package fixltx2e, cf. fontspec's README file: Change history -------------- - v2.4a (2014/06/21) * No longer load fixltx2e.sty -- this package should really be loaded before \documentclass. The problem occurs when the fragile command \raisebox is used in a section heading. fixltx2e makes the command ...

1

You apparently use titlesec. You have to define two versions of \titleformat. One for ordinary (numbered) chapters, and one for unnumbered chapters, with the numberless key. By the way, for such centred titles, you should use the blockstyle. If I understand well what you want to do, change your code to these lines in your preamble: ...

0

Assuming you want to allow headings part way down a page - just not at the very bottom, one solution could be the needspace package. Needspace allows you to specify how much space must be on the page before placing the next item. However, this may not catch all instances of your issue. Add \usepackage{needspace} and then do \needspace{X} before your ...

3

\documentclass[xcolor=dvipsnames]{beamer} \usecolortheme[named=BrickRed]{structure} \usetheme{Singapore} \begin{document} \section{Section No 1} \subsection{SubSection No 1} \frame{\tableofcontents[currentsection]} \frame{\tableofcontents[currentsection, currentsubsection]} %new code \frame{Some text 1} \subsection{SubSection No 2} \subsection{SubSection ...

1

This version resembles the version of egreg, but it regards the (total) section number, such, that there is no pagebreak just before the first section occurs (unless manually forced) \documentclass[12pt]{article} \usepackage{etoolbox}% \usepackage{blindtext}% \usepackage{assoccnt}% \let\LaTeXStandardSection\section \newcounter{totalsection}% ...

3


2

This gets rid of the "skips" and uses an \addstackgap[2pt]{} from the stackengine package. \documentclass[12pt,numbers=noenddot]{scrartcl} % layout (geometry, one page, margins) \usepackage[a4paper,left=80pt,right=80pt,top=60pt,bottom=80pt,headsep=20pt,footskip=10pt]{geometry} \pagestyle{empty} % linespacing \usepackage[onehalfspacing]{setspace} % no ...

2

Adjust font size and the spacing, but this should be the idea: \documentclass{book} \usepackage{titlesec} \titleformat{\chapter}[display] {\Large\bfseries} {\MakeUppercase{\chaptertitlename}} {2\baselineskip} {\large\quad\thechapter. } \titleformat{name=\chapter,numberless}[display] {\Large\bfseries} {} {0pt} {\large} \begin{document} ...

1

Use \normalfont. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} \section{This symbol {\normalfont{¿}} is not bold, but this one ¿ is} \end{document}

4

You're on the wrong track. ;-) Just setup a new counter and use it. \documentclass{book} \usepackage{xparse} \newcounter{study} \NewDocumentCommand{\study}{om}{% \refstepcounter{study}\IfValueT{#1}{\label{#1}}% \section{Study \thestudy: #2}% } \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{Title} \section{A regular ...

6

Rather than give special meaning to items based on the labels' "prefixes" (a:, b:, ...), I'd use a feature that's already provided by the cleveref package: use the optional argument of the \label command to override an item's default cross-referencing name. In the following example, I first inform cleveref about the singular and plural forms of items called ...

2

Based on my answer at new command for including a custom string into \cref, one can change the labels of cleveref (and also work with hyperref). In this answer, I extend that to look at the first character of the label to help decide what the reference should look like. Here, I create a new macro, \crefX to do the job, but it could be made to replace the ...

1

Here is a solution with titlesec, based on the examples in the package documentation around p. 22. I put the section style in a macro so you can change it more easily. The arguments to \titleformat, as far as I can tell, do the following in order: Determine which type of heading to format (here, \section) Insert commands before the section number is ...

1

Really this is easiest with the titlesec package. For example: \titleformat{\section}[block]{\fontsize{14}{16}\bfseries}{}{0pt}{\titlerule\\}[\vspace{2pt}\titlerule] will redefine \section to be a numberless heading of in 14pt bold (the 16pt is the baseline skip, it should not be set to 0) with rule above and below. \documentclass{article} ...

0

Solved it using \newcommand{\titulo}[1] { \par\noindent\rule{\linewidth}{0.8pt}\\[3pt] \noindent{\Large\textbf{#1}}\\[-18pt] \par\noindent\rule{\linewidth}{0.8pt} }

20

As the comments note, I am the only user at the moment and would probably be for some time. Like many package writers the real reason for developing it, was to fulfill a need, in this case to enable me to produce beautiful books with less problems. A full pdf probably 3-4 months old can be found at phd. It is a rather lengthy document, as the document at ...

0


10

Please do the following steps: go to https://github.com/yannisl/phd press on "Download ZIP" on the right (106 MB) extract the .zip file somewhere you want. navigate your terminal (cmd on Windows) into that folder run (three lines, each followed by an Enter-stroke): pdflatex phd.dtx makeindex -s gind.ist -g phd pdflatex phd.dtx open the phd.pdf which is ...

5

If it's an ad hoc document and you just want the section numbers to match whatever documents the notes are for, a simple solution is to use the * form to suppress numbers and add them as part of the title \section*{1.24.33 my title} \section*{2.3 my next title} \section*{1.33 my numbers aren't in order}

6

I'm not sure why you'd want to do this. Even more, I believe you shouldn't discharge the usual commands: if you don't like the appearance of section headings there's the package titlesec that allows for changing them. Here I propose a \DIV macro that can be called with an optional argument and a mandatory argument for the subdivision level; the optional ...

2

It can be a bit frustrating if the only answers to "How do I do that?" are "Don't." Especially if it's very easy to do what you want (and I can imagine use cases). A bit of researching in the internet (https://en.wikibooks.org/wiki/LaTeX/Counters) shows that the command you are looking for is \setcounter{section}{23}, where 23 is the number you want to set ...

1

Through trial and error, I have resolved this question, as follows. Defined a new command, stitlebar@@, based on titlebar@@ \newcommand\stitlebar@@{%ssections \tikz[baseline,trim left=3.1cm,trim right=3.15cm] { \fill [black!15] (2.5cm,-1ex) rectangle (\textwidth+3.6cm,2.5ex); \node [fill=black!15!white, anchor= base east, rounded rectangle, ...

1

If I've understood correctly, this should do what you want. I've commented the code a bit. To use the garamond option, you need to install URW Garamond. You can do this using getnonfreefonts-sys which is a script you can use to easily install additional fonts. Make sure you use the sys version when you run the script. ...

4

The chapter head is typeset by \@makechapterhead, which is a macro with one argument, while the TOC entry and the heading are direct responsibiity of \@chapter and independent of \@makechapterhead. If we temporarily redefine it to simply gobble its argument, we're done. \documentclass{report} \makeatletter \newcommand{\unchapter}[1]{% \begingroup ...

1

You can make \printpartitle to remember the current part title. I added also an interface for resetting the title to nothing. \documentclass{memoir} \usepackage{calc,graphicx} \usepackage{color} \definecolor{nicered}{rgb}{.647,.129,.149} \makeatletter \newlength\dlf@normtxtw \setlength\dlf@normtxtw{\textwidth} \def\myhelvetfont{\def\sfdefault{mdput}} ...

2

\clearpage\section{zzz} will force a new page and flush all floating images before starting the next section

2

use \begin{figure}[!htb] With ! it will ignore the restriction for placing floats

2

The main reason here is that titlesec just handles \parts differently to all other sectional units within a document. It sets up a separate handler to manage the titles and ToC-related entries, always writing the latter for \part. As such, your "after code" which adds the ToC-related entry for \part is followed by titlesec writing it as well, hence the dual ...

4


3

I began by reducing your code to something closer to a minimal working example (MWE): \documentclass{amsart} \usepackage[toc,section=section]{glossaries} \newcommand{\dictentry}[2]{% \newglossaryentry{#1}{name=#1,description={#2}}% \glslink{#1}{}% } \makeglossaries \glossarystyle{long3col} \setlength{\glsdescwidth}{0.6\textwidth} ...

6

You can use the resume option of the enumitem package. You also have the concept of a series of enumerate environment, that share a common formatting. \documentclass[12pt, a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{ulem} \usepackage[shortlabels]{enumitem} \begin{document} \setcounter{section}{1} ...

1

First approach Well, this MWE works for me: \documentclass{memoir} \usepackage{epigraph} \usepackage{lipsum} \begin{document} \frontmatter \chapter{preface} \section{title} \lipsum \clearpage \pagestyle{plain} \epigraph{text}{source} \mainmatter \chapter{main chapter} \lipsum \end{document} But I'm not sure if you ...

1

Actually I've found a way to solve this problem in package or class. Using \titleformat in \AtBeginDocument is useless, but the etoolbox has the \AfterEndPreamble{} macro which runs at the very end of the \begin{document}. Putting \titleformat into that makes titlesec work.

1

With minitoc package and the macros \doparttoc and \partdoc (in place where it should appear), this can be easily achieved: \documentclass{memoir} \usepackage{minitoc}% \doparttoc% Prepare minitoc package for part tocs usage \begin{document} \tableofcontents \part{Part ONE} \parttoc % Enable for the first part \chapter{Chapter ONE of PART ONE} ...

2

Rather than using \addtocounter{section}{1} use \refstepcounter{section} This increments the section counter by 1 and tells latex that the next reference created by \label{...} should refer to this counter. Also, if you want the second numbers to always be in \Roman then you should use: \renewcommand\thesection{\Roman{section}} So now your section ...

4

Very likely you are using the wrong class. Nevertheless, \cleardoublepage can be added before each \section. Also class option twoside needs to be set: \documentclass[twoside]{article} \usepackage{etoolbox} \pretocmd\section{\cleardoublepage}{}% {\errmessage{Patching \noexpand\section failed}} \begin{document} \tableofcontents \section{Number 1} Some ...

1

How about more simple solution which evades the usage complicated tikz codes? Well, it is no TeXer masterclass, however if you want save your time, try this workaround: Draw your fancy page in Microsoft Word for example, and save file as PDF, JPG or PNG. Insert it as picture in your TeX-doc. For a4paper, the code will be... \cleardoublepage ...

3

You can temporarily switch off the impact of a \clearpage - typically inserted when using \chapter: \documentclass{report} \usepackage{lipsum} \begin{document} \chapter{A chapter} \lipsum[1] { \cleardoublepage% Move to first page of new chapter \let\clearpage\relax% Don't allow page break \noindent\lipsum[2] \chapter{Another chapter} } \lipsum[1] ...

1

Easiest would be to let \chapter be equivalent to \section: \begingroup \let\chapter\section% Make \chapter equivalent to \section \listofalgorithms \endgroup The \chapter update is temporary until \listofalgorithms is complete.

2

Within your aghdpl.cls class file, you'll see that chapters are set using a font size \LARGE (line 191-192): \titleformat{\chapter}[block] {\bfseries\LARGE}{\filright \LARGE\thechapter. }{0ex}{} However, ToC-related entries are set using only \Large (line 209): \renewcommand{\cfttoctitlefont}{\bfseries\Large} Since \lstlistoflistings is set just like ...

2

Change the \@sect macro in latex.ltx for %%%% %%%%%%% \def\@sect#1#2#3#4#5#6[#7]#8{% \xdef\sectionname{#8}% we change only here. %\xdef\leftmark{#8} \ifnum #2>\c@secnumdepth \let\@svsec\@empty \else \refstepcounter{#1}% \protected@edef\@svsec{\@seccntformat{#1}\relax}% \fi \@tempskipa #5\relax \ifdim \@tempskipa>\z@ ...

4

Some thing like this? \titleformat{\chapter}[display] {\filcenter\normalfont\Large\bfseries} {\MakeUppercase{\chaptertitlename}\ \thechapter} {20pt} {} \titlespacing*{\chapter}{0pt}{0.7in}{20pt} I didn't understand double space to some extent. I have used 20pt, but you may use \baselineskip instead of 20pt. ...

1

Have a look at section 8.2.4 of the beamer manual which says: Inside this template, the following inserts are useful: \insertslidenavigationsymbol Inserts the slide navigation symbols, that is, the slide symbols (a rectangle) together with arrows to the left and right that are hyperlinked. \insertframenavigationsymbol Inserts the frame ...

4

Teach memoir to use single spacing in titles: \documentclass[12pt,a4paper,onecolumn,twoside,final]{memoir} \usepackage[english]{babel} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{newcent} \usepackage[utf8]{inputenc} \usepackage[textwidth=14cm,textheight=22cm]{geometry} \usepackage{etoolbox} \usepackage{color} % just for the example ...

0

Use a tex file for each figures details and insert using \input{figdetails} at the correct point in the text. Add the package endfloat at the start of the document.

2

Define a new theorem environment. \documentclass{book} \usepackage{amsthm} \newtheorem{thm}{Theorem}[section] \theoremstyle{definition} \newtheorem{interthm}[thm]{\ignorespaces}% theorem label is empty \begin{document} \chapter{A class of groups} Let $G$ be a finite group. \section{A class of subgroups} Let $H$ be a subgroup of $G$. ...

1

This provides an environment called \intertheoremremark similar to paragraph (which is not an environment at all, of course), just with a subsection like label and a bold font heading leadin. \label works for this. This uses the assoccnt package, which provides a master counter, driving other counters, when stepped, in this case, the mytheorem counter. ...

1

Another way is to use the scrbook class and then use the macros \frontmatter, \mainmatter, \backmatter. If you use the first one just before the \begin{document} line then you can use easily chapters without troubles for add them at the toc. Something like this: \documentclass[]{scrbook} \usepackage[]{} \usepackage[]{} \usepackage[]{} . . . ...

Top 50 recent answers are included