in All availableThis forumThis topic
Author Message
Joseph_sys

Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

Posted: Mon Apr 21, 2008 8:29 pm    Post subject: [SOLVED] texlive - A4 --> letter - straggling

I've upgraded from tetex to texlive (and I wish I didn't)
The upgrade went smooth but now I straggling to configure latex from A4 to letter paper.
One of the reason I (and most of us) use Gentoo so we don't have to hunt configuration packages and change the default setting. And making these changes in texlive is not fun :-/

From my "tetex" (previous installation notes) one of the file that needed to be changed was:
/usr/share/texmf/pdftex/config/pdftex.cfg
 Quote: ... output_format 1 compress_level 9 decimal_digits 3 page_width 8.5 true in page_height 11 true in horigin 1 true in vorigin 1 true in pk_resolution 600 ....

now, this change in "texlive" has been shifted to file:
/usr/share/texmf/tex/generic/config/pdftexconfig.tex (replacing pdftex.cfg file)
 Quote: % Set pdfTeX parameters for pdf mode (replacing pdftex.cfg file). % Thomas Esser, 2004. public domain. \pdfoutput=1 \pdfcompresslevel=9 \pdfdecimaldigits=3 \pdfpagewidth=8.5 true in \pdfpageheight=11 true in \pdfhorigin=1 true in \pdfvorigin=1 true in \pdfpkresolution=600 \endinput

So, I did this change but my document still printing to postscript printer and pdf-files as "A4" paper.
Running:
 Code: texconfig help
and changing various setting didn't help much.
If I make these changing as "root" configuration file are stored in :/root" directory but I'm using the system as user.
Should I make these changes as "$user"? Do I need to log IN/OUT for it to take an effect? I would like to make the changes globally so regardless who logs in it will default to "letter paper" _________________ #Thelma Last edited by Joseph_sys on Tue Apr 22, 2008 4:52 am; edited 1 time in total Joseph_sys Advocate Joined: 08 Jun 2004 Posts: 2571 Location: Edmonton, AB Posted: Mon Apr 21, 2008 10:36 pm Post subject: I have two pdftexconfig.tex file in the system: /usr/share/texmf/tex/generic/config/pdftexconfig.tex /root/.texmf-config/tex/generic/config/pdftexconfig.tex both have:  Code: % Set pdfTeX parameters for pdf mode (replacing pdftex.cfg file). % Thomas Esser, 2004. public domain. \pdfoutput=1 \pdfcompresslevel=9 \pdfdecimaldigits=3 \pdfpagewidth=8.5 true in \pdfpageheight=11 true in \pdfhorigin=1 true in \pdfvorigin=1 true in \pdfpkresolution=600 \endinput  Code: # cat /etc/paper paper.config papersize  Code: cat /etc/paper.config [Paper] US-Letter={612 792 72 72 72 72} US-Legal={612 1008 72 72 72 72} A3={841.88976 1190.5512 80 80 80 80 } A4={595.27559 841.88976 80 80 80 80} A5={420.94488 595.27559 80 80 80 80} B4={730 1034 60 60 60 60} B5={500 710 80 80 80 80} B5-Japan={517 730 80 80 80 80} Half-Letter={612 397 72 72 72 72} Executive={523 758 72 72 72 72} Tabloid/Ledger={794 1227 72 72 72 72} Monarch={280 542 10 10 10 10} SuperB={843 1227 80 80 80 80} Envelope-Commercial={298 686 5 5 5 5} Envelope-Monarch={280 542 5 5 5 5} Envelope-DL={312 625 5 5 5 5} Envelope-C5={460 650 5 5 5 5} EuroPostcard={298 420 5 5 5 5} But Latex will not print papers as"letter" size. What other configuration do I need to change? _________________ #Thelma BitJam Advocate Joined: 12 Aug 2003 Posts: 2486 Location: Silver City, NM  Posted: Mon Apr 21, 2008 10:52 pm Post subject: I installed TeXLive a couple years ago before it was in Portage so I can't help you directly. But I suggest you run texconfig conf which will print out all your config files. Look in the section called "active config files". This should tell you which files are actually being used. When I run this command, I find that it is using the pdftexconfig.tex file under the ~/.texlive2007/ directory. Perhaps you have a similar user specific config file that is overriding the global setting. I created a new user account and ran texconfig conf and the generic pdftexconfig.tex file shows up. Joseph_sys Advocate Joined: 08 Jun 2004 Posts: 2571 Location: Edmonton, AB Posted: Mon Apr 21, 2008 11:11 pm Post subject:  BitJam wrote: I installed TeXLive a couple years ago before it was in Portage so I can't help you directly. But I suggest you run texconfig conf which will print out all your config files. Look in the section called "active config files". This should tell you which files are actually being used. When I run this command, I find that it is using the pdftexconfig.tex file under the ~/.texlive2007/ directory. Perhaps you have a similar user specific config file that is overriding the global setting. I created a new user account and ran texconfig conf and the generic pdftexconfig.tex file shows up. Yes, I run it:$ texconfig conf

I've check these files they have the correct setting: pdftexconfig.tex (as above)
file: //etc/texmf/dvips/config/config.ps
 Code: % In the past, the a4size and letterSize definitions did not set the % page size, but we want to set it if we can so that ps2pdf can work % properly.  Here, a4 and a4size, and letter and letterSize, are % identical, and we prefer the a4/letter names -- texconfig uses them. % 0 0 595 842 is the right bounding box that applications expect % for A4.  Since dvips always rounds up, choose something slightly % smaller for our paper size. @ letter 8.5in 11in @+ ! %%DocumentPaperSizes: Letter @+ %%BeginPaperSize: Letter @+ /setpagedevice where @+  { pop << /PageSize [612 792] >> setpagedevice } @+  { /letter where { pop letter } if } @+ ifelse @+ %%EndPaperSize @ letterSize 8.5in 11in @+ ! %%DocumentPaperSizes: Letter @+ %%BeginPaperSize: Letter @+ /setpagedevice where @+  { pop << /PageSize [612 792] >> setpagedevice } @+  { /letter where { pop letter } if } @+ ifelse @+ %%EndPaperSize

I don't have any files in my /home/joseph/ directory so the root setting should be default and they are set to "letter"
So I'm puzzled as to what needs to be done. I've straggled last year this the same issue and this year after upgrade is the same thing :-/
_________________
#Thelma
BitJam

Joined: 12 Aug 2003
Posts: 2486
Location: Silver City, NM

 Posted: Mon Apr 21, 2008 11:29 pm    Post subject: How are you verifying the default paper size? In other words, how can I test what the default paper size is on my system?
Joseph_sys

Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

Posted: Tue Apr 22, 2008 12:00 am    Post subject:

 BitJam wrote: How are you verifying the default paper size? In other words, how can I test what the default paper size is on my system?

This is simple just print a page to a file eg. 1.pdf
and type $pdfinfo 1.pdf  Quote: Creator: TeX Producer: pdfTeX-1.40.3 CreationDate: Mon Apr 21 16:28:55 2008 ModDate: Mon Apr 21 16:28:55 2008 Tagged: no Pages: 1 Encrypted: no Page size: 595.276 x 841.89 pts (A4) File size: 13274 bytes Optimized: no PDF version: 1.4 You see "A4" and it should be "letter" And I'm puzzled as eg. my 1.Tex file requesting letterpage:  Code: \documentclass[letterpaper,10pt]{letter} \begin{document} ... _________________ #Thelma BitJam Advocate Joined: 12 Aug 2003 Posts: 2486 Location: Silver City, NM  Posted: Tue Apr 22, 2008 1:49 am Post subject: I think I've solved the problem. You need to run texconfig-sys paper letter in order to change the system-wide settings. The texconfig is just for users. When either program actually changes files, it will tell you the files it changes. If you change the system-wide settings, the user will have to erase their ~/.texlive2007/ directory in order for those changes to take effect. The next time they run pdflatex or texconfig (when files would actually get changed) the ~/.texlive2007/ directory will get recreated and repopulated with config files. There will be a bunch of extra output. Joseph_sys Advocate Joined: 08 Jun 2004 Posts: 2571 Location: Edmonton, AB Posted: Tue Apr 22, 2008 2:30 am Post subject:  BitJam wrote: I think I've solved the problem. You need to run texconfig-sys paper letter in order to change the system-wide settings. The texconfig is just for users. When either program actually changes files, it will tell you the files it changes. If you change the system-wide settings, the user will have to erase their ~/.texlive2007/ directory in order for those changes to take effect. The next time they run pdflatex or texconfig (when files would actually get changed) the ~/.texlive2007/ directory will get recreated and repopulated with config files. There will be a bunch of extra output. You are genus That is it! I didn't even have to create the configuration in home directory with texconfig My Invoice.tex prints in "letter" format; but is not printing correctly, the bottom part is missing (it was printing OK with tetex). Take a look at my preamble  Code: \documentclass[twoside]{scrartcl} \usepackage[frame]{xy} \usepackage{tabularx} \usepackage[latin1]{inputenc} \setlength{\voffset}{0.4cm} \setlength{\hoffset}{-2.0cm} \setlength{\topmargin}{0cm} \setlength{\headheight}{0.5cm} \setlength{\headsep}{1cm} \setlength{\topskip}{0pt} \setlength{\oddsidemargin}{1.4cm} \setlength{\evensidemargin}{1.4cm} \setlength{\textwidth}{18.2cm} \setlength{\textheight}{24.5cm} \setlength{\footskip}{1cm} \setlength{\parindent}{0pt} \renewcommand{\baselinestretch}{1} \begin{document} Is it because {scrartcl} script article is European design? Do you know anything about it? Thanks for your help. _________________ #Thelma BitJam Advocate Joined: 12 Aug 2003 Posts: 2486 Location: Silver City, NM Posted: Tue Apr 22, 2008 2:37 am Post subject: the scrarctl class defaults to a4paper. You should probably give it the letterpaper option:  Code: \documentclass[twoside,letterpaper]{scrartcl} Joseph_sys Advocate Joined: 08 Jun 2004 Posts: 2571 Location: Edmonton, AB Posted: Tue Apr 22, 2008 4:52 am Post subject: BitJam wrote: the scrarctl class defaults to a4paper. You should probably give it the letterpaper option:  Code: \documentclass[twoside,letterpaper]{scrartcl} Thank you for all your help, we can close this topic as sloved. I had to adjust margins a bit  Code: \documentclass[nopagenumber]{scrartcl} \usepackage[latin1]{inputenc} \usepackage{tabularx} \usepackage[letterpaper,top=2.4cm,bottom=0.8cm,left=1.4cm,right=1.5cm]{geometry} \usepackage{graphicx} By the way do you have a good links how to manipulate text positioning in latex. I adjusted the margins but the only margin that come close to the spec on the on the paper is the left margin 1.4cm; all other margins they don't agree with the actual text position on a page. The top margin (the actual text distance from top of the paper) is 1.2cm and in my preamble is set to 2.4cm. All other martins right, bottom don't agree either. The reason I'm asking as I would like to manipulate the text position precisely, but I didn't have much luck. _________________ #Thelma BitJam Advocate Joined: 12 Aug 2003 Posts: 2486 Location: Silver City, NM Posted: Tue Apr 22, 2008 5:37 am Post subject:  Joseph_sys wrote: By the way do you have a good links how to manipulate text positioning in latex? No I don't.  Albert Einstein wrote: The hardest thing in the world to understand is the income tax. If he were alive today, I think he would add "... and margins in LaTeX." You are using the scrartcl class and I thought the whole point of it was to make it easier to deal with the margins. You should probably either closely follow the instructions in the KOMA documentation (texdoc scrartcl) or stop using scratcl. Same thing with the geometry style. I think there can be little wars going in inside of LaTeX with with various packages fighting over what the margins are. Make sure you don't have "custom margins" enabled in CUPS (if you use CUPS). This just confuses things more. It has always seemed to me that there is some small arbitrary offset to the margins on every system I use. There is probably a scientific method for calculating the margins but I always end up whipping out a ruler and adjusting margins by hand. I've been using the memoir class recently for articles and books. My most recent project I merely had to say:  Code: \settrimmedsize{11in}{8.5in}{*} and things came out very reasonable. I also had a few other margin commands which are commented out:  Code: %\settypeblocksize{8.25in}{6.5in}{*} %\setlrmargins{*}{*}{1.0} %\addtolength{\textheight}{\baselineskip} But the memoir class has its own steep learning curve. The first half of the documentation is like someone's senior thesis on page layout and makes reference to the book: The Elements of Typographic Style. If you are determined to do it yourself, the "layout" and "layouts" packages may be useful. They generate an annotated picture of the current layout at 1/2 scale so it all fits on the page and you can see what is going on. I have no idea if they play nice with geometry and/or scrartcl. The book The LaTeX Companion has an entire chapter devoted to page layout (this is where I found out about the layout and layouts packages). It concludes by mentioning the KOMA package and the memoir package. They are both designed to make the layout "easier" but this might mean you lose some control, or at least require that you learn a new set of variables to use to control the layout. Edit: are => or Joseph_sys Advocate Joined: 08 Jun 2004 Posts: 2571 Location: Edmonton, AB Posted: Wed Apr 23, 2008 4:02 pm Post subject: BitJam wrote:  Joseph_sys wrote: By the way do you have a good links how to manipulate text positioning in latex? No I don't.  Albert Einstein wrote: The hardest thing in the world to understand is the income tax. If he were alive today, I think he would add "... and margins in LaTeX." [snip] I couldn't put it better :-/ I have found interesting illustration on page setup: http://www.andy-roberts.net/misc/latex/tutorial8/playout.pdf But I'm still confused, now that my latex is set to print to default paper size "US Letter" when I create an alternative document eg. I need A4 paper size it does not follows the document settings, it still prints as "letter" eg:  Code: \documentclass[a4paper,12pt]{article} \begin{document} \large a buncha stuff \sqrt{\pi} \end{document} To my knowledge this document should be generated as A4 size document and I get "letter":  Code:$ pdfinfo 1.pdf Creator:        TeX Producer:       pdfTeX-1.40.3 ... Page size:      612 x 792 pts (letter) ...

So there is something wrong with this picture or Gentoo configuration of latex. I should be able to generate page according to instructions I setup in the document not my general setting.
_________________
#Thelma
BitJam

Joined: 12 Aug 2003
Posts: 2486
Location: Silver City, NM

Posted: Wed Apr 23, 2008 6:17 pm    Post subject:

If you want to tell pdflatex what paper size to use from within your .tex file then you have to add something extra to propagate the page size to the pdflatex program (strange but true). The simplest thing is to simply add the geometry package:
 Code: \documentclass[a4paper,12pt]{article} \usepackage{geometry}

Alternatively, you can set the pdf page size explicitly:
 Code: \usepackage{ifpdf} \ifpdf     % \setlength{\pdfpagewidth}{8.5in}     % \setlength{\pdfpageheight}{11in}     \setlength{\pdfpageheight}{297 mm}     \setlength{\pdfpagewidth}{210 mm} \fi

This method is useful if you want to use a non-standard paper size.

BTW: the layout picture you found was generated by the layout package I had suggested previously. The layouts package is more powerful because it draws a picture that represents your current layout settings so you can see what your changes are doing. The layout package simply prints the stock picture that you found on the Web.
Joseph_sys

Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

Posted: Wed Apr 23, 2008 7:39 pm    Post subject:

BitJam wrote:
If you want to tell pdflatex what paper size to use from within your .tex file then you have to add something extra to propagate the page size to the pdflatex program (strange but true). The simplest thing is to simply add the geometry package:
 Code: \documentclass[a4paper,12pt]{article} \usepackage{geometry}

Thank you again, it would take me days to find it out. (I'm just a beginner, confused beginner); starting with Latex is like coming from Windows environment to Linux
 Code: Alternatively, you can set the pdf page size explicitly:[code]\usepackage{ifpdf} \ifpdf     % \setlength{\pdfpagewidth}{8.5in}     % \setlength{\pdfpageheight}{11in}     \setlength{\pdfpageheight}{297 mm}     \setlength{\pdfpagewidth}{210 mm} \fi[/code] This method is useful if you want to use a non-standard paper size.

This is what I've been Googling for two days searching for this information and you define it in few lines
I've been trying to modify sql-leger "tex" check printing form but with my Latex knowledge it was impossible. Now I'm getting the picture. I can use this information to design custom check form.
 BitJam wrote: BTW: the layout picture you found was generated by the layout package I had suggested previously. The layouts package is more powerful because it draws a picture that represents your current layout settings so you can see what your changes are doing. The layout package simply prints the stock picture that you found on the Web.

Another simple question. How to generate that page printout? Reading Laout.pdf package information one have to simply include code: "\layout" in preamble section.
When I was reading about "layout" I was under impression that it is all the code inside the document, it never occurred to me that layout is a package.
_________________
#Thelma
BitJam

Joined: 12 Aug 2003
Posts: 2486
Location: Silver City, NM

Posted: Wed Apr 23, 2008 7:56 pm    Post subject:

 Joseph_sys wrote: Another simple question. How to generate that page printout? Reading Laout.pdf package information one have to simply include code: "\layout" in preamble section.

The \layout command needs to be in the document section (you also need to include the layout package in the preamble). The layout package just prints out that one fixed picture. You can use the layouts package (notice the added "s") to print out a picture of the actual layout of your document.

This prints out the fixed picture:
 Code: \documentclass{article}  \usepackage{layout} \begin{document} \layout \end{document}

This prints out a picture of the actual layout of your document:
 Code: \documentclass{article} \usepackage{layouts} \begin{document} \pagediagram \end{document}

The layouts package should be useful to you for printing checks.
Joseph_sys

Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

 Posted: Wed Apr 23, 2008 8:44 pm    Post subject: Wow! Thank you. This is a golden information, nowhere to be found except Gentoo forum It worked like a charm. I will be experimenting with this. Now I have an encouragement to push my 16-year old daughter to try Latex._________________#Thelma
Joseph_sys

Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

 Posted: Thu Apr 24, 2008 5:40 am    Post subject: BitJam, thank you for the offer of additional help, I'm sure others will find this topic interesting as Latex is rather complicated and a help is hard to find, so I appreciate your help. But I think it might be better if we continue this subject on: Documentation, Tips & Tricks forum: https://forums.gentoo.org/viewtopic-t-689573.html_________________#Thelma
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum Assistance----------------News & AnnouncementsFrequently Asked QuestionsInstalling GentooMultimediaDesktop EnvironmentsNetworking & SecurityKernel & HardwarePortage & ProgrammingGamers & PlayersOther Things GentooUnsupported Software Discussion & Documentation----------------Documentation, Tips & TricksGentoo ChatGentoo Forums FeedbackOff the WallDuplicate Threads International Gentoo Users----------------中文 (Chinese)DutchFinnishFrenchDeutsches Forum (German)  Diskussionsforum  Deutsche DokumentationGreekForum italiano (Italian)  Forum di discussione italiano  Risorse italiane (documentazione e tools)Polskie forum (Polish)  Instalacja i sprzęt  Polish OTWPortuguese  Documentação, Ferramentas e DicasRussianScandinavianSpanishOther Languages Architectures & Platforms----------------Gentoo on AMD64Gentoo on ARMGentoo on PPCGentoo on SparcGentoo on Alternative ArchitecturesGentoo for Mac OS X (Portage for Mac OS X)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum