New answers tagged

2

You can change the goal height of the tabular before the problematic line. This will force an earlier page break: \documentclass[a4paper,12pt]{book} \usepackage{helvet} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais]{babel} \usepackage{supertabular} \usepackage{lipsum} \begin{document} \newcounter{MyCounter} \lipsum[1] ...


0

You can use afterpage to perform some magic between page shipouts: \documentclass{article} \usepackage{graphicx,float} \usepackage{afterpage} \usepackage{showframe,lipsum}% Just for this example \begin{document} \section{First section}\lipsum[1-3] \afterpage{ \begin{figure}[H] \centering \includegraphics[width=.8\textwidth,height=.8\...


3

Add the twoside parameter. One a one-sided document, which is the default for the report-class, leaving empty pages would just be confusing. Code \documentclass[12pt,a4paper,twoside]{report} \usepackage{lipsum} \begin{document} \cleardoublepage \lipsum[1] \cleardoublepage \lipsum[2] \cleardoublepage \lipsum[3] \cleardoublepage \end{document}


0

Using \cleardoublepage will here fill in a blank page. It ensures that the next content, whatever it might be, is on the rightside, unless the openleft-option is given. Full Code \documentclass[a4paper, twoside, 11pt]{report} %irrelevant stuff \begin{document} \begin{titlepage} some nonsense \end{titlepage} \cleardoublepage \begin{titlepage} ...


2

This is an old topic but as I'm releasing a new version of boiboites I hope it's appropriate to dig it up. You can now use xeboiboites to draw your boxes over multiple pages. Plus, you can control the style of the edges that "break" from one page to another. For example, you can achieve this: It's a work in progress but seems stable, you can check ...


4

Probably there's a much more elegant tcolorbox solution, but you could always 'freelance' the frame as well: \documentclass{article} \usepackage{lipsum} \usepackage[skins,breakable]{tcolorbox} \begin{document} % Example taken from Thomas F. Sturm Manual for version 3.93 p. 346 % Problem: After a break, The style of the boxed title is lost % Christian ...


6

This uses a 'tricky' overlay approach, setting explicitly another tcolorbox as the box title for the broken parts of the box. The extras middle and last= option is meant to add features to the 'middle' and 'last' box parts, i.e. the ones after breaking the box. \documentclass{article} \usepackage{lipsum}% \usepackage[all]{tcolorbox}% \begin{document} \...


6

The first part of Werner’s answer won’t work if the sender’s address is also specified (with the \address declaration). In my opinion, it is more robust to patch the \opening command: \documentclass[a4paper]{letter} % To avoid confusion, let me explicitly declare % the paer size. \usepackage[T1]{fontenc} % Unrelated to ...


4

My assumption here is that you want to use some letter-head that is already on a piece of paper... If you really want what you're after and insist on using the letter class, then you'll have to use a hack. To replicate your output with the top margin on the first page 0.5" bigger than the rest, add \vspace*{0.5in} as part of a new \date declaration... even ...


4

The flowfram package has no problem changing margins between pages. OTOH, it only defines the text area. \documentclass{article} \usepackage{lipsum} \usepackage[margin=1.5in,showframe]{geometry} \usepackage{flowfram} \newflowframe[1]{\textwidth}{\dimexpr \textheight-0.5in}{0pt}{0pt} \begin{document} \lipsum[1-7] \end{document}


0

Fundamentally this is similar to Start new chapter on same page as you want to avoid a page break between chapters, with the addition of APPENDIX before the first chapter. One could use \begin{appendices} \cleardoublepage% ...or \clearpage if you're not using the twoside option \let\clearpage\relax \noindent{\huge\bfseries APPENDIX\par} \input{appendix-...


3

As is often the case all errors shown after the first are essentially spurious, the error is \label{xxx}\caption{..} which should be \caption{....\label{..}} \label always needs to be after the \caption if it is to label the correct value, but in tables it is particularly bad to use this form as you get an error not just the wrong value, as the label ...


2

Here's a way to avoid page breaks in the whole object: \documentclass[12pt]{article} \usepackage[a5paper]{geometry} \usepackage{fontspec} \usepackage{microtype} \usepackage{multicol} \usepackage[defaultlines=2,all]{nowidow} \usepackage{ragged2e} \usepackage{lipsum} \usepackage{enumitem} \usepackage{parskip} \newcommand{\indexClass}[1]{\index{#1}} \...


1

Two Answers 1- For Short Lists Using a \vtop box: \documentclass[12pt]{article} \usepackage[a5paper]{geometry} \usepackage{fontspec} \usepackage{microtype} \usepackage{multicol} \usepackage[defaultlines=2,all]{nowidow} \usepackage{ragged2e} \usepackage{lipsum} \usepackage{enumitem} \usepackage{parskip} \tolerance=1000 \makeatletter \newcommand{\...


4

\documentclass{article} \usepackage[many]{tcolorbox} \usepackage{pgffor} \begin{document} \begin{tcolorbox}[breakable] blblbllb \foreach\x in {1,2,...,60} {\strut\par} blbll \end{tcolorbox} \end{document}


0

Simple solution this was answered here but with mdframed. Style can be tweaked as required. Slightly edited. \documentclass{article} \usepackage{blindtext} \usepackage{xcolor} \usepackage[style=1,leftmargin=0pt,rightmargin=0pt]{mdframed} \makeatletter \newenvironment{boxtype1}{% \begin{mdframed}% [linewidth=.5,backgroundcolor=gray!20,linecolor=black,...


0

Adapting the solution by @Konrad Rudolph to something that is simple and doesn't break anything: \inputminted[linenos]{python}{code.py} \begin{figure}[H] \caption{Hello.} \label{fig:foo} \end{figure} Of course, this is going to be named and listed as a Figure, but that's not a problem for me.


1

The following myItem environment redefines \includegraphics to place the image centred. As such, you can place content before or after the image and they will be justified as set previously. \documentclass[twoside,openright,12pt]{report} \usepackage{graphicx} \newenvironment{myItem}{% \item% \let\oldincludegraphics\includegraphics \...


2

Since the environment myItem effectively starts with the center environment, anything written after \begin{myItem} deliberately is centered (unless shifted additionally). I suggest to use an (optional) argument for the description text, this way the description text will be given to \item #1 first and then the centering occurs. \documentclass[twoside,...



Top 50 recent answers are included