{geometry} is a package that allows to change the margins of (whole) pages and, conversely, the width and height of the textblock and its positioning on the page.

learn more… | top users | synonyms

30
votes
3answers
7k views

Change paper size in mid-document

My document should be letterpaper and my attachments should be a4paper. I had high hopes for the \newgeometry command from the geometry package, but the documentation says \newgeometry is almost ...
12
votes
2answers
14k views

How can I fix the error “GUI framework cannot be initialized” with TeXnicCenter and MiKTeX?

I don't know what I've done, but all of a sudden I am unable to compile any document which uses the geometry package. Minimal (non)-working example: \documentclass[11pt]{article} ...
142
votes
4answers
30k views

Why are default LaTeX margins so big?

I've read that—unless I know a lot about typesetting—I shouldn't change the margins of a LaTeX document. The default margin size of the article class is really big and it feels like a lot of space is ...
5
votes
1answer
1k views

A5 booklet printing — Title page and TOC are missing

I have a file bookletdemo.tex with the following code \documentclass[12pt]{article} \usepackage[a5paper]{geometry} \usepackage{lipsum} % this package is for creating filler text \author{N.~N} ...
21
votes
2answers
17k views

Different margins for title page

My document class is article with a4paper. The margins that I want for the body are: top: 1 inch bottom: 1 inch right: 0.5 inch left: 1.5 inch The title page should have a 1 inch margin on all four ...
8
votes
1answer
433 views

Automate Fixed Width Page, length > some minimum length, but only as long as needed

I am trying to automate the solution proposed by egreg to How define a fixed width page, but length > some minimum length, but only as long as needed by hooking into \begin{document} and ...
11
votes
2answers
1k views

What's the absolute largest paper size permissible with pdflatex?

I've had occasion to typeset extraordinarily large matrices, which I didn't seriously expect anyone to expect in detail (without a computer) or print, but I needed it to be obvious that they were ...
14
votes
3answers
6k views

Fitting page size to a tikz figure

Sometimes I'm using tikz as a plotting tool, without embedding the figure in a document. In this case, I normally, want to include the resulting PDF in a different TeX file (yes I know I could include ...
20
votes
5answers
8k views

Draw true page border

Is there a way to draw a rectangle around every page? The problem is that my document (a Ph.D. thesis) is in a funny format (16x24cm). So to print it centered on A4 paper (for reviewing) I played ...
14
votes
2answers
2k views

Storing the original document class page layout with geometry

Is it possible, using the geometry package, to store (and restore) the original layout specified by the document class (in my case, the class is report)? Here is some context. I have been editing ...
8
votes
1answer
293 views

How define a fixed width page, but length > some minimum length, but only as long as needed

This recent question on how to increase the width of the output, and this earlier question on how to increase the length of the output reminded me of something I have been wondering: I would like to ...
21
votes
5answers
3k views

Wrong A4 measurements?

I noticed that the paper size invoked by a4paper is not working right in my examples: \documentclass[a4paper,11pt,oneside]{article} \begin{document} Test \end{document} I checked with Preview.app ...
20
votes
2answers
5k views

How can I get todonotes in the left margin

I want to use the package todonotes. Standard, the package prints the todo's in the right margin, while I want to have them in the left margin. Funny is, that in the manual itself they are placed in ...
6
votes
1answer
3k views

How to determine head height automatically

I'm creating three documents with three different headers, containing images or large banners. Is there a way to determine the head height automatically or even better a way to change the head height ...
9
votes
1answer
2k views

Change page layout after first page

currently I'm trying to prepare a letter head with XeLaTeX. The first page of the letter should have a sidebar on the right. For this sidebar, the text width should be shrinked to approx. 80% of its ...
5
votes
1answer
437 views

Showing margins/frames in beamer slides

With a regular article/report/... class, you can use the showframe package to draw outlines of where the various regions of the page lie. I cannot get the same functionality with beamer, however. ...
9
votes
1answer
4k views

geometry, fancyhdr: \fancyfoot[C]{\thepage} is not really centered

After switching from the report class to the book class and starting to use the fancyhdr package to control headers/footers, the page numbers in my footers are no longer centered. This is my fancyhdr ...
4
votes
3answers
3k views

Change \headheight for a \pagestyle

I have a document class that auto generates header from some user input. The problem is the first page should have a different page header than the others and the headline can be multi line. So ...
3
votes
2answers
167 views

Displaying layout marks in a document set with different layouts

Is there any package that allows for the display of layout marks within a document where the layout changes several times throughout? I'm using the geometry facilities to issuing \newgeometry commands ...
8
votes
1answer
274 views

How to have headers, section headings, and figures expand into the margin?

I am interested in the following page layout. How to have headers in margins (up to margin) Is it possible to start section headings from margin How to set figures occupy the margins. I can ...
13
votes
1answer
10k views

Defining page margins with \geometry for two-sided documents

How do you set page margins using \geometry for a two-sided document? So far I've used the twoside option in my documentclass, which automatically widens the left/right margin on opposite sides of odd ...
5
votes
1answer
12k views

How can I change the margins in LaTeX? [duplicate]

How do I change the margin of all pages? I want the latex page be .25 in margin around all the pages.
4
votes
2answers
7k views

Changing oneside and twoside layout

Is there any solution to use different layouts according to the oneside or twoside specification? The first part of my report (abstract, ToC, LoF, LoT) should be in oneside mode and the rest of the ...
2
votes
1answer
7k views

How can I set up the left/right margin of the page to 1 inch, the top/bottom one to ½ inch?

I try to set up the left and right margins to 1 inch, top and bottom margins to 0.5 inch. The following is my code: % Setup the margin \usepackage[centering, margin={1in, 0.5in}, ...
10
votes
4answers
315 views

\newgeometry doesn't work with Turkish babel package

\newgeometry is a nice feature of geometry package. I found out that it doesn't work (together with many other problems) when \usepackage[turkish]{babel} is also used with many errors stating: ...
8
votes
1answer
2k views

geometry package - paperwidth and paperheight aren't accurate

recognize this simple example: \documentclass[]{article} \usepackage[paperwidth=612.0pt, paperheight=792.0pt]{geometry} \begin{document} Hello World \end{document} I compiled it with pdflatex. ...
7
votes
1answer
574 views

Standard way of handling oversize pages?

In a book project, using \geometry{letterpaper}, there are occasional places where an oversize diagram has to be included — one much wider than a normal page — without being reduced or spread across ...
6
votes
1answer
779 views

Getting layout parameters from the geometry package

The geometry package provides a simple way to set layout parameters. For example, \usepackage[margin=1in]{geometry} will give me a document with 1 inch margins on each side. In particular, it ...
3
votes
2answers
1k views

Problem with setting correct custom page size with 'geometry' in xelatex

I'm trying to set the page size using the geometry package as shown in the following MWE, compiled with xelatex test.tex: \documentclass[12pt]{article} \usepackage[b5paper,pass]{geometry} ...
6
votes
1answer
231 views

afterpage clashes with restoregeometry from the geometry package

I'm writing my thesis and have used the geometry package to control the size of the text body so that it follows 'good' typesetting practices as described in the KOMA-script documentation. Many of ...
4
votes
1answer
1k views

I get an error when using `\ExecuteOptions` together with `\usepackage{geometry}`

I'm writing a custom document class. It's kinda simple, but it will use the geometry package to set page size, orientation and margins. However... Whenever I use that package, the \ExecuteOptions ...
2
votes
1answer
10k views

Enumerated list indentation

I noticed that when I use enumerated list environment it produces an extra indentation to the document. So that if I'm using \usepackage[margin=3cm]{geometry} and then the enumerated list, the left ...
1
vote
1answer
109 views

How to show margin distances in mm

I would like to know the distance (in mm) of the margins I just set, and I would like them to be displayed in the document (for debugging purposes, of course). I use the showframe option of the ...
1
vote
1answer
68 views

page margins not respected after A3 page insertion in A4 document

I am inserting an A3 page in an A4 document but the margins are not respected (and neither does a page number appear), after the A3 page. Test code below: ...
20
votes
2answers
2k views

Default margins for geometry package

I want to explicitly specify sizes of my document. For this purposes I use geometry package. I do the following (I found the solution here): \documentclass{article} \usepackage[paperwidth=2394pt, ...
19
votes
5answers
2k views

Different margin on first page

To meet the conditions of our corporate design I need other margins on the first page of each document. The normal page layout is given by \usepackage[left=3cm,right=2cm,bottom=3cm,top=2cm]{geometry} ...
8
votes
1answer
978 views

Geometry: showframe + landscape

I'm using \usepackage[showframe]{geometry} and I'm seeing that when I use a landscape environment (added by pdflscape package) the frame doesn't seem to be OK. Is this an erratum? Is there any way ...
6
votes
1answer
486 views

All the document in only one long and continuous page

Well, may be this is not really useful, but I've thought if it was possible to put all the document in one long page. I mean, if your document is going to be read in a computer, mix all the pages in ...
15
votes
2answers
909 views

Problem with the geometry package reset option

Page 11 of the geometry package manual says that the reset option sets back the layout dimensions and switches to the settings before geometry is loaded. On page 30 there is a slightly different ...
9
votes
1answer
794 views

fancyhdr not centering after changed geometry

I have a document with different page margins, so I have to change geometry settings after fancyhdr loaded. However, the width of header after geometry is not correct. \documentclass[12pt]{article} ...
8
votes
2answers
1k views

What is the equivalent of fullpage in geometry package?

There's an occasion when I am forced to use geometry package instead of fullpage. Howevere the document margins should match another document which uses fullpage. Where can I find the default top, ...
3
votes
3answers
2k views

Small bug in geometry.sty

Complete Top Left Corner Top Right Corner Bottom Left Corner Bottom Right Corner \documentclass[dvipsnames,dvips,cmyk]{minimal} \usepackage{xcolor,calc} \usepackage[% ...
10
votes
2answers
6k views

Problem with the header/ footer width

I have recently started using the geometry package to format the margins of my documents. Although, I've noticed that the width of the header/ footer remains the same. How can I correct this? ...
7
votes
1answer
551 views

A perpendicular line to a plane in 3D

I have two line segments identified by two end points each. Two line segments are in the same plane and intersecting at a point. I would like to draw a line (normal of the plane) passing through the ...
5
votes
1answer
90 views

pass to \geometry{} options using a macro - keyval error

MWE: \documentclass{article} \usepackage{geometry} \newcommand{\GeomOpts}{a4paper,vmargin={3cm,3cm}} \geometry{\GeomOpts} \begin{document} \end{document} Because of the braces in \GeomOpts its ...
5
votes
3answers
9k views

Edit margins in res.cls (How to pass through correct value for “margin”?)

I'm creating a resumé using the res.cls package and need to make the left and bottom margins smaller. I know I can use e.g. \topmargin=-0.5in to decrease the space at the top of the page, but neither ...
4
votes
2answers
80 views

minipages: multi sized minipages that use all space on the paper and automatic scaling

I am creating a sheet with solutions to different qualifying questions. Each solution takes up a different length but I don't want to waste any white space. I want to put other minipages that will ...
4
votes
1answer
2k views

Odd-even margin

I am writing a book and I need to set the odd/even margin on the binding side. \usepackage[top=2cm, bottom=2cm, left=1cm, right=1cm, headsep=14pt]{geometry} I need left = 2.1cm for odd pages and ...
4
votes
0answers
1k views

Attempts to manually change \linewidth ignored by LaTeX [closed]

I was going to try to answer the question: How can I change the geometry of a page on the chapter header page only, and return to normal on the next page? It didn't seem like it should be too ...
3
votes
2answers
99 views

Prelim2e marking but centred without tikz

I use preliminary markup on draft versions of documents which specifies the svn repository number, timestamp, url etc. I prefer this to be typeset centred at the bottom of the page below the footer. ...