Forum News

Prince alpha 2007-01-16 released

mikeday
Today we have released a new alpha version of Prince, demonstrating some features that will be available in future releases.

The alpha version is available for download here:

Prince alpha 2007-01-16

The new alpha fixes several minor issues that were found in the last alpha version, including the problem that was affecting internal links. It also adds support for new SVG features including opacity and gradients.

Thanks to everyone who tried out the last alpha version! :D

Michael
mikeday
Quick update: there was an issue with the initial version of the alpha leading to an internal error for most users. This issue has been corrected; please download the alpha again if you were affected by the error. Sorry for any inconvenience! :)
davidpratten
Thanks for including unbalanced columns in v6. It has been worth the wait! :D
JML
Thanks for the revised Alpha 6 for WinXP which fixed the links problem.

I processed a file that I had run through v5.1 r13.
The file processed through the latest Alpha 6 seems to kick the page number in the margin back to the previous page.

Here's some example code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
ul.toc {
margin: 0; padding: 0;
list-style-type: none;
}

ul.toc a::after {content: leader('.') target-counter(attr(href), page);}

a {text-decoration: none; color: Black;}

#Page-1 {counter-reset: page 1;}

@page {
margin: 0.8in 0.625in 0.8in 0.625in;
size: 6in 9in;
}

@page:left {
@top-left {
font: bold 10pt;
content: counter(page) "\A0 \A0 \A0" "Author";
vertical-align: bottom;
padding-bottom: 1em;
}
@bottom-left {content: normal;}
}

@page:right {
@top-right {
font: bold 10pt;
content: "Title" "\A0 \A0 \A0" counter(page);
vertical-align: bottom;
padding-bottom: 1em;
}
@bottom-right {content: normal;}
}

div.frontmatter {page: blank;}

@page blank:left {
@top-left {content: normal;}
@bottom-left {content: normal;}
}

@page blank:right {
@top-right {content: normal;}
@bottom-right {content: normal;}
}

div.contents {page: lower-roman;}

@page lower-roman:left {
@top-left {
content: counter(page, lower-roman);
padding-top: 1em;
vertical-align: top;
}
@bottom-left {content: normal;}
}

@page lower-roman:right {
@top-right {
content: counter(page, lower-roman);
vertical-align: bottom;
padding-bottom: 1em;
}
@bottom-right {content: normal;}
}

div.frontmatter, div.contents, div.chapter {page-break-before: always;}

div.frontmatter, div.contents, div.chapter {page-break-before: right;}
</style>
</head>

<body>
<div class="frontmatter">
<h1>Titlepage</h1>
</div>

<div class="contents">
<h1>Contents</h1>
<ul class="toc">
<li><a href="#ch1">Chapter 1</a></li>
<li><a href="#ch2">Chapter 2</a></li>
</ul>
</div>

<div id="ch1" class="chapter">
<h1 id="Page-1">Chapter 1</h1>
</div>

<div id="ch2" class="chapter">
<h1>Chapter 2</h1>
</div>
</body>
</html>

So, what I get in the .pdf is the verso of Titlepage showing "iii" in the top margin instead of blank, and the verso of Contents showing "1 Author" in the top margin instead of blank.

I uninstalled v6 and re-installed v5; the above code processed as I expected it should with blank content where wanted in th v5 file.
mikeday
This is caused by a change in the new alpha where blank pages introduced by "page-break-before: left | right" still have margin box content for headers and footers. There is a new page class called :blank which you can use to modify or suppress this behaviour. Adding a rule like this should get back the old output:
@page:blank {
    @top-left { content: none }
    @top-right { content: none }
}
JML
Thanks for your help.
mrLenin
May I use your code, JML?
JML
mrLenin wrote:
May I use your code, JML?

Help yourself to it.