Tag Info

Hot answers tagged

19

this was addressed by Knuth in a q&a session in st. petersburg, florida, published in tugboat: - TUG'95: Questions and Answers with Prof. Donald E. Knuth, pp.18 (bottom of column 2) - 20; the session was republished in Digital Typography, with the relevant question starting on p.594. the page-breaking problem was also the subject of Michael Plass' ...


10

Leaders help because they vanish at the top of the page, e.g.: \documentclass{article} \usepackage{lipsum} \newenvironment{feature}[1]{% \par \cleaders\vbox to 2\baselineskip{% \vss \hrule width\linewidth \vss }\vskip2\baselineskip \textbf{#1}\\ }{ \vspace*{\baselineskip} } \begin{document} %THIS CASE SHOULD HAVE ...


9

With the version 2.02 you need the following modification. I can think about a new implementation step to reduce the overlapping. \makeatletter \def\tcb@split@lower@box{% \vfuzz=\maxdimen\vbadness=10000% \setbox\tcb@lowerbox=\vsplit\tcb@totallowerbox to\tcb@split@dim% \setbox\tcb@lowerbox=\vbox{\unvbox\tcb@lowerbox}% ...


8

Just produce paragraphs, that don't disappear. In order to specify any dimension, just make many of them. \documentclass{article} \usepackage{lipsum} \newcommand{\answerspace}[2][n]{% \par\smallskip \begingroup \if#1r\hrule\fi \baselineskip=\dimexpr#2/100\relax \lineskip=0pt \parindent=0pt \count255=0 \loop\ifnum\count255<100 ...


7

Let try to answer the question using the package mdframed. (Github-version: https://github.com/marcodaniel/mdframed -- newer) The provided command \boxpar has the following syntax: \boxpar[<number of lines>]{Text}[<width of the box>] You can the the number and the width are optional. mdframed cant split across pages using a simple\vspace`. ...


6

Using inline math is so wrong for this (but I say same every time you post an example). However if you must, you must... \documentclass{article} \usepackage[a6paper,vmargin=15mm,hmargin=5mm]{geometry} \usepackage{times} \usepackage{helvet} \usepackage{courier} \usepackage[T1]{fontenc} \usepackage{mathtools} \allowdisplaybreaks \usepackage{tcolorbox} ...


6

Remove the \vrule\strut\hfill\vrule If you don't want the lines either side. \documentclass{article} \def\blanklines#1{% \ifnum#1>0 \par\noindent\mbox{}\vrule\strut\hfill\vrule\par% \expandafter\blanklines\expandafter{% \the\numexpr#1-1\expandafter\relax\expandafter}% \fi } \begin{document} stuff more stuff\par more stuff\par more stuff\par more ...


5

this removes \cmidrule at a page break. \documentclass{article} \usepackage{longtable,booktabs,lipsum,array} \usepackage{pgfplots} \newcommand{\sheaf}{\mathcal} \makeatletter \def\LT@output{% \ifnum\outputpenalty <-\@Mi \ifnum\outputpenalty > -\LT@end@pen \LT@err{floats and marginpars not allowed in a longtable}\@ehc \else ...


5

The point is that, aligned environment wraps its contents inside an unbreakable box. So, these commands (that is, both \displaybreak and \allowdisplaybreaks) do not have any effect. This is true of split, gathered and alignedat environments too. So, to get the line break to work, you might consider using align*, as suggested by egreg. You might want to ...


4

The simplest way: use the optional argument that the {multicols} environment has for exactly such purposes: \documentclass{article} \usepackage{lipsum} \usepackage{multicol} \newenvironment{mh}[1]{% \begin{multicols}{2}[\textbf{#1}]% }{%BODY \end{multicols}% } \begin{document} \vspace*{.89\textheight}% this page % \vspace*{.90\textheight}% next page ...


4

It is surely impossible to have all of the following conditions: No clubs/widows TeX must not change the paragraph Number of lines must be fixed Since TeX breaks paragraphs before looking at pages, it has no chance to redo 2). With LuaTeX you could probably cook your own automatic solution, but this is pretty much the opposite of 'trivial'. In PDFTeX ...


4

Change the default behaviour of scrbook for starting new chapters: \KOMAoptions{open=left}. Add something, that is not printed, like \mbox{}. Make sure the page number is not printed, too (pagestyle empty). Insert the page break. Reset the page counter to page 1. At end of \frontmatter, directly before \mainmatter (or in frontmatter directly before you ...


4

To draw such a frame you should use an other package which allows such modifications. The default packages are mdframed or tcolorbox. In the example below I provided a solution using tcolorbox whereby a new listings environment lstmcode is defined. Please note that I am using the version 2.22 for the example below. \documentclass{article} ...


4

Both maplelatex and maplemultiline put their contents in unbreakable vboxes. The former is changed by altering the definition of \endmaplelatex, replacing a \centerline by group containing a \centering command. The latter is changed by adjusting the definition of \@dumplinebuffer: \documentclass{article} ...


4

I am the author of tcolorbox and I have just uploaded version 2.22 to CTAN. This new version removed (some/most) of the addressed problems. "There are unwanted blank pages" I found the cause of the problem and (hopefully) eliminated it. Since the breaking of the upper part / lower part features of tcolorbox is sometimes a little bit tricky, I may have ...


4

With tocloft, the ToC, the LoT and the LoF don't start new pages when using document classes in which without the package they normally would do. If you want the lists to start a new page, you have two options: Manually issue a \cleardoblepage command. For example: \documentclass{book} \usepackage[titles]{tocloft} \begin{document} \tableofcontents ...


3

Too much code in your link to try, But You probably don't need needspace, just setting infinite (ie 10000) penalties after the title and (depending on style) the first rows of the music/poem ought to be enough as long as there is enough flexibility on the page to compensate for not breaking at that point. For example if \flushbottom is in effect. If every ...


3

To achieve your goals, your document structure should resemble: \documentclass[..,honors,etd,openany,..]{BYUPhys} \let\oldToC\tableofcontents \renewcommand{\tableofcontents}{{% Remove ToC entries \renewcommand{\addcontentsline}[3]{}\oldToC}} \let\oldmakepreliminarypages\makepreliminarypages \renewcommand{\makepreliminarypages}{{% Remove ToC entries ...


3

Here is my attempt. What I did: Passed the demo option to the article class, which shows a big black box instead of your png image (which I don't have access to). Used the [h] option for the figure, so that the figure wouldn't be moved to its own page. Adjusted \textfraction to 0.1, to stop large figures hijacking the entire page. This way, it is ...


3

You can use the needspace package to add a new page if there is not enough space for both the title and the content. Note: It would be better to provide MWE that actually reproduces the problem (as the one below does if you comment out the \needspace{3\baselineskip}. The MWE below will keep three lines together on the page, otherwise will go to a new ...


1

If you are longtable for all tables, then you also have the disadvantage that the tables do not float. If a short table is broken across pages this also means, that the table does not fit on the starting page. Moving it to the next page leaves a more or less large gap on the page before the table. You can circumvent this with package afterpage. In the ...


1

You can use a minipage environment instead: \documentclass{article} \usepackage{lipsum} \usepackage{multicol} \newenvironment{mh}[1]{% \textbf{#1}% \begin{multicols}{2}% }{%BODY \end{multicols}% } \begin{document} \begin{minipage}{\linewidth} \begin{mh}{This is the title.} \lipsum[1] \end{mh} \end{minipage} \end{document} ...


1

As a workaround, add \clearpage immediately before \end{abstract}. (I'm assuming that, like for the onecolumn class option, the abstract should be part of the title page -- otherwise, an even worse hack is\date{\today\clearpage}.) \documentclass[titlepage,aps,prd,twocolumn,groupedaddress,floatfix]{revtex4-1} \usepackage{lipsum} \begin{document} ...


1

For people working with: \frame{ bla bla Content on the slide bla bla } the [allowframebreaks] has to be places like this: \frame[allowframebreaks]{ \tiny\bibliography{Name of your Bibliographie} \bibliographystyle{Your bibliographystyle} }



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