2

I'm on Win7 with TeX Live 2013 and TeXstudio. I have a main.tex file (\documentclass[...]{scrartcl}) with 2 \input{file} commands. I want to put a blank page between the table of contents and the beginning of the 1st file and remove the extra blank page that TeX Live keeps adding somewhere before the 2nd file or in the middle of it!

main.tex

\documentclass[a4paper, 12pt]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[italian]{babel}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{lipsum}

\newcommand{\campoE}{\mathcal{E}\ped{x}}
\newcommand{\derivata}[2]{\frac{\textup{d}{#1}}{\textup{d}{#2}} }
\newcommand{\derivataparziale}[2]{\dfrac{\partial{#1}}{\partial {#2}} }
\newcommand{\integrale}[4]{\displaystyle \int_{#3}^{#4}#1\,\text{d}{#2} }

%----------------------------------
\title{E.S.S.}
\author{Wobby Windows}
\date{Written on some day}

\begin{document}
\maketitle
\thispagestyle{empty}
\tableofcontents

\newpage
\input{captest}
\clearpage
\input{formule}
\end{document}

captest.tex

\newpage
\section{Test}

\subsection{Introduzione lipsum}

\lipsum[1-2]

\subsection{Effetto lipsum}

\lipsum[3-4]

formule.tex

\section{Formule}

\begin{align}
\label{7.1.1} I\ped{c} &= \dfrac{q\tilde{D\ped{n}} n\ped{i}^{2} A\ped{E} \, \exp\left({ q V\ped{BE} / kT}\right) }{\integrale{p}{x}{0}{x_B} } & \\
\label{7.1.2} \derivataparziale{I_C}{V\ped{CB}}&= \dfrac{-q\tilde{D\ped{n}} n\ped{i}^{2} A\ped{E} \, \exp\left({qV\ped{BE}/kT}\right) \, p(x_B) }{\left[\integrale{p}{x}{0}{x_B} \right]^{2}} \, \derivataparziale{x_B}{V\ped{CB}}&\\
\label{7.1.3} \derivataparziale{I\ped{C}}{V\ped{CB}}&= -I\ped{C}\,p(x\ped{B}) \; \dfrac{1}{\integrale{p}{x}{0}{x\ped{B}}} \, \bigg [\derivataparziale{x\ped{B}}{V\ped{CB}} \bigg] &\\
  \notag &= {} -\dfrac{I\ped{C}}{V\ped{A}}=\dfrac{I_C}{|V_A|}\\
\label{7.1.4} V\ped{A}&= \dfrac{\integrale{p}{x}{0}{x_B} }{p(x\ped{B}) \derivataparziale{x\ped{B}}{V\ped{CB}}}\\
\label{eq:7.1.5-6}  \integrale{p}{x}{0}{x\ped{B}}&=\dfrac{Q\ped{B}}{q} \qquad \qquad q\, p(x\ped{B}) \, \derivata{x_B}{V\ped{CB}}=\derivata{Q_B}{V\ped{CB}}\\
\label{eq:7.1.7-8} \bigg| \derivata{Q_B}{V\ped{CB}} \bigg|&= C\ped{jc} \qquad \qquad  |V\ped{A}|= \dfrac{Q\ped{B}}{C\ped{jC}}\\
\label{7.2.1} I_B&= I_0\, \exp\left({\dfrac{qV\ped{BE}}{nkT}}\right)  \\
\label{7.2.2} \integrale{p(x)}{x}{0}{x\ped{B}}&=\integrale{[N\ped{a}(x) + \, n'(x)]}{x}{0}{x\ped{B}}\\
\label{7.2.3} n(0) &=\dfrac{N\ped{a}(0)}{2} \left[ \bigg(1+ \dfrac{4 \, n^{2}\ped{i} \, \exp\left({qV\ped{BE}/kT}\right) }{N\ped{a}(0)} \bigg)^{1/ \,2} -1 \right] \\
\label{7.2.4} \derivata{\campoE}{x}&=\dfrac{1}{\epsilon\ped{s}} \left[  q\,N(x) - \dfrac{J_C}{v(x)} \right]\\
\label{7.2.5}  V\ped{CB}+\phi \ped{i}&=\integrale{-\campoE}{x}{x_B}{x_C}\\
\label{7.2.6} J\ped{l}&=q\, N(x)\, v(x)\\
\label{7.2.7} \integrale{x \; \derivata{\campoE}{x}}{x}{x\ped{B}}{x\ped{C}}&=\dfrac{1}{\epsilon\ped{s}}\, \integrale{x\, \left[ qN(x) - \dfrac{J_C}{v(x)}\right]}{x}{x_B}{x_C}\\
\label{7.2.8} \integrale{x}{\campoE}{x_B}{x_C}&= - \integrale{\campoE}{x}{x_B}{x_C}=V\ped{CB} + \phi_i\\
\label{7.2.9} V\ped{CB}&= \dfrac{1}{\epsilon_s} \integrale{x \, \left[q \, N(x) - \dfrac{J_C}{v(x)} \right]}{x}{x_B}{x_C} - \phi_i\\
\end{align}

\begin{align}
\label{7.2.10} V\ped{CB}&= \dfrac{1}{2\, \epsilon_s} \left[ qN\ped{epi} + \dfrac{J_C}{v_l}\right]\, x\ped{CB}^2  - \phi_i\\
\notag &= \dfrac{q N\ped{epi}}{2 \epsilon_s} \left[ 1+ \dfrac{J_C}{J_l}\right]\, x^2_{CB} -\phi_i\\
\label{7.2.13} I_C&=I\ped{S} \; \exp{\left[ \dfrac{q (V\ped{BE} - I\ped{B}R\ped{B})}{kT}  \right] }\\
\label{7.3.1} Q\ped{nB} &= \integrale{q \,A\ped{E} \, n'(x) }{x}{0}{x_B}\\
\label{7.3.2} \tau_B &= \dfrac{Q_{nB}}{I_{C}}\\
\label{7.3.3} \tau_B &= \dfrac{x_{B}^2 }{2 \tilde{D}_{n}}\\
\label{7.3.4} \tau_{B} &= \dfrac{\integrale{p}{x}{0}{x_{B}} \, \integrale{n'}{x}{0}{x_{B}}}{\tilde{D_n} \, n^{2}_{i}\, \exp{\left(qV_{BE} / \, kT\right)}}\\
\label{7.3.5} \tau_{B} &=\dfrac{\tfrac{1}{2} n'(0) x_{B} \left[ \tfrac{1}{2} (n'(0) +2N_{A} ) x_{B} \right]}{\tilde{D} \left[ n'(0) (n'(0) + N_{a} )\right]} =\\
\notag &= \dfrac{x^2_{B}}{4 \tilde{D_n}} \left[ 1 + \dfrac{N_a}{n'(0) + N_a}\right]\\
\label{7.3.6} n(x) &= -\dfrac{J_n}{q\tilde{D_n} p(x) } \, \integrale{p(\xi)}{\xi}{x}{x_B} \\
\label{7.3.7} \tau_B&= \dfrac{1}{\tilde{D_n}} \integrale{\dfrac{1}{p(x)} \left[ \integrale{p(\xi)}{\xi}{x}{x_B}\right]}{x}{0}{x_B}\\
 \label{7.3.8}\tau_B &= \dfrac{x^2}{\tilde{D_n}} \left\lbrace \integrale{\dfrac{1}{p(y)} \left[ \integrale{p(\xi)}{\xi}{y}{1}\right]}{y}{0}{1}\right\rbrace\\
 \notag &= \dfrac{x^2_B}{\nu \, \tilde{D_n}}
\end{align}

Is there a way to force TeX Live to do what I want? I just want the 2nd file to start on a new page, not insert a blank page. Since I'm still writing stuff in the 1st file, its length is yet not definitive.

  1. Could that be the problem?
  2. What is the difference between \clearpage and \newpage?

PS After problem n.2 was solved still trying to solve problem n1: how to put a blank page right after the table-of-contents?

  • \clearpage flushes out all floats as well as forcing a pagebreak, \newpage just forces a page. \input has no effect on page breaking, it is just as if the file contents were at that point, so your example gives no indication of why a page break happens or does not happen, it all depends on the unseen code. – David Carlisle Jan 25 '14 at 18:50
  • 3
    Please always post a complete example starting with \documentclass so people can test any answer – David Carlisle Jan 25 '14 at 18:51
  • 1
    latex rarely makes a blank page, the most common reason is that you have \chapter and the (default) openright option in which case \chapter uses \cleardoublepage to make sure it starts on an odd numbered page. – David Carlisle Jan 25 '14 at 18:56
  • @DavidCarlisle: The OP uses scrartcl as article substitution, so no default openright and no \chapter (I know, that you know, but perhaps the OP doesn’t). – Speravir Jan 25 '14 at 19:01
  • 1
    i'm not exactly sure how \section in scrartcl works, but you are starting the section in cap7_formule.tex with a very large align block. it's large enough that it's pulling the section heading over to a new page. you can use \allowdisplaybreaks to permit the aligned material to break between lines whenever the page reaches capacity. simply adding that before the first align gets rid of the extra page, although i'm not entirely sure of the details. you probably want more control than that; should be more details in the amsmath users guide (texdoc amsmath). – barbara beeton Jan 25 '14 at 20:29
3

you are starting the section in cap7_formule.tex with a very large align block. t's large enough that it's pulling the section heading over to a new page.

you can use \allowdisplaybreaks to permit the aligned material to break between lines whenever the page reaches capacity.

if you enter that in the preamble, it will be in effect throughout the entire document. if you insert it just before the align that is a problem, you can localize it by wrapping the affected area in braces. and you will need only one align, rather than the multiple groups that you have now. if there are places you don't want a break, insert \nobreak after the \\ that separates the two lines that shouldn't be split apart.

adding \allowdisplaybreaks will get rid of the extra page. (if you can add a minimal example, this explanation will probably make more sense to other readers of this question.)

unfortunately, i'm not sufficiently familiar with scrartcl to understand or explain exactly why this is happening, but this workaround should get rid of the immediate problem.

edit: to add a blank page after the table of contents, since scrartcl defaults to one-sided, you'll have to insert that yourself. add this after \tableofcontents:

\newpage
\mbox{}
\newpage

\newpage doesn't actually put anything onto the page, and a page with nothing on it won't be output. thus the need for \mbox before the second \newpage.

  • Someone forgot their capital letters ...... :-) – azetina Jan 25 '14 at 23:23
  • 3
    @azetina that's how we know it's the real Barbara not an imposter. – David Carlisle Jan 26 '14 at 0:42
  • @DavidCarlisle I guess its here signature mark. No edits ppl...ok. – azetina Jan 26 '14 at 0:44
  • @azetina: Look into her user profile … – Speravir Jan 26 '14 at 1:41
  • barbara beeton thanks for your input - it solved problem n2. Any idea how to solve problem n1 (placing a blank page after the title and table of contents)? – WobblyWindows Jan 26 '14 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.