Hardcopy Themes

From WeBWorK_wiki
Revision as of 03:29, 18 August 2023 by Alex Jordan (talk | contribs) (Created page with "Starting with version 2.18, it is relatively easy to customize a theme for PDF hardcopies. == Theme Files == A hardcopy them file is an XML file, as described in the [https:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Starting with version 2.18, it is relatively easy to customize a theme for PDF hardcopies.

Theme Files

A hardcopy them file is an XML file, as described in the README file in the webwork2/assets/tex/hardcopyThemes/ folder. It provides LaTeX code for various parts of a complete .tex file for a PDF hardcopy of an asssignment. Several of these theme files come with the distribution. Also, a course can have more of them in its templates/hardcopyThemes/ folder.

Distribution Themes

The 2.18 distribution comes with the following themes:

  • Basic This theme produces hardcopies with minimal page headers displaying the set title and username, and minimal problem numbering.
  • Basic-Two Column Like "Basic", but with two columns.
  • Boxed This theme uses the tcolorbox package to put each exercise in a box.
  • Boxed-Rows Like "Boxed", but exercises progress row by row, with two exercises per row. Exercises in this theme will not break across pages, so this theme is better suited for sets with short exercises.
  • Boxed-Two Column Like "Boxed", but with two columns where exercises progress vertically.
  • Classic This theme produces hardcopies styled as hardcopies were styled prior to version 2.18.
  • Classic-Two Column Like "Classic", but with two columns.
  • Empty This theme is meant for rendering problems with no metadata or styling beyond the LaTeX defaults for the article class. Each problem (including the PG set header) gets its own page.
  • Hebrew This theme is like "One Column" but with some necessary components to include Hebrew script. This theme should only be used if xelatex is the latex engine.
  • Hebrew-Two Column Like "Hebrew", but with two columns.
  • One Column This theme uses the LaTeX exam class to manage page headers and footers, as well as question enumeration.
  • Two Column Like "One Column", but with two columns.

Users with high enough permission can choose which hardcopy theme they would like to use when building a hardcopy. They choose from the list of enabled hardcopy themes. Visit Course Config, General tab, to select which hardcopy themes you would like enabled. All themes except the Hebrew themes are enabled by default. You must save your selections and then reload the page for the new selections to be reflected in the Course Config page.