Page numbers
Hello again!
I am writing a fine addition to the "Swiss" CSS which I am
streamlining for printing. If I get this right there will be very
few difference between a LaTeX generated pdf and a MultiMarkdown
one...
I have one main problem, that I cannot get resolved on my own and I
was hoping you could throw an eye on.
I have numbers different types of headers to get into a table of
contents, but I need page numbers for this. Acording to the web
this should be easy with CSS. But I don't get anything on my
pdf...! I don't get even the pdf output to respect my page margins
in the @media print section! Maybe it just won't print anything in
my footers?
Here is what I am trying to use:
@page :first {
margin-top: 10cm /* Top margin on first page 10cm */
}
@page :left {
margin-left: 4cm;
margin-right: 3cm;
:header { content: "QQQQQ";}
:footer { content: "QQQQQ";}
}
@page :right {
margin-left: 3cm;
margin-right: 4cm;
:header { content: "QQQQQ";}
:footer { content: "QQQQQ";}
}
...where QQQQQ is just some nonsense text. For reference I attach my CSS script. Please note that this is work-in-progress and so far I have been working primarily on the print section.
What am I doing wrong? I greatly appreciate your help (in turning LaTeX useless...)!
Best,
Michael
- swiss-new.css 9.04 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 11 Oct, 2013 03:43 PM
For unfathomable reasons, Apple's implementation of WebKit does not yet recognize the @page directive. The print system is also incapable of adding page numbers to output. It is, for the time being, a pipe dream.
Hopefully both issues will be resolved soon…
2 Posted by Michael Jelden on 14 Oct, 2013 11:06 AM
I am sorry to hear this. This is a very unexpected problem. Do you believe this will be fixed or would you rather not expect this?
I have, however, been finding at the website of MultiMarkdown Composer the following under "Printing Preferences":
“Print headers/footers on each page” – should Composer add the header and footer when printing?
“Header template” – this field tells Composer what information to put in the header. The default is:
%author\t%MMD_TITLE\t%MMD_DATE
“Footer template” – this field tells Composer what information to put in the footer. The default is:
\t\t%MMD_PAGE of %MMD_PAGES
Template Meaning
%foo Insert the value of the foo metadata variable
%MMD_TITLE Insert the filename for the file being printed
%MMD_DATE Insert timestamp indicating the time the document was printed
%MMD_PAGE Insert the current page being printed
%MMD_PAGES Insert the total number of pages in the document
\t Use this to separate the left, center, and right portions of the header
So it look like that either (a) this would be an extra of that very competitor or (b) that there is a way to do it... Can you help explaining this?
Thanks,
Michael
Support Staff 3 Posted by Brett on 14 Oct, 2013 01:13 PM
This is the tact I've been working on myself. The print system does allow me to draw headers and footers, I just need to get the dynamic text in there. So it is possible. I wouldn't count on the WebKit fix happening any time soon, but I will continue my efforts to add headers and footers.
4 Posted by Michael Jelden on 14 Oct, 2013 06:42 PM
Great news, thanks. It's great to know that your on that subject and I'm looking forward to seeing this!
Best,
Michael
Am 14.10.2013 um 15:13 schrieb "Brett" <[email blocked]>:
5 Posted by Michael on 15 Oct, 2013 06:02 AM
But still: This wouldn't resolve the issue putting numbers into the TOC, won't it?
Support Staff 6 Posted by Brett on 15 Oct, 2013 12:42 PM
No, it wouldn't.
-Brett