New answers tagged

5

First, you have a syntax error in the \patchcmd line, because you're missing a brace pair: \patchcmd{<macro>}{<search>}{<replace>}{<success>}{<failure>} This has no consequences in this case, because the patch fails, so \begin that was absorbed as the fifth argument is delivered because of the failure. Main reason: the ...


11

With a KOMA-Script class you can use \RedeclareSectionCommand to set style=section for the chapter headings. So there is no need to patch anything. \documentclass{scrbook}[2015/10/03] \RedeclareSectionCommand[ style=section, indent=0pt ]{chapter} \begin{document} \chapter{Preliminary} first chapter \chapter{Discussion} second chapter ...


6

Here is a solution. One need to patch \scr@startchapter \documentclass{scrbook} \usepackage{etoolbox} \makeatletter \if@openright \patchcmd{\scr@startchapter}{\cleardoublepage}{}{}{} \else \patchcmd{\scr@startchapter}{\clearpage}{}{}{} \fi \makeatother \begin{document} \chapter{Preliminary} first chapter \chapter{Discussion} second chapter ...


1

tcolorbox has to insert certain code (including the before skip) before the remaining height can be calculated. Here, the inserted skip apperently is not removed automatically. I can offer the following 'hotfix' which inserts a negative skip at the \pagebreak. Currently, I have not the time to investigate possible negative impacts of this patch further, but ...


0

I followed the advise to use tcolorbox and came up with this solution, it works flawlessly: \tcbuselibrary{skins} \tcbuselibrary{breakable} \newtcolorbox{coloredframe}[3][]{ empty, breakable=true, sharp corners=all, top=4mm, left=4mm, borderline west={1.5pt}{0pt}{#3}, borderline north={1.5pt}{0pt}{#3}, attach boxed title to top ...


2

You did not do anything wrong, it is a (documented) deficiency of TeX or a bug in hyperref depending how you like to look at it. If you replace hyperrefby the url package in your example the pages comes out as expected. So what happens? hyperref adds a lot of \pdfdest commands into the page one of which is \pdfdest name{section.<number>} xyz as part ...


1

You can probably arrange to store each page in a box instead of shipping it out, and then sorting the boxes at the end, something like this: \documentclass[openany]{scrbook} \newcount\zzz \newif\ifdone \let\zzshipout\shipout \makeatletter \def\shipout\vbox#1{% \edef\x{\noexpand\typeout{page \thepage\space is box \the\zzz}}\x \global\setbox\zzz\vbox{#1}% ...


3

You can use R rather than r and then wrapfig will allow the figure to float to a certain extent to avoid falling off the end of a page.


2

The error occurs because of the way that the align environment processes the material in its scope: LaTeX is set to look ahead for the hard-coded string \end{align}, at which point processing of the material in the align environment begins in earnest. With your definitions of the SPalignX environments, after \begin{align} LaTeX will eventually come across ...


1

I suppose one hackish way might be along these lines: \newlength\cvleftbibindent \setlength{\cvleftbibindent}{\dimexpr \cvleftwidth + \bibindent\relax} \newcommand{\xpublist}[2]{% \begin{sloppypar}% as in original \begin{refsection} \nocite{#2} \renewcommand{\bibfont}{\mystyle[cvstoryshort]}% \defbibenvironment{bibliography} ...


0

One could also extent David's solution by adding a \nopagebreak between the table and the figure: \documentclass[a4paper, 11pt]{article} \begin{document} \input{small_table} \nopagebreak \begin{figure}[htp] \includegraphics{piechart.eps} \end{figure} \end{document} You can also specify an optional value between 0 and 4 to \nopagebreak. The higher ...


3

\include _always forces a page break, use \input, and then allow the figure to be on the same page by including h in its option. \documentclass[a4paper, 11pt]{article} \begin{document} \input{small_table} \begin{figure}[htp] \includegraphics{piechart.eps} \end{figure} \end{document}


1

\closing does two things that affect the following text in this case, firstly it adds 6\baselineskip of white space before the signature line (for you to sign by hand, presumably) in this case this happens to make page breaking mid-paragraph in the following text unlikely, just as it happens to fall, so in the example below I shortened the paragraph to ...


15

Headers and footers are added after TeX has decided it wants to do a page break, so the fact that they are empty or not is completely irrelevant. A page must have something non discardable in it (a box, a rule, a whatsit), because discardable items (glue, penalties, kerns) are discarded at a page break. So doing \newpage\newpage does not produce a blank ...


1

I did the best I could with no MWE. \documentclass{article} \usepackage{mathtools} \usepackage{showframe} \begin{document} \rule{1pt}{41\baselineskip} Let $P=(x_P, y_P, z_P)$ be a fixed point on the plane, $R$ a fixed length, and $X=(x,y,z)$ a variable point such that $XP=R$. As $X$ varies, it is obvious that it does so along a circle. Obviously, we ...


4

I created the following 10-page lipsum: \documentclass{article} \usepackage{lipsum} \pagestyle{empty} \begin{document} \sloppy \vspace*{5cm} \begin{center} \bfseries This is \verb|lipsum[1-50]| \end{center} \lipsum[1-50] \end{document} This is how I would include it in the way you may be after (which avoids a page-break: \documentclass{article} ...



Top 50 recent answers are included