Tag Info

New answers tagged

6

Simple? \documentclass{report} \usepackage{kantlipsum} \usepackage{atbegshi} \AtBeginShipout{% \ifodd\value{page} \null\clearpage \else \relax \fi } \begin{document} \kant[1-40] \end{document}


6

The following patch can be used for tcolorbox version 3.32 and prior. It is incorporated in tcolorbox version 3.33 (2014/12/11) and higher. To revert to the old behavior before 3.33, the option ignore nobreak can be applied. As I wrote in my comments, I fear that there is no global solution for the problem. But I experimented with a patch which might be ...


4

longtable is not a floating environment. You can however delay starting the table using afterpage. \begin{filecontents}{\jobname.lt1} \begin{longtable}{l l l} \caption{Test longtable.} \label{tab:1} \\ % Here are our column headings \hline \hline Header1 & Header2 & Header3 \\ \hline \endfirsthead % Here is the caption ...


0

You could use the minipage environment, which ensures that everything contained in itself is held together, and, if there is no more room for it, in its entirety, to fit, then it moves itself to the next page where it should have ample room to display (it's only six lines, so it shouldn't have to span multiple pages). \documentclass[a4paper]{article} ...


1

I had a similar problem where a the caption and maybe one line of code would appear at the end of one page and the rest of the code on the next one. What helped me was the needspace package. Its not quite perfect, as I have to set the command in front of every \lstlisting that is broken at the wrong place but its all right for a quick n dirty solution. % ...


2

(Without knowing much about your cell contents), You can use ltablex package and convert your long table in to breakable tabularx. Here one can use X column type that will be evenly wider. \documentclass[]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pdflscape} \usepackage{tabularx} \usepackage{ltablex} % uncommenting this line ...


1

You can use the everyline=true option so that all parts of the mdframed get the whole frame. Using middleextra and secondextra, you can add material for the continuing parts of the mdframed. In the example below I added "Excursus (Cont.)" at the upper left part of the frame in the continuation parts. The code: \documentclass{article} ...


1

As I wrote in a comment I would use different approach in general. So, even though your own anwer is working, I add this solution for completeness: \documentclass[twoside,twocolumn,letterpaper,11pt]{book} \usepackage[T1]{fontenc} \usepackage{ebgaramond} \usepackage{lipsum} \usepackage{fixltx2e} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} ...


4

\showoutput will cause the information you want to be put in the log file, getting the information in tex might be harder (unless you use luatex) but it depends what form you want the information.


2

The book document class issues openright by default, which means that \chapter pages will start on a recto (right) page (typically an odd numbered page): Therefore, it may be that some chapters end without a blank page while others end with one, depending on whether the subsequent page is recto or verso. If you wish to always have a blank page before a ...


0

If the biblatex package is used to produce the bibliography, you can also use one of the predefined headings, i.e. subbibliography You can refer to section 3.6.8 Bibliography Headings and Environments in the biblatex manual.


0

Thank you for your answer David Carlisle. In the end I used the longtabu environment. Here is the code: \begin{longtabu} to \textwidth{p{4cm}Xp{1.5cm}} \caption{Overview of Key Variables\label{tab:variables}}\\ \toprule Variable & Question& Scale\\ \midrule \endfirsthead \caption[]{Overview of Key Variables (continued)}\\ \toprule Variable & ...


0

\documentclass[10pt,a4paper]{scrreprt} \usepackage[utf8]{inputenc} \usepackage{longtable} \usepackage{booktabs} \usepackage{eurosym} \begin{document} \begin{longtable}{@{}p{4cm}p{\dimexpr\textwidth-5.5cm-4\tabcolsep}p{1.5cm}@{}} \caption{Overview of Key Variables\label{tab:variables}}\\ \toprule Variable & Question& Scale\\ \midrule \endfirsthead ...


1

Do not use the float option. A caption is also possible without it: \begin{lstlisting}[frame=single, caption=foo] Long listing start. ... \end{lstlisting}


1

The short answer is: You cannot suppress hyphenation at a page break in the usual TeX formats (plain, latex, context). You can discourage a page break at a hyphenated line (\brokenpenalty does this). Somewhat longer explanation: TeX breaks paragraphs into lines. The lines are than broken into pages without touching the line breaks again. So you can shift ...


5

\\* adds a penalty of 100000 (infinite) to break at that point but if something else allows breaking, or there is no other choice, it can be overridden. in this case the vertical list looks like ....\glue(\rightskip) 0.0 ...\penalty 10000 ...\penalty 150 ...\glue(\baselineskip) 5.05556 so immediately after the 10000 is a widow penalty of 150 which is ...


1

What happens in your case is a simple page break within paragraph. This is not optimal, however, if the whole paragraph is moved to the next page the first one would be too empty (and thus get a penality). What you could do to fix this in your case is to set the penality for the single line on the next page to a large number, cf. How do I prevent widow or ...


3

With a bit of care you can set the float placement parameters to prevent floats within the region, here I set totalnumber to 0. It is a global setting so you need to explicitly set it back at the end, you can not use a group to restore things. Also because of its global nature and the timing of the page breaking sometimes a bit of care needs to be taken into ...



Top 50 recent answers are included