Hot answers tagged

11

In order to avoid page breaks between a section title and the following text, LaTeX sets some parameter temporarily. It also sets \clubpenalty to 10000 in the paragraph following the section title; this is done via \everypar, which will contain something similar to \clubpenalty10000 \everypar{\clubpenalty=\@clubpenalty \everypar{}} so that at the next ...


6

Is the use bibtex mandatory? If not, you can use biblatex which allows to print arbitrary text at the beginning of the bibliography using the optional prenote option of the \printbibliography command. \documentclass{book} \usepackage{biblatex} \addbibresource{Bibliography} \defbibnote{wittyquote}{<your code here>} \begin{document} \cite{<cite ...


6

Because you didn't tell us your used document class I can only guess. Depending on the used document class and that it seems you want to use BibTeX there are two possibilities: You can use package natbib. Then you can use command \bibpreamble. Please see the following MWE-1. If you use KOMA-Script, for example class scrartcl, you can use the KOMA-Sript ...


6

I don't know any, but this should work: \newcount\ipp \ipp=0 \newcount\numberOfPages \numberOfPages=10 % or else; never 0!!! \loop \newpage \mbox{} \advance\ipp by1 \ifnum\ipp<\numberOfPages\repeat If you package it into a newcommand, it looks like this: \newcommand{\fillInPages}[1]{ \newcount\ipp \ipp=0 \newcount\numberOfPages \numberOfPages=#1 ...


6

Here another possibility using a recusrion: \documentclass{article} \usepackage{lipsum} \makeatletter \newcommand\blankpage[1][1]{% \ifnum#1<0\else \@tempcnta#1 \@tempcntb\z@ \bl@nkpage \fi } \newcommand\bl@nkpage{% \bl@nkp@ge \advance\@tempcntb\@ne \ifnum\@tempcntb<\@tempcnta \bl@nkpage \fi } ...


6

With xparse we can use \prg_replicate:nn \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\blankpages}{O{}m} { \clearpage \prg_replicate:nn { #2 } { #1 \mbox{} \clearpage } } \ExplSyntaxOff \begin{document} % ten blank pages with page number \blankpages{10} % four really blank pages ...


4

Users of ConTeXt can use a combination of the \page and \dorecurse commands to insert a certain number of empty pages. When the page should be empty without headers and footers the empty keyword can be used as argument for the \page command. \starttext \dorecurse{10}{\page[empty]} \stoptext When the empty pages should contain the header and footer texts ...


3

Speaking of scaling an image to fit the remaining page... (Needs to run twice.) \documentclass{article} \usepackage{mwe} \usepackage{lipsum} \usepackage{tikzpagenodes} \usepackage{showframe} \newlength{\maxheight} \newcommand{\maxgraphics}[1]% #1 = filename {\settoheight{\maxheight}{\includegraphics[width=\columnwidth]{#1}}% \tikz[remember picture]{% ...


2

Here is a way to achieve what you want... Use \addtocounter{algocf}{-1} to reduce the Algorithm counter before setting a countinued algorithm. Use \strut as part of the caption to ensure that they present at a similar height if you want to avoid a "jumping" effect when skipping between pages. Mark the end of an algorithm with a \label that you can use to ...


2

Imho you are looking for the overlay unbroken and first key: \documentclass{article} \usepackage[left=60pt,top=60pt,right=60pt,bottom=60pt]{geometry} \usepackage{xcolor} \usepackage{lipsum} \usepackage{kantlipsum} \usepackage{enumitem} \usepackage[many]{tcolorbox} \setitemize{nolistsep,labelsep=1ex,leftmargin=*} %% colors--- ...


2

\documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{breakable} \usepackage{lipsum} \newcounter{theoInt} \newcommand\numtheo{\stepcounter{theoInt}\arabic{theoInt}} \newenvironment{cframed} {\begin{tcolorbox}[breakable,% colback=gray!6,titlerule=0pt, title after break=\emph{Theorem \numtheo{} cont.}, colbacktitle=white, ...


2

\documentclass{article} \usepackage[paperwidth=12cm,paperheight=10cm]{geometry}%for testing purposes \usepackage{amsthm} \usepackage{thmtools} \usepackage{tcolorbox} \tcbuselibrary{breakable} \usepackage{lipsum} \makeatletter \declaretheoremstyle[ headfont=\normalfont\bfseries, notefont=\mdseries, notebraces={(}{)}, bodyfont=\normalfont, ...


2

For the sake of completeness, I am answering the question myself, but credit goes to percusse, who posted the solution in the comments above (4 weeks ago). The drawing commands have to be put inside the equation environment, e.g. \begin{equation} J = \tikzmmark{mb}{J_2} \begin{tikzpicture}[<-,overlay,remember picture,inner sep=1.5pt,shorten ...


2

The best without further information you can achieve is to use enforce breakable, but as the manual of tcolorbox states: \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{lipsum} \begin{document} \begin{tcolorbox}[breakable, enhanced] \lipsum[1-6] \begin{tcolorbox}[enforce breakable, enhanced] ...


1

Your problem is that you need to change the values of different penaltys to 10000 (not allowed). The easierst way to do that is to patch the relevant commands with package etoolbox and the command \patchcmd{\command-to-be-patched}{search-code}{replace-code}{sucess}{failure} (please see the comments!): \usepackage{etoolbox} % ...


1

I derived an answer from TikZ to non-PDF % blah.tex \documentclass[convert]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {ok}; \end{tikzpicture} \end{document} [convert] option to standalone class requires convert from ImageMagick and -shell-escape option to be passed to pdflatex.


1

The immediate problem is caused by the global redefinition \topskip0pt which, apart from anything else, geometry knows nothing about. Removing this removes the additional pages. Wrapping the title page code in titlepage also works because it limits the scope of the setting. I would recommend something like this: \begin{titlepage} \vspace*{\fill} ...



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