Text FormattingWrong paper format with MiKTeX

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
mombe
Posts: 7
Joined: Sun Apr 04, 2010 5:26 pm

Wrong paper format with MiKTeX

Post by mombe »

Hi Everyone,

First, I apologize if this is a stupid question, but I am completely new to both TeX and the forum, so please forgive my ignorance.

Basically, I've been using MikTeX with Texniccenter for a few months now, and I've had only one major problem: I CANNOT get MiKTeX to write PDF files in 8.5/11 inch letter size format. I've tried everything: editing the .tex file, reinstalling MiKTeX and choosing the "letter" option when it's offered, but nothing is working. Finally, I delved into the aps and settings in the MiKTeX folder, and found that my pdftex template file in the pdftex folder is still set to use A4. Further, I cannot change it, even when using the initex utility (if I'm using it correctly).

Thank you so much in advance for your help.
Ethan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Wrong paper format with MiKTeX

Post by localghost »

Start the MiKTeX Settings (Admin) from the »Start« menu and select letter size paper as seen in the attachment. But you can always set page and paper dimensions by means of the geometry package.


Best regards and welcome to the board
Thorsten
Attachments
MiKTeX Options (Admin) for selection of paper size.
MiKTeX Options (Admin) for selection of paper size.
MiKTeXOptions-General.png (32.01 KiB) Viewed 9399 times
mombe
Posts: 7
Joined: Sun Apr 04, 2010 5:26 pm

Wrong paper format with MiKTeX

Post by mombe »

localghost wrote:Start the MiKTeX Settings (Admin) from the »Start« menu and select letter size paper as seen in the attachment. But you can always set page and paper dimensions by means of the geometry package.


Best regards and welcome to the board
Thorsten
Hello, and thank you for your reply. I've already set the default size to letter (lettersize) but that has not resolved the problem. Any other suggestions?

Thanks!
Ethan
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Wrong paper format with MiKTeX

Post by frabjous »

Do you still get A4 sized paper if you put:

\usepackage[letterpaper]{geometry}

in the preamble?
mombe
Posts: 7
Joined: Sun Apr 04, 2010 5:26 pm

Wrong paper format with MiKTeX

Post by mombe »

frabjous wrote:Do you still get A4 sized paper if you put:

\usepackage[letterpaper]{geometry}

in the preamble?
Yes. The PDF still displays A4 instead of letter.

Edit: Well, sort of. The PDF still displays the full A4 sized paper, but that restricts the margins to letter. The problem with that is that it still has to "fit to page" when it prints, so it looks wrong.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Wrong paper format with MiKTeX

Post by frabjous »

Can you upload one of these PDFs here, along with the .tex code you used to generate it (the more minimal the better) and the log file produced in the process? [Best to add \listfiles in the code to show the versions of the files in the log.]
mombe
Posts: 7
Joined: Sun Apr 04, 2010 5:26 pm

Wrong paper format with MiKTeX

Post by mombe »

frabjous wrote:Can you upload one of these PDFs here, along with the .tex code you used to generate it (the more minimal the better) and the log file produced in the process? [Best to add \listfiles in the code to show the versions of the files in the log.]
Sure thing. Here are all of the files you requested. I've removed quite a bit, but I left most of my formatting options. I'll also upload the pdftex file that I mentioned in the title of this thread, just so you can have a look and let me know whether or not it's important, but that's on a separate post.

Thanks so much for your help by the way.
Attachments
Test.tex
(605 Bytes) Downloaded 354 times
Test.log
(7.77 KiB) Downloaded 318 times
Test.pdf
(32.59 KiB) Downloaded 370 times
mombe
Posts: 7
Joined: Sun Apr 04, 2010 5:26 pm

Wrong paper format with MiKTeX

Post by mombe »

Here are the contents of the other file, pdftex.cfg

Code: Select all

%% pdftex.cfg: pdfTeX configuration file
%%
%% DO NOT EDIT THIS FILE DIRECTLY! It will be overwritten.
%%
%% Run
%%
%%   initexmf --edit-config-file pdftex
%%
%% to edit pdfTeX configuration parameters.

compress_level 9
decimal_digits 3
horigin 1 true in
output_format 1
page_height 297 true mm
page_width 210 true mm
pdf_minorversion 4
pk_resolution 600
vorigin 1 true in
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Wrong paper format with MiKTeX

Post by frabjous »

What's the problem? That PDF is letter-sized:
pdfproperties.png
pdfproperties.png (50.63 KiB) Viewed 9383 times
If it's not displaying or printing properly, I'd guess that's a problem with your PDF viewer application, not with pdfTeX.
pf
Posts: 1
Joined: Tue Apr 27, 2010 10:48 pm

Re: Wrong paper format with MiKTeX

Post by pf »

I overcame a similar problem by formatting my document with the following code placed after the \documentclass{article} declaration in the .tex file:

\topmargin -1.5cm
\oddsidemargin -.04cm
\evensidemargin -.04cm
\textwidth 16.59cm
\textheight 21.94cm
\parskip 7.2pt
\parindent 0pt

Its a simply solution (and perhaps a hack) but it works when you need to get your desired results. I am new to TeX so all you experienced users, please dont beat me up for suggesting this inelegant solution but from one new TeX user to another...its simply works.

-pf
Last edited by pf on Wed Apr 28, 2010 12:46 am, edited 1 time in total.
Post Reply