Discussion:
[MiKTeX] Landscape mode from YAP?
Rex Shudde
2007-07-30 18:01:03 UTC
Permalink
I have a single sheet that I have TeXed with MiKTeX. It needs to be printed in landscape mode. YAP apparently only views dvi output in portrait mode. When I ask it to print in landscape mode, the printing orientation is proper but the right-hand portion is truncated at what would be the right hand edge if I were printing in portrait mode.

How can I get YAP (1) to view the complete page in landscape mode, and, most importantly, (2) to print the entire page in landscape mode?

Thank you,

Rex Shudde
Alan Ristow
2007-07-30 18:55:04 UTC
Permalink
Post by Rex Shudde
I have a single sheet that I have TeXed with MiKTeX. It needs to be printed in landscape mode. YAP apparently only views dvi output in portrait mode. When I ask it to print in landscape mode, the printing orientation is proper but the right-hand portion is truncated at what would be the right hand edge if I were printing in portrait mode.
How can I get YAP (1) to view the complete page in landscape mode, and, most importantly, (2) to print the entire page in landscape mode?
Yap uses whatever page dimensions you specify via MiKTeX Settings (or
set as your default during setup) unless your dvi file explicitly
overrides them. It may be that dvi files don't include page dimensions
-- I'm not familiar enough with the dvi standard to know, but there are
some document classes that explicitly set the page dimension in the dvi
by default. Most seem not to, though.

At any rate, the few times I've needed to explicitly set the page
dimensions, adding the following to my preamble has worked:

\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}

I recommend adding this only when you know you need it -- otherwise, you
could mess up the settings of whatever document class you're using.

I presume it will print in landscape mode once you've done this, but
since I never print from Yap I can't say for sure.

Alan
Martin Schröder
2007-07-30 19:00:08 UTC
Permalink
Post by Alan Ristow
At any rate, the few times I've needed to explicitly set the page
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\usepackage{geometry}
should also do the trick.

And of course, specifying landscape as a global option helps.

Best
Martin
Alan Ristow
2007-07-30 19:45:23 UTC
Permalink
Post by Martin Schröder
Post by Alan Ristow
At any rate, the few times I've needed to explicitly set the page
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\usepackage{geometry}
should also do the trick.
In my experience, geometry.sty doesn't explicitly put the page size in
the dvi. It will change the margins appropriately for landscape, but
when Yap opens the dvi it will display it on a portrait page with the
text running off the right side of the page.
Post by Martin Schröder
And of course, specifying landscape as a global option helps.
In most classes, including the standard ones (e.g., article), it only
changes the size of the text block. It doesn't provide any information
to Yap about the page size, so Yap does not display it correctly. Some
classes *will* set this correctly, but most won't.

If you're so inclined, try various combinations of \usepackage{geometry}
and \AtBeginDvi in the minimal example below to see what I'm talking about.

Alan


\documentclass[landscape]{article}
\usepackage{lipsum}

% Uncomment for proper margins.
% \usepackage{geometry}

% Uncomment for proper page size in Yap.
% \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}

\begin{document}
\lipsum[1-4]
\end{document}
Ulrike Fischer
2007-07-31 07:13:19 UTC
Permalink
Post by Alan Ristow
Post by Martin Schröder
Post by Alan Ristow
At any rate, the few times I've needed to explicitly set the page
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\usepackage{geometry}
should also do the trick.
In my experience, geometry.sty doesn't explicitly put the page size in
the dvi. It will change the margins appropriately for landscape, but
when Yap opens the dvi it will display it on a portrait page with the
text running off the right side of the page.
YAP needs a dvips-\special that sets the papersize. So if you are
using geometry you must add the driver (it won't do any harm if you
are also making a pdf with pdflatex):
\usepackage[dvips]{geometry} or \usepackage[dvipdfm]{geometry}

The main drawback in using the dvips option of geometry is that in the
landscape case it also adds another postscript special
(\AtBeginDvi{\special{! /landplus90 true store}}) and so YAP tries to
switch to dvips render method.
--
Mit freundlichen Grüßen
Ulrike Fischer
mailto:***@nililand.de
Alan Ristow
2007-07-31 13:05:25 UTC
Permalink
Post by Ulrike Fischer
Post by Alan Ristow
Post by Martin Schröder
Post by Alan Ristow
At any rate, the few times I've needed to explicitly set the page
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\usepackage{geometry}
should also do the trick.
In my experience, geometry.sty doesn't explicitly put the page size in
the dvi. It will change the margins appropriately for landscape, but
when Yap opens the dvi it will display it on a portrait page with the
text running off the right side of the page.
YAP needs a dvips-\special that sets the papersize. So if you are
using geometry you must add the driver (it won't do any harm if you
\usepackage[dvips]{geometry} or \usepackage[dvipdfm]{geometry}
The main drawback in using the dvips option of geometry is that in the
landscape case it also adds another postscript special
(\AtBeginDvi{\special{! /landplus90 true store}}) and so YAP tries to
switch to dvips render method.
Thanks Ulrike. I'm not a regular user of geometry, but it seems I have
been answering this question a lot lately, so it's good to know how to
solve it with geometry.sty instead of the \special.
Rex Shudde
2007-08-10 20:27:47 UTC
Permalink
I must apologize for not responding to all who have responded to this
request.

I thought I was signing up for the MiKTeX User's mailing list and was to
receive a daily digest of the day's postings. Apparently this was not so,
for it was only today that I learned from a colleague that all of the
postings were going to nabble.com, something I'd never heard of.

I haven't had a chance to try out the one suggestion that may be useful to
me. And I apologize to the other responders for not making it clear that I
am a 20 year user of plain TeX, and do not use LaTeX.

Thank you again for your patience and all of your responses,

Rex Shudde
Post by Rex Shudde
I have a single sheet that I have TeXed with MiKTeX. It needs to be
printed in landscape mode. YAP apparently only views dvi output in
portrait mode. When I ask it to print in landscape mode, the printing
orientation is proper but the right-hand portion is truncated at what
would be the right hand edge if I were printing in portrait mode.
How can I get YAP (1) to view the complete page in landscape mode, and,
most importantly, (2) to print the entire page in landscape mode?
Thank you,
Rex Shudde
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
MiKTeX-Users mailing list
https://lists.sourceforge.net/lists/listinfo/miktex-users
--
View this message in context: http://www.nabble.com/Landscape-mode-from-YAP--tf4178367.html#a12098492
Sent from the miktex-users mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...