# Tag Info

13

A whatsit (user-defined or not) is always non-discardable. So if glue follows it, that glue constitutes a break point. If glue precedes it, that might stretch along with the rest of the page. To make it adhere to the following paragraph, you can make it part of the paragraph. The LaTeX way is to put \leavevmode before it. That positions the whatsit at the ...

11

You should add the whatsit into paragraph itself (i.e. the horizontal list). I guess you have something like this: \documentclass{article} \usepackage{luacode,luatexbase} \begin{document} \begin{luacode*} w = node.new("whatsit","user_defined") w.type=100 function foo(head) new_head = node.insert_before(head, head, w) return new_head end ...

9

Stealing gratuitously from topskip's answer (although I did vote for it as well:-) He showed how to push the whatsit into the horizontal list (which is basically what \textcolor{}.. does as opposed to \color) But if you want the whatsit to be in the vertical list but have no break point before the following paragraph, you can do as I suggest in comments and ...

5

You can prevent (or at least infinitely discourage) linebreaking in the footnote, which may or may not be suitable, depending. This produces a broken URL as you describe if you comment out the setting of \interfootnotelinepenalty. \documentclass{article} \setlength\textheight{3cm} \usepackage{hyperref} \def\a{One two three four. } \def\b{\a Five six seven ...

5

The simplest solution is to define a wrapper environment such as \newenvionment{qn}{\par\noindent\begin{minipage}{\linewidth}{\end{minipage}\par} then use \begin{qn} \begin{question} Why? \end{question} \begin{answer} I don't know! \end{answer} \end{qn}

4

longtable boxes the last page (which stops your glue stretching). It probably shouldn't, this removes the offending box. \documentclass{article} \usepackage{lscape,longtable} \makeatletter \let\zzLT@output\LT@output \def\unboxlastpage#1\@colht\vbox{#1\@colht} \def\LT@output{\expandafter\unboxlastpage\zzLT@output} \makeatother \begin{document} ...

4

All \nopagebreak's are undesired: \documentclass{scrartcl} \usepackage{longtable} \usepackage{booktabs} \begin{document} \section{Table test} \begin{longtable}{llc} \hline & & \multicolumn{1}{c}{All} \\ \hline m & \rule{0pt}{1.7\normalbaselineskip}April & $1$ \\ & July & $1$ \\ & June & $1$ \\ l & ...

4

Breaking within a row would be really hard to specify (even if it didn't require re-writing most of longtable) consider that the cells may have text of different baselines, or images or nested tables, and you'd have to find a consistent place to break each column. If your real example is just one column then you don't need a table at all of course, and ...

4

Here is the result with the tcolorbox package and your complete code. To achieve this you need to add the following MWE to your code \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{breakable,skins} \newcounter{exe} % this will create a new counter for auto numbering the exercises \newcommand{\mytitle}{ ...

2

The markup in the MWE is very odd but as a box never breaks one possibility would be \noindent \begin{minipage}{\textwidth} More text. \textbf{I don't want this line to be the last line of the page.} even more text \end{minipage} but that freezes the vertical space so it may not match flexible space on the same page. Depending on your real use case it ...

2

My previous comment considered using the standalone documentclass. That uses the preview package. Going directly to preview gives a solution: \documentclass{article} \usepackage{lipsum} \usepackage[active, tightpage]{preview} \begin{document} \begin{preview} \section{Intro} \lipsum[1] \end{preview} \newpage \begin{preview} \section{Another section} ...

2

If you don't need a footer and are ok with footnotes relegated to the end of the document via endnotes then a simple modification of your proposed workflow could fit the bill. \usepackage [paperheight=50cm, textheight=48cm, paperwidth=21cm]{geometry} or whatever is enough instead of 50cm, 48cm. Or only paperheight and vscale=0.95 for example. The 21cm if ...

2

Using longtable instead of unbreakable tabular should solve the problem. \documentclass[10pt]{article} \usepackage{array, xcolor, lipsum, bibentry} \usepackage[margin=3cm]{geometry} \usepackage{scrbase,scrpage2} \pagestyle{scrheadings} % pagestyle with page number \usepackage{longtable} % PS \lohead{My Name} \definecolor{lightgray}{gray}{0.8} ...

2

Here is a list-like approach for your resume. Lists can break across the page boundary, so there's no worry about subsequent overflows. I've added the showframe option to geometry to highlight the page boundaries: \documentclass{article} \usepackage{enumitem,fancyhdr,lipsum}% http://ctan.org/pkg/{enumitem,fancyhdr,lipsum} ...

2

Does something like the following work for you? (I am not sure whether you want this, since you say, continue normally on page 4 as if the two extra pages were not there. Do this mean that these will not increase the page number? If that is the case, my answer is incorrect and I will delete this.) \documentclass{IEEEtran} \usepackage{lipsum} ...

2

It's not realy the indentation that's changing. What's happening is that memoir is using different widths for the left and right hand margins of your page. I might suggest using the geometry package to change this. You can use \usepackage[margin=1.75in]{geometry} to set the margins to 1.75in all around. But also, I'm not very familiar with the memoir ...

1

These deluxetables are floating objects. As far as I can make out their parameters are bp meaning that can be placed at the bottom of the page, or on a separate float page. Now by default LaTeX does not reserve much room for floats at the bottom of the page, indeed \bottomfration is by default 0.3 meaning that they may only fill the bottom 30% of the page. ...

1

If you really dont want to set the postdisplaypenalty value globally, you could create a new environment which modifies the display penalty inside the environment, and resets it prior to leaving. \makeatletter \newenvironment{tighten}{ \let\pen@old\postdisplaypenalty \postdisplaypenalty=100 }{ \let\postdisplaypenalty=\pen@old } \makeatother ...

1

Ok, I don't know how much of a bad hack this is, but here's an attempt which tries to redefine \par at the end of \] so that it can detect whether it comes directly after the displayed math. \documentclass{article} \usepackage{etoolbox} %Remove the following % to get "one line of text" onto the first page: \postdisplaypenalty=100 ...

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