0

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??

7
  • Try with package geometry, if it is compatible with the jreport class.
    – Bernard
    Feb 8, 2018 at 9:48
  • I tried. But the text is forced out. Why?
    – Sakurai.JJ
    Feb 8, 2018 at 9:53
  • it seems that jreport not support b5paper option or you have in preamble some settings, which override this options.
    – Zarko
    Feb 8, 2018 at 9:55
  • Unfortunately, I do not know this class. Just in case: did you type specifically \geometry{b5paper}? Maybe type it with AtBeginDocument.
    – Bernard
    Feb 8, 2018 at 9:56
  • I wrote \usepackage[b5paper]{geometry}
    – Sakurai.JJ
    Feb 8, 2018 at 9:57

1 Answer 1

6

I 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.

Use dvipdfmx's -p papersize option

If you typeset the MWE above with

platex mwe.tex
dvipdfmx -p b5 mwe.dvi

you will get a B5-sized PDF.

Use geometry's pass option

The 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.

Use bxpapersize package

Since 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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .