Commit b47e25a6 authored by Pietro Abate's avatar Pietro Abate

[r2005-03-27 01:05:27 by beppe] added indentention. Patched bolds and italics

Original author: beppe
Date: 2005-03-27 01:05:27+00:00
parent 20bbd19a
......@@ -17,16 +17,21 @@ type block =
linefeed-treatment=?("preserve"|"ignore");
margin-bottom=?String;
margin-left=?String;
white-space-collapse=?("false"|"true");
padding-after=?String;
padding-before=?String;
padding-start=?String;
white-space-collapse=?("false"|"true"|"inherit");
white-space-treatment=?("preserve"|"ignore")|}>[
Any* ];;
type line = <fo:inline {|text-decoration=?String; color=?String; font-weight=?String; font-style=?String|}>[Any*];;
type line = <fo:inline {|text-decoration=?String; color=?String; font-family=?String; font-weight=?String; font-style=?String|}>[Any*];;
type list-block =
<fo:list-block {| provisional-label-separation=?String; provisional-distance-between-starts=?String|}>[
list-item* ];;
type list-item =
<fo:list-item>[
<fo:list-item-label end-indent=?String>[block*]
<fo:list-item space-after=?String>[
<fo:list-item-label
text-align=?("start" | "center" | "end" | "justify" | "inside" | "outside" | "left" | "right" | "inherit");
end-indent=?String>[block*]
<fo:list-item-body start-indent=?String>[block*]];;
type flow = <fo:flow {|flow-name=String; font-size=String; text-align=?String|}>[ block* ];;
type static-content = <fo:static-content {||}>[ block* ];;
......
......@@ -22,12 +22,10 @@ let highlight (String -> [ (Char)* ] )
let text (t : [InlineText*]) : [(block|Char|line)*] =
transform t with
|<b style=_>s2 ->[<fo:block text-align="left" (*color="blue"*) font-weight="bold">[!(text s2)]]
|<b>s2 -> [<fo:block text-align="left" (*color="blue"*) font-weight="bold">[!(text s2)]]
|<i style=_>s2 -> [<fo:block text-align="left" (*color="yellow"*) font-style="italic">[!(text s2)]]
|<i>s2 -> [<fo:block text-align="left" color="yellow" font-style="italic">[!(text s2)]]
|<b>s2 ->[<fo:inline font-weight="bold">[!(text s2)]]
|<i>s2 -> [<fo:inline font-style="italic">[!(text s2)]]
|<tt style=_>s2 -> [<fo:block text-align="left" font-family="Courier" color="green" >[!(text s2)]]
|<tt>s2 -> [<fo:block text-align="left" font-family="Courier" color="green">[!(text s2)]]
|<tt>s2 -> [<fo:inline font-family="Courier" color="green">[!(text s2)]]
|<em style=_>s2 -> [<fo:block text-align="center" color="pink" font-style="italic">[!(text s2)]]
|<em>s2 -> [<fo:inline color="blue" font-weight="bold" font-style="italic">[!(text s2)]]
| z & Char -> [z]
......@@ -49,16 +47,17 @@ let highlight (String -> [ (Char)* ] )
white-space-treatment="preserve"
background-color="lightgray"
border-style="dashed"
padding-start="4pt"
padding-after="4pt"
margin-bottom="3pt"
margin-left="3pt"
text-align="left"
space-after="10pt">[!(highlight s)]]
| <p>x -> [<fo:block space-after="15pt">[!(text x)]]
| <ul>u ->[ <fo:list-block provisional-distance-between-starts="18pt"
provisional-label-separation="3pt">( transform u with
<li>c -> [<fo:list-item>[
<fo:list-item-label end-indent="label-end()">[
<fo:block>"\x2022;"]
<li>c -> [<fo:list-item space-after="2pt">[
<fo:list-item-label text-align="center" end-indent="label-end()">[
<fo:block font-size="18pt">"\x2022;"]
<fo:list-item-body start-indent="body-start()">[
<fo:block>[ !(content c) ]]]])]
| <ol>o -> [ <fo:list-block provisional-distance-between-starts="18pt"
......@@ -66,7 +65,7 @@ let highlight (String -> [ (Char)* ] )
let i = ref Int 0 in
i := !i + 1 ;
transform o with
<li>c -> [<fo:list-item>[
<li>c -> [<fo:list-item space-after="2pt">[
<fo:list-item-label end-indent="label-end()">[
<fo:block>(string_of(i)@".")]
<fo:list-item-body start-indent="body-start()">[
......
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