custom book styles

5 views
Skip to first unread message

JR

unread,
Nov 23, 2011, 4:37:38 PM11/23/11
to wikipublisher, hu...@pressbooks.com
Last year, the wikibook pdf server introduced support for local
configuration files that can override the wikibook layout defaults.
The limitation of this approach is that the local configuration files
act on all outputs -- you cannot easily specify different local styles
for different books. So if an author wanted something beyond what the
base layout options offer, she was out of luck.

Until now.

To support the flexibility required for pressbooks.com, we are
investigating a way to specify a local style file on a per-book basis.
The wikibook xml looks like this:

<book style="http://address.for.custom/mystyle.sty">

The author uploads mystyle.sty and the wikibook pdf server retrieves
it and applies it to the book. If this feature is sufficiently
popular, we can imagine a growing online library of style files to
produce different book skins for different purposes.

A preliminary proof-of-concept is working, but it meant refactoring
quite a lot of the code that controls the layout of things like the
title pages, chapter styles, and so on. There is a risk that this
refactoring *may* break some local wikibook.cfg or wikibook-book.cfg
files.

This note is to warn those running the pdf server, especially those
who use local cfg files, that you will need to test your installation
with more than the usual care at the next release.

I would also welcome any volunteers willing to test the new
capabilities when they come out, by building your own custom book
styles. To give some idea of the flexibility, I have already tested
defining a new paper size and it just worked. Once this feature is
released into the wild, it becomes quite hard to change the underlying
layout commands, so I want to take the time to do it right.

Comments and suggestions are always welcome. And thanks to Hugh at
pressbooks for pushing the boundaries of what wikipublisher can do.

JR

Vittorio Muth

unread,
Nov 30, 2011, 4:31:25 PM11/30/11
to wikipu...@googlegroups.com

Hello JR

I would like to test it since the output of the mas/bac/phd thesis printer at http://pragm.ath.cx was accepted :-)
So the post print version may break. I just need to write a .sty file first because I have some customizations in wikibook.cfg and wikibook-book.cfg.

Vito

> --
> You received this message because you are subscribed to the Google Groups "wikipublisher" group.
> To post to this group, send email to wikipu...@googlegroups.com.
> To unsubscribe from this group, send email to wikipublishe...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/wikipublisher?hl=en.
>

JR

unread,
Dec 1, 2011, 2:34:14 AM12/1/11
to wikipublisher
Hi Vito and congratulations.

Most customisations in wikibook.cfg and wikibook-book.cfg should
continue to work.

The main change I am making is to simplify the commands for fancy book
covers.

In the current version, regular covers use \bookhalftitle and
\booktitle to lay out the halftitle and title pages. Fancy covers use
separate commands for each different title page option plus a command
for a plain half title page. The fanciest covers have yet another set
of halftitle and title page commands. There are 11 commands in all.

In the new version, there will just be 2 commands: \bookhalftitle and
\booktitle.

So if the local cfg files redefine \booktitle and \bookhalftitle with
\renewcommand, they will continue to work, I think. If they do break,
the fix should be simple.

The new sty files are an additional feature, allowing authors to
change the layout one book at a time -- any cfg files will continue to
apply to all books. The sty file loads after the cfg file(s) so takes
priority.

Hope that makes sense. I plan to release a version for testing before
Christmas.

JR

On Dec 1, 10:31 am, Vittorio Muth <vittorio.m...@gmail.com> wrote:
> Hello JR
>
> I would like to test it since the output of the mas/bac/phd thesis printer

> athttp://pragm.ath.cxwas accepted :-)


> So the post print version may break. I just need to write a .sty file first
> because I have some customizations in wikibook.cfg and wikibook-book.cfg.
>
> Vito
>

Reply all
Reply to author
Forward
0 new messages