Commit 022517e2 authored by Pietro Abate's avatar Pietro Abate

[r2005-03-27 16:00:52 by beppe] Empty log message

Original author: beppe
Date: 2005-03-27 16:00:52+00:00
parent 37506719
......@@ -17,7 +17,7 @@ type block =
background-color=?String;
border-style=?String;
break-before=?("auto" | "column" | "page" | "even-page" | "odd-page" | "inherit");
linefeed-treatment=?("preserve"|"ignore");
linefeed-treatment=?("preserve"|"ignore");
margin-bottom=?String;
margin-left=?String;
padding-after=?String;
......@@ -39,7 +39,9 @@ type basic-link =<fo:basic-link {|
text-decoration=?String;
font-style=?String;
internal-destination=?String;
external-destination=?String|}>[Any*]
external-destination=?String|}>[Any*];;
type table = <fo:table>[Any*]
type list-block =
<fo:list-block {|
provisional-label-separation=?String;
......
......@@ -20,7 +20,7 @@ let highlight (String -> [ (Char)* ] )
| [ c ; rest ] -> [c ; highlight rest]
| [] -> []
let text (t : [InlineText*]) : [(block|basic-link|Char|inline|list-block|footnote)*] =
let text (t : [InlineText*]) : [(block|basic-link|Char|inline|list-block|footnote|table)*] =
transform t with
|<b>s2 ->[<fo:inline font-weight="bold">[!(text s2)]]
|<i>s2 -> [<fo:inline font-style="italic">[!(text s2)]]
......@@ -51,7 +51,7 @@ let highlight (String -> [ (Char)* ] )
<fo:block font-size="8pt">"(*)"]
<fo:list-item-body start-indent="body-start()">[
<fo:block font-size="8pt">[!(text t)]]]]]]]
let content (t : Content) : [(block|basic-link|Char|inline|list-block|footnote)*] =
let content (t : Content) : [(block|basic-link|Char|inline|list-block|footnote|table)*] =
transform t with
| <section title=title1>c -> [<fo:block space-before="5pt">[<fo:block space-after="4pt" font-size="14pt" font-weight="bold">[title1] !(content c) ]]
| ((<sample >s) | <sample highlight="false">s)
......@@ -67,7 +67,16 @@ let highlight (String -> [ (Char)* ] )
margin-bottom="3pt"
text-align="left"
space-after="10pt">[!(highlight s)]]
| <p>x -> [<fo:block space-after="15pt">[!(text x)]]
| <p>x -> [<fo:block space-after="15pt">[!(text x)]]
| <table> x -> [ <fo:table space-after="15pt">[
<fo:table-column column-width="80mm">[]
<fo:table-column column-width="80mm">[]
<fo:table-body>( transform x with
<tr> y -> [<fo:table-row>( transform y with
| <th> z -> [<fo:table-cell padding="6pt" background-color="silver" border="0.5pt solid black">[ <fo:block font-weight="bold">[!(content z) ]]]
| <td> z -> [<fo:table-cell padding="6pt" border="0.5pt solid black">[ <fo:block>[!(content z) ]]]
)])
]](*]*)
| <ul>u ->[ <fo:list-block provisional-distance-between-starts="18pt"
provisional-label-separation="3pt">( transform u with
<li>c -> [<fo:list-item>[
......@@ -99,7 +108,7 @@ let highlight (String -> [ (Char)* ] )
| <note>_ -> [<fo:block>['A FAIRE NOTE']]
| <footnotes>_ -> [<fo:block>['A FAIRE FOOTNOTE']]
| <demo>_ -> [<fo:block>['A FAIRE DEMO LABEL']]
| _ -> [<fo:block>['A FAIREEEEEEEEEEEEEEEEEEE COntent']]
let paper (p : Paper) : [block*] =
match p with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment