Tag Info

New answers tagged

5

There is a big difference between \newpage and \vfill\eject. Definition of \newpage in LaTeX % latex.ltx, line 6342: \def \newpage {% \if@noskipsec \ifx \@nodocument\relax \leavevmode \global \@noskipsecfalse \fi \fi \if@inlabel \leavevmode \global \@inlabelfalse \fi \if@nobreak \@nobreakfalse \everypar{}\fi \par ...


1

The lines %\setlength{\maxdepth}{0pt}% to address the "third bug" %\setlength{\topskip}{0pt}% no space above the first line %\vspace*{\dimexpr0.000cm-\topskip plus 1fill} Can't ever do anything very helpful to the document and if I remove them the first page is the expected size.


1

You can try going to Document --> Settings --> LaTeX Preamble, and add \renewcommand\chapter{\par \thispagestyle{plain}% \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter} (Normally one would need \makeatletter before and \makeatother after, see What do ...


3

I believe you should use mdframed instead of that handmade version. \documentclass{article} \usepackage{amsthm,mdframed} \usepackage{lipsum} \mdfdefinestyle{ruledtheorem}{ topline=true, bottomline=true, leftline=false, rightline=false, innertopmargin=0pt, innerbottommargin=.5\baselineskip, innerleftmargin=0pt, innerrightmargin=0pt, } ...


3

You could use the same mechanism as section titles: \documentclass{article} \usepackage{amsthm} \usepackage{lipsum} \newtheorem{theorem}{Theorem} \makeatletter \newcommand{\proofpart}[2]{% \par \addvspace{\medskipamount}% \noindent\emph{Part #1: #2}\par\nobreak \addvspace{\smallskipamount}% \@afterheading } \makeatother \begin{document} ...


3

You can use the lscape package: Code: \documentclass{article} \usepackage{lscape} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{landscape} \lipsum[1] \end{landscape} \end{document}


2

The line \include{preamble_mastergrad} is incorrect, \include should only be used after \begin{document} and is intended for document fragments (usually chapters) not for macro code files. If you have put your preamble commands into a separate .tex file you can input them with \input, although a preferable alternative is to put them in a .sty file and ...


0

This isn't the answer to the original post, but I came here Googling for "Longtable misplaced noalign" so my eventual solution might be useful for someone. In my case I needed a \\ after the \caption and \label. This seems incredibly counterintuitive to me so if anyone can explain why or tell me where this is documented I'd be grateful. ...


5

The section heading prevents page break until after a line of the following paragraph, so TeX will take the heading on to the top of a page as there isn't room at the bottom of the first page you show. So the question is really why did latex insert a float page in the second page image shown. Without example code one can only guess, but one of these may be ...


3

You can put put \clearpage before the longtabu environment. This will flush any pending floats and prevent them floating into the table.


2

I'd just put the second figure after landscape rather than rotating it twice. \afterpage{% \clearpage \begin{landscape} \begin{figure} \centering \includegraphics[scale=1]{path/to/the/file.pdf} \caption{The Caption} \end{figure} \end{landscape} \begin{figure} \centering ...


3

I think it's easier to concatenate externally, either on the commandline or here usimg pdflatex --shell-escape to allow latex to call out to the paste command: I modified the 2nd csv file not to be a copy of the 1st, to check the correct data is being used. \documentclass[]{article} \usepackage{longtable} \usepackage{csvsimple} ...


4

Without a sample document it is hard to give advice. You can use use \pagebreak[1] or 0 or 2 or 3 depending on how strong a hint you want. 4 forces a break, however this inserts the page break hint after the current line of text. You probably want something different, if you force a break you (I think) want to force a linebreak, pad out the rest of the ...


2

The answer How to prevent page breaks in lists? ("Exam" class) by @Mico is only for protecting the choices in a multiple-choice list, not the entire question. It still allows page breaks between a question prompt and its list of options. To avoid that, just define a new environment (shown here for multiple choice): \documentclass[%answers, ...


1

Since no MWE is given, this is a quick guess: The responsible command for the newpage is the \chapter*{\bibname} within the definition of thebibliography environment (most likely the book or report class is used). This command issues a \clearpage or \cleardoublepage depending on class options. I have patched the thebibliography command by relaxing ...


5

Your minimal example isn't really reflective of a typical document, but the output is as expected. Here's why... Each of the sectional units go through the same macro during construction, \@startsection. This macro conditions on whether the sectional heading is supposed to be "run-in" or "display". In a display section, the title is set on a single line ...


3

As Barbara Beeton says this is expected behaviour. However, you can circumvent it by adding \unskip before the \pagebreak: An alternative suggested by egreg is \addpenalty{-10000} instead of the combination \unskip\pagebreak. The code for \addpenalty essentially includes \unskip and \pagebreak (with no argument) is essentially \penalty-10000. ...


0

I was having some problem with my figures in my text. My code was tested and working fine. the Problem was in the package subfigure, it did not work well with Float.. So i did this and it worked well, ie i posted manually 2 pics per page.. > \begin{figure} \centering \subfigure[]{ \label{fig:8} \includegraphics[width=10cm]{2m.eps} } \subfigure[]{ ...


6

This example shows that \columnbreak is obeyed: \documentclass[a4paper]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{multicol} \begin{document} \begin{multicols}{2} \noindent Vediamo un po' di testo a due colonne. Proviamo a cambiar colonna: \columnbreak \texttt{\textbackslash columnbreak} serve a ...


7

\columnbreak like \vspace and \pagebreak etc if used in horizontal mode inserts itself into a \vadjust node that TeX's paragraph breaker will insert after the current line of text is broken into lines. Only once the \vadjust node contents are interpreted in vertical mode will the underlying penalty affect the column breaking. In this case the node (just) ...


3

You can use \ContinuedFloat like this: \documentclass[demo]{article} \usepackage{subfig,graphicx} \begin{document} \begin{figure}[htb] \centering \subfloat[Pedestrian level (2 m)]{ \label{fig:8} \includegraphics[width=12cm]{2m.eps} } \subfloat[10 m above ground level]{ \label{fig:9} ...


1

Page breaking typically happens where a \vskip (rather than a rule) is added. The following puts \BT@nobreak before every vskip added by nooktables (with a default definition of \relax then two commands are provided that switch its definition between \relax and \nobreak so you can prevent page breaks at booktabs rules for sections of the table, specifically ...



Top 50 recent answers are included