0

I have a document that's supposed to compile in a4paper. Until recently, that worked just fine, however now it's using the same width, but a significantly increased height. It's pretty much a 2:1 ratio now.

I narrowed it down to the following code:

\usepackage[margin=2.5cm,right=3cm]{geometry}
\usepackage{mathptmx}
\renewcommand{\rmfamily}{%
\fontfamily{ptm}%
\fontsize{12}{1.5pt}%
}

When I replace this with just usepackage{geometry}, everything is back to normal.

The preamble also contains these potentially relevant clauses:

\documentclass[a4paper,bibliography=totoc]{scrreprt}
\usepackage[T1]{fontenc} % part of standard header for European documents
\usepackage[utf8]{inputenc} % part of standard header for European documents
\usepackage[babel,english=american]{csquotes}
\usepackage[USenglish]{babel}
\usepackage{graphicx}
\usepackage{tikz-uml}
\usetikzlibrary{positioning}
\usepackage[backend=bibtex]{biblatex}
\usepackage{stackengine}[2013-10-15]

(It also contains some formatting tricks, none of them changes the paper size or any existing command or length, though. Plus, I doubt it's because of StackEngine or BibLaTeX.)

I'm not sure if it's specific to the toolkit I use (PDFLaTeX with TeXLive backend and TeXlipse frontend under Windows 10) because I didn't really try it in a different environment.

What about this code would change the paper size and what should I do instead?

3
  • 2
    I'm not sure what "TeXMaker backend and TeXlipse frontend" means, Texmaker is an editor and TeXlipse is a (plugin for an) editor, so both are arguably frontend. So which of the two do you use? And more importantly, which LaTeX distribution do you use (TeX Live, MiKTeX, MacTeX) and on which operating system (Windows/Mac/Linux/other)? Also, although the geometry package has (obviously) a big influence on the geometry of the document, other parts of the code also play a role, such as the documentclass. Could you provide a small but complete document that shows this issue?
    – Marijn
    Commented Feb 19, 2020 at 15:05
  • @Marijn Whoops, I meant TeX Live ^-^'
    – Egor Hans
    Commented Feb 19, 2020 at 15:07
  • 2
    Thanks for the extra code - it is however still not a complete, reproducible document (i.e., no \begin{document} and contents and \end{document}), also it is not minimal (most of the packages you mention do not influence the behavior). So it would help to answer the question if you make a document that can be compiled, is as small as possible (no irrelevant packages) and that shows the problem when it is compiled. Verify yourself, before posting, if your example indeed shows the issue when it is copied to an empty document and compiled.
    – Marijn
    Commented Feb 19, 2020 at 16:06

1 Answer 1

0

So turns out I was hallucinating the wrong paper size. What made me think it had changed was the decrease in page amount which was caused by the fact that the margin was decreased properly, but the code that was meant to increase the font size and line spacing was doing nothing. In other words, this:

\usepackage{mathptmx}
\renewcommand{\rmfamily}{%
\fontfamily{ptm}%
\fontsize{12}{1.5pt}%
}

doesn't work for changing font, font size and line spacing. The code that actually works is, in fact, much simpler: Add 12pt to the optional parameters of \documentclass and apply

\renewcommand{\baselinestretch}{1.5}
\usepackage{mathptmx}
\renewcommand{\rmdefault}{ptm}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .