Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've been using WikiPublisher (an addon for pmwiki) with quite a bit of success. Lately though, I have been wanting to customize the tex file that is used to generate the final pdf file from a wikitrail page. WikiPublisher generates XML on the fly and then converts that to Tex. but there must be templates somewhere that allow me to add custom code.

In fact, there is a template folder in the wikibook folder that is installed with the package, but the structure is complicated and it is not clear that the file (or files) I need to edit is even in there, or is it in a LateX installation folder? After spending hours of going through the code I decided I would check to see if somebody has already gone through the effort and discovered how to do this. Thanks for any information.

I have discovered that it is running the pdftex executable and building from xml files created in the tmp folder. What templates are likely being referenced or how can I tell which ones are? I have very little experience with LaTeX, but I do have an idea of what code I can add to manipulate the properties I want.

share|improve this question

1 Answer 1

After quite a bit of time looking through code and experimenting I found that the following solution provides me with margins more appropriate for my task at hand.

WikiPublisher installs into a folder called 'wikibook' in which there is a folder 'template'. The folder contains many *.cfg, and *sty files. Locate the file called 'wikibook.sty'. Apparently, this is the master file used when WikiPublisher generates a book from a wikitrail.

Around line 448 or so (for my version 2.2.39) the existing code was: (the % sign indicates a commented line)

%\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-0.375in}
\addtolength{\voffset}{-0.125in}

\setlength{\evensidemargin}{0.3in}
\setlength{\oddsidemargin}{0.3in}

Which I changed to:

%\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{0.375in}
\addtolength{\voffset}{-0.125in}

\setlength{\evensidemargin}{-0.6in}
\setlength{\oddsidemargin}{0in}
\addtolength{\textwidth}{0.6in}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.