Recent Changes · Search:

Support the Project



edit SideBar


Search: Turn search results into a printed article

The report document class is too wasteful for typesetting a few search results. How can we specify the article class?

Calligraphy from the 8th century

In Tip 00043, we saw how to use a pagelist directive to create a print-on-demand search service. That tip uses the report document class, so the printed output includes front matter, such as a cover page and table of contents, so is generally profligate in its appetite for paper. If both “duplex” and “sectionnewpage” are on, the results can be absurd, especially if the pages are short. So it makes sense to have a way to use the more frugal article class, used for typesetting single pages, especially if searchers only want to select and print a few pages.

As of version 2.2.6, Wikipublisher includes a special format option to do this, shown in Print selected search results.

Print selected search results

(:pagelist abbreviation group={$Group} list=normal fmt=article :)

The first part of the directive is standard pagelist options: look for “abbreviation” on pages in the current group, omitting the usual suspects like the Recent Changes page. The final option, fmt=article, tells pagelist to use the special “article” format included with Wikipublisher. This turns the output into a form, with a checkbox against each page found that meets the search criteria. In the PDF view of the page, in place of the form the results list reverts to the default definition list format.

The PDF version is formatted using the “article” template. For greater clarity, as of version 2.2.6 the fmt=report option is available, which is exactly the same as fmt=custom — i.e. it uses the “report” template.

The action=links option (see Tip 00038) now also uses the article class for its output.

Category: navigation aid

« 00043 · Edit Form · 00045 »

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 06 October 2008 at 08:31 PM