## WeBWorK Main Forum

### hardcopy with one question per page?

by Andras Balogh -
Number of replies: 4

Is there a setting to somehow create hardcopy (PDF) of assignments with one question per page? (without editing the TeX file by hand)

Adding to the end of each question in PGML  this code works, but this is an ugly hack.

[ $\vfill$ ]

Thanks,

Andras

### Re: hardcopy with one question per page?

by Danny Glin -

As of WW 2.14 (or maybe 2.13) WeBWorK provides hardcopy themes, which live in /opt/webwork/webwork2/conf/snippets/hardcopyThemes.  You could create your own custom theme which does this.

I'd suggest making a copy of the oneColumn theme, then editing hardcopyProblemDivider.tex, and adding a \pagebreak.  In fact, you could probably replace everything in that file with a \pagebreak.

You can select a hardcopy theme for the course via the Course Configuration page.  Unfortunately this setting is for the whole course, so you can't set different hardcopy formats for different sets in the same course.

### Re: hardcopy with one question per page?

by Andras Balogh -
Thanks!

This sounds great. I also found the description of this at http://webworkgoehle.blogspot.com/2016/02/hardcopy-themes.html

The change from default twoColumn to oneColumn works, but for some reason the rest does not. The onePerpage option does not show up. I added these lines to localOverrides.conf and even to the individual course.conf file. Restarted the httpd several times. I will keep trying.

# Available Hardcopy themes (located in snippets)
$hardcopyThemes = [qw(oneColumn twoColumn onePerpage)]; # Hardcopy theme names (pretty names for themes)$hardcopyThemeNames = {oneColumn => 'One Column',
twoColumn => 'Two Columns',
onePerpage => 'One Perpage'};
# Default Hardcopy them
\$hardcopyTheme = "oneColumn";

### Re: hardcopy with one question per page?

by Danny Glin -
I'm seeing the same behaviour. When I add a theme it doesn't show up on the Course Configuration page.

It turns out that you can choose the theme when you generate an individual hardcopy. When I made your quoted changes to localOverrides.conf I now see my theme as one of the choices at the bottom of the hardcopy generator page.

I don't know why this isn't propagating to the Course Configuration page, and I don't have any more time to look at it right now.