I made document a4page size.
\documentclass[10pt, a4paper,dvipdfmx]{jreport}
But I want to change the page size to b5. So I wrote
\documentclass[10pt, b5paper,dvipdfmx]{jreport}
But the page size does not change. Why??
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI suppose your MWE is something like
\documentclass[10pt,b5paper,dvipdfmx]{jreport}
\begin{document}
foo
\end{document}
and typeset this using pLaTeX and dvipdfmx, which indeed produces an A4-sized PDF. The reason for this is that the b5paper
option just tells jreport
to lay out the content in a B5-sized domain but is not related to the actual page size of the output. In addition to this, DVI has no concept of output page size and therefore dvipdfmx assumes the output page size to be its default value (i.e., A4) when converting the source DVI to PDF.
You have basically three options to set the output page size identical to the layout page size.
-p papersize
optionIf you typeset the MWE above with
platex mwe.tex
dvipdfmx -p b5 mwe.dvi
you will get a B5-sized PDF.
geometry
's pass
optionThe geometry
package is usually used to set margins, but it only sets the output page size same as the layout page size if it is loaded with pass
option.
\documentclass[10pt,b5paper,dvipdfmx]{jreport}
\usepackage[pass]{geometry}
\begin{document}
foo
\end{document}
will produce a B5-sized PDF without specifying the -p
option in dvipdfmx. Note that you need to add dvipdfm
(not dvipdfmx
) to the geometry
package's option if you use v5.7 or earlier.
bxpapersize
packageSince bxpapersize
is a rather new package, it might not be installed in your TeX distribution. This package offers many features about setting the page size, but loading the package is enough in your use case.
\documentclass[10pt,b5paper,dvipdfmx]{jreport}
\usepackage{bxpapersize}
\begin{document}
foo
\end{document}
will produce a B5-sized PDF without specifying the -p
option in dvipdfmx.
geometry
, if it is compatible with thejreport
class.jreport
not supportb5paper
option or you have in preamble some settings, which override this options.\geometry{b5paper}
? Maybe type it withAtBeginDocument
.