Hot answers tagged

5

Like this? \documentclass{report} \usepackage[T1]{fontenc} \usepackage{blindtext, array, color} \definecolor{gray75}{gray}{0.75} \newcommand{\hsp}{\hspace{20pt}} \usepackage[explicit]{titlesec} \titleformat{\chapter}[hang]{\Huge\bfseries}{\color{gray75}\thechapter}{20pt}{\begin{tabular}[t]{@{\color{gray75}\vrule width 2pt}>{\hsp}l}#1\end{tabular}} ...


4

Use \addtocontents{toc}{Your title\protect\par}, this will add a similar line. I leave the font settings to the choice of the O.P. \documentclass{book} \usepackage[toc]{appendix} \begin{document} \tableofcontents \addtocontents{toc}{\protect\Huge\bfseries Chapters\protect\par} \chapter{First} \chapter{Second} \begin{appendices} \chapter{Appendix ...


3

Explanation ADDED. Here, I add the macro \barbox as the last thing to do in \titleformat. Then I have to write \barbox, which takes one argument (the chapter header text). What I do is place the chapter-header text into a box named \theCT. The box is a top-aligned \parbox whose width was empirically determined as 55pt less than the document's text width. ...


3

I do not really understand want you want to do and version 3.12 is really old. My oldest version for testing is 3.16, current version on CTAN is 3.19a. But you have to change the font element chapter to get it visible on the black background. To shift it up use a negative value for \vspace*. \documentclass{scrbook} \usepackage{lmodern}% <- added ...


2

You can formate the stared chapters with \titleformat{name=\chapter,numberless}[display]{...}{...}. Of course you will have to change the following example, as \thechapter does not make sense for starred chapters. \documentclass[a4paper, 11pt]{report} \usepackage{xcolor} \definecolor{dtured}{RGB}{153,0,0} \definecolor{dtugray}{RGB}{153,153,153} ...


2

Minimizing the code to what is necessary and removing strange font selections (in particular I removed \scshape that's not available for most sans serif fonts). Since you call titlesec with the explicit option, the chapter title is available as #1, not as \chaptertitlename. In your case you have to use ##1 as you're placing the code in a macro definition ...


2

Here is a solution. In the example i used english and french but it is same. The idea is \makeatletter \renewcommand{\thechapter}{% \ifodd\c@chapter \@roman\numexpr(\c@chapter+1)/2\relax% %roman just for the example \else \@arabic\numexpr\c@chapter/2\relax% %arabic just for the example \fi} \makeatother MWE \documentclass{book} ...


1

Regarding labels for equation and sections, I am able to mostly solve the issue by adapting the answer found at Using custom \locallabels command with custom \eqref command. Minor work is still required for inter-chapter cross-referencing, but as stated in the question, that seldom occurs in this case. However, this does not fix the citation issue, which is ...


1

I did not found this library inside the MiKTeX Package manager. But you always can do the following: visit the page and copy the two files tikzlibraryqrr.shapes.openrectangle.code.tex and pgflibraryqrr.shapes.openrectangle.code.tex into the same directory you have your code, let's say mwe.tex. Then just compile. With my current MiKTeX I got no error, ...


1

For example, use \counterwithout{section}{chapter} to remove chapter counter output in front of the section number (this does remove the section counter also from the reset list!) Later on, it's possible to use \counterwithin{section}{chapter} to restore the usual setup. \documentclass{book} \usepackage{chngcntr} \begin{document} \chapter{First} ...


1

Use either sectsty or titlesec to change the layout of the section headings. Here is a suggestion using sectsty. \documentclass[12pt]{report} \usepackage{geometry} \geometry{letterpaper, left=1.25in, right=1.0 in, top=1.0in, bottom=1.0in, includefoot} \usepackage[T1]{fontenc} \usepackage{indentfirst} \usepackage{sectsty} ...


1

Something like this? Obviously you may wish to tweak the sizing etc. I've assumed that you may have a double-digit number of chapter and that it would be good for the line and title on the right to occupy the same width regardless. If you have fewer than 10 chapters, you might consider changing 99 to 9 in the code which calculates the relevant widths. ...


1

I propose this variant: \documentclass{book} \usepackage[explicit]{titlesec} \usepackage{graphicx} \usepackage[tracking=true]{microtype} \usepackage{lipsum}% just to generate text for the example \titleformat{\chapter}[block] {\SetTracking[no ligatures = {f}]{encoding = *}{40}}% ...


1

Well, I'm not sure, if you want to have that automatically or not. Because only the chapter headings have to changed if needed you can use for example the command \mbox{...}. Command \mbox disallows an hyphenation of the included word .... Another possibility could be just to add \\, but the you can get a problem with your table of content or headers, ...



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