Tag Info

Hot answers tagged

6

Here is what you want Theorem's label \renewcommand{\thetheorem}{\arabic{section}.\arabic{theorem}} LaTex uses a prefix \p@counter for cross-referencing i.e. a reference to a theorem produce \p@theorem\thetheorem in this case \p@theorem= null inside chapter and \p@theorem=chapter number outside. \p@theorem=\ifnum\thechapter=chapter of ...


4

All the hard work is done by Gonzalo already. You have to just change the part to chap and PART to SOLUTION in his code. \documentclass{book} \usepackage{fourier}% change to lmodern if fourier is no available \usepackage{tikz} \usepackage[explicit]{titlesec} \definecolor{mybluei}{RGB}{0,173,239} \definecolor{myblueii}{RGB}{63,200,244} ...


4

tcolorbox boxes have vertical spacings above and below the box. This can be switched off using nobeforeafter option. The additional space after the box is due to \titleformat etc. Use \titlespacing to set the vertical spacing after the chapter title to, say, \baselineskip -- this is the last parameter of \titlespacing. I additionally wrapped a command ...


4

Extending touhami's idea, but making it work also for nonstandard chapter numbers (like for theorems in an appendix), I make \p@theorem expand to \compare@theorem{\thetheorem}, where \compare@theorem is a protected macro; thus only \thetheorem is expanded when writing to the .aux file. The macro \compare@theorem uses \pdfstrcmp (under the abstraction ...


3

The following solution weighs way more than the rather clever approach of @touhami; in exchange you gain more flexibility regarding changes to the theorem interface. How to use it: After defining a new theorem environment using \newtheorem you can use the new command \theoremnum to specify a numbering that is indipendent from the reference mechanism. (The ...


3

You have defined the format for numbered chapters and using an un-numbered chapter for Abstract. Defining the format for un-numbered chapters too is needed in this case to get a rule. \documentclass[11pt,oneside]{book} \usepackage{titlesec} % Below "\section" can be replaced with "\subsection" and "\subsubsection" % in order to customize the corresponding ...


2

The following issues deal with hyperref: In \protect{CHAPTER } only the open curly brace { is protected, because \protect only acts on the next token (not a group of tokens). Anyway, the ugly prefix CHAPTER wastes valuable space in the bookmarks, thus I had changed it to \texorpdfstring{CHAPTER }{}. \MakeUppercase does not work in bookmarks, replaced by ...


2

Without information about the documentclass you are using or the type of document you are writing, I wrote a quite "basic" answer. This can be easily achieved with the fancyhdr package; the default style is: \fancypagestyle{DefaultStyle}{% \fancyhead{} %Clean headers \fancyhead[RO]{\slshape \leftmark} \fancyhead[LE]{\slshape \leftmark} ...


2

Below I've updated \chapter (thanks to xparse) to change the page style for only the first page of the chapter. The new page style - called chapter - can be updated to whatever you like using the regular fancyhdr styling. For example, the following removes all traces of it - both the header and the footer, as well as the rules: \fancypagestyle{chapter}{% ...


1

The class scrreprt from the KOMA bundle provides a macro \setpartpreamble which allows you to put an abstract under the part title, as in \setpartpreamble{% \begin{abstract} Some text. \end{abstract}} \part{Whatever} Furthermore, if you give the class option abstract=true then the abstract will be preceded by the word "Abstract" (or whatever the content ...


1

You are using refsection=chapter. Within a chapter, therefore, you get the references for only that chapter. The bibliography you print here is for chapter 2. But there are no references for chapter 2 because nothing is cited. Hence, there is no bibliography to print. Add the commands you want to the first chapter, rather than the second. ...


1

There is a KOMA option to insert all chapters in all lists: chapteratlists=entry (or chapteratlists or listof=chapterentry) If the chapter page numbers should not be shown in the list of figures (lof) you can use \AfterTOCHead[lof]{\addtokomafont{chapterentrypagenumber}{\nullfont}}. Code: ...



Only top voted, non community-wiki answers of a minimum length are eligible