Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help with LaTeX (texlive) paper settings
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jd42
n00b
n00b


Joined: 29 Nov 2009
Posts: 20

PostPosted: Thu May 28, 2020 8:10 pm    Post subject: help with LaTeX (texlive) paper settings Reply with quote

Not sure where is the best place to ask this, but can anyone help get my paper size configured for LaTeX, particularly for PDF generation? No matter what I try, everything seems to revert to A4 size. (Being in the US I need letter sized paper.)

In the past, configuring paper size was done simply by running "texconfig" and selecting the right option.

Now, there seems to be both "texconfig" and "texconfig-sys", but neither function as expected. The interactive mode just quits after the initial screen, and trying batch mode "texconfig paper letter" dumps several "tlmgr: command not found" errors. It seems tlmgr is not included on Gentoo systems?

/etc/papersize is set correctly, and even manually editing /etc/texmf/dvipdfmx.d/dvipdfmx.cfg makes no difference.

What am I forgetting to check? Thanks.....
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu May 28, 2020 8:30 pm    Post subject: Reply with quote

I usually defined the paper size in the documentclass header:
Code:
\documentclass[11pt,a4paper,twoside]{article}
or
Code:
\documentclass[11pt,letterpaper,twoside]{article}

But that was 10 years ago...
Back to top
View user's profile Send private message
jd42
n00b
n00b


Joined: 29 Nov 2009
Posts: 20

PostPosted: Thu May 28, 2020 8:36 pm    Post subject: Reply with quote

mike155 wrote:
I usually defined the paper size in the documentclass header:
Code:
\documentclass[11pt,a4paper,twoside]{article}
or
Code:
\documentclass[11pt,letterpaper,twoside]{article}

But that was 10 years ago...


Oh it is set there as well. But the system is overriding that back to A4, and whatever setting is doing so has remained elusive so far.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri May 29, 2020 12:10 am    Post subject: Reply with quote

  1. How do you compile your document? 'pdflatex mydocument.tex'?

  2. Which version of TeX/LaTeX is installed?

  3. Please post the output of 'emerge --info'
Back to top
View user's profile Send private message
jd42
n00b
n00b


Joined: 29 Nov 2009
Posts: 20

PostPosted: Fri May 29, 2020 2:13 pm    Post subject: Reply with quote

mike155 wrote:
  1. How do you compile your document? 'pdflatex mydocument.tex'?

  2. Which version of TeX/LaTeX is installed?

  3. Please post the output of 'emerge --info'


I use latex to compile into DVI, then dvipdfm to convert to PDF. But using pdflatex gives the same result in paper size.

Code:

*  app-text/texlive
      Latest version available: 2020
      Latest version installed: 2020
      Size of files: 0 KiB
      Homepage:      http://tug.org/texlive/
      Description:   A complete TeX distribution
      License:       metapackage


Code:

Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.30-r8, 5.4.38-gentoo x86_64)
=================================================================
System uname: Linux-5.4.38-gentoo-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.6
KiB Mem:     7901148 total,   1465188 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of repository gentoo: Sat, 23 May 2020 11:30:01 +0000
Head commit of repository gentoo: f4841815cb707b2aad2db97001a0a38eab577c34
sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo
dev-util/cmake:           3.16.5::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=amdfam10 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=amdfam10 -O2 -pipe"
GENTOO_MIRRORS="https://mirrors.rit.edu/gentoo/ http://mirrors.rit.edu/gentoo/ ftp://mirrors.rit.edu/gentoo/ rsync://mirrors.rit.edu/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl alsa amd64 berkdb bzip2 cli crypt dri dvd dvdr flac fortran gdbm gif iconv ipod jpeg latex libtirpc mozilla mp3 mp4 multilib ncurses nls nptl openmp pam pcre pdf png postscript readline seccomp spell split-usr ssl tcpd udev unicode usb vcd xattr zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Fri May 29, 2020 2:58 pm    Post subject: Reply with quote

https://en.wikibooks.org/wiki/LaTeX/Page_Layout#Page_size
Back to top
View user's profile Send private message
ununu
n00b
n00b


Joined: 19 Apr 2020
Posts: 31

PostPosted: Fri May 29, 2020 10:27 pm    Post subject: Reply with quote

greets,

From installing texlive suite I recall seeing a funky USE flag somewhere that controlled the type of default page size.

But I am not sure which package or USE flag. The description was something like 'use letter size as default' or something. I know it's part of the texlive dependencies.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Fri May 29, 2020 11:36 pm    Post subject: Reply with quote

Doing a quick search, one thing that came up as being a cause for the problem; one when you are using 2+ programs to get to your desired format. In this; it is more of meaning, you going to dvi, and then from dvi to pdf being 2 seperate steps/programs instead of using pdflatex and go directly to pdf skipping dvi middle step...

https://tex.stackexchange.com/questions/162555/paper-size-incorrect-when-using-latex-instead-of-pdflatex

The above link goes over, that part of the wrong paper size is used. The next couple links goes over making sure the correct paper size is used.

https://tex.stackexchange.com/questions/253399/changing-a4paper-to-letterpaper
https://tex.stackexchange.com/questions/409542/changing-default-paper-size-for-tex-live
Back to top
View user's profile Send private message
jd42
n00b
n00b


Joined: 29 Nov 2009
Posts: 20

PostPosted: Sat May 30, 2020 4:20 pm    Post subject: Reply with quote

ct85711 wrote:

https://tex.stackexchange.com/questions/409542/changing-default-paper-size-for-tex-live


This last link describes using tlmgr to configure the paper size, which is exactly what texconfig used to do in the past. However, this is no longer possible, because tlmgr no longer appears to be part of the texlive install on Gentoo. As described above, texconfig kicks out the "tlmgr: command not found" because tlmgr isn't present any more.

What is unclear to me is why tlmgr has been removed from the installation, and what is meant to replace it?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat May 30, 2020 4:35 pm    Post subject: Reply with quote

jd42, does the \special command help, which is shown in the article fturco linked to? You've got to scroll down a bit to find it. :)
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Sun May 31, 2020 11:09 am    Post subject: Reply with quote

According to the article I linked before, if you use the geometry package with the pdflatex command, it should usually work fine:
Code:
\usepackage[letterpaper]{geometry}
Back to top
View user's profile Send private message
rndusr
Guru
Guru


Joined: 04 Dec 2005
Posts: 392

PostPosted: Mon Jun 08, 2020 8:10 am    Post subject: Reply with quote

jd42 wrote:

I use latex to compile into DVI, then dvipdfm to convert to PDF.


Is that done as part of a larger scale bronze age reenactment?

To build example.tex you should use
Code:
latexmk -pdf example

or
Code:
latexmk -xelatex example

_________________
If you've got nothing nice to say, you're probably not alone...
Back to top
View user's profile Send private message
jd42
n00b
n00b


Joined: 29 Nov 2009
Posts: 20

PostPosted: Mon Jun 08, 2020 8:13 pm    Post subject: Reply with quote

PanzerKanzler wrote:
jd42 wrote:

I use latex to compile into DVI, then dvipdfm to convert to PDF.


Is that done as part of a larger scale bronze age reenactment?

Compiling a LaTeX document into DVI, and then using a converter into a final format is a fundamental concept in how TeX was designed to work. The idea being that when a new favorite output format comes along (PS, PDF, etc.), only a new converter need be developed, and the actual typesetting program needs no changes.

PanzerKanzler wrote:

To build example.tex you should use
Code:
latexmk -pdf example

or
Code:
latexmk -xelatex example



Sorry, but there is no "latexmk" command on my system. What package includes that program?
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Tue Jun 09, 2020 12:32 pm    Post subject: Reply with quote

jd42 wrote:
Sorry, but there is no "latexmk" command on my system. What package includes that program?

dev-tex/latexmk
Back to top
View user's profile Send private message
jd42
n00b
n00b


Joined: 29 Nov 2009
Posts: 20

PostPosted: Thu Feb 11, 2021 3:17 pm    Post subject: Reply with quote

Just an update with a workaround for anyone else fighting a similar situation:

Converting from DVI -> PS -> PDF provides a solution.

Code:

dvips -t letter <DOC>.dvi

will force a letter paper formatted postscript file. This can then be converted to PDF with "ps2pdf".

There still exists the mysteries why setting letter size in various configuration files seems to have no effect, and also why tlmgr is no longer included in the system (and thus disabling texconfig).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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