Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
e88aa9a1
Commit
e88aa9a1
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2005-03-27 14:46:29 by beppe] External + internal links
Original author: beppe Date: 2005-03-27 14:46:30+00:00
parent
cccf2d4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/fomanual/Makefile
View file @
e88aa9a1
# include ../../Makefile.distrib
JAVA_HOME
=
/usr/java/jre1.5.0
VERSION
=
0.3.2
CDUCE
=
/tmp/cduce-0.2.2/cduce
FOP
=
/tmp/fop-0.20.5/fop.sh
all
:
(
cd
../../web
&&
$(CDUCE)
../doc/fomanual/xml2fo.cd
--arg
manual.xml
)
(
cd
../../web
&&
$(CDUCE)
../doc/fomanual/xml2fo.cd
--arg
manual.xml
manual_fo.xml
$(VERSION)
)
pdf
:
all
$(FOP)
manual_fo.xml manual.pdf
doc/fomanual/typeFO.cd
View file @
e88aa9a1
...
...
@@ -3,7 +3,8 @@ namespace fo = "http://www.w3.org/1999/XSL/Format"
type declarations = <fo:declarations {|fo:color-profile=?String|}>[ Any* ];;
type block =
<fo:block {|space-after=?String;
<fo:block {|
space-after=?String;
space-before=?String;
id=?String;
font-weight=?String;
...
...
@@ -11,10 +12,11 @@ type block =
text-align-last=?String;
font-size=?String;
font-family=?("Helvetica" | "TimesNewRoman" | "Courier");
font-style=?String ;
color=?String;
background-color=?String;
border-style=?String;
font-style=?String ;
break-before=?("auto" | "column" | "page" | "even-page" | "odd-page" | "inherit");
linefeed-treatment=?("preserve"|"ignore");
margin-bottom=?String;
margin-left=?String;
...
...
doc/fomanual/xml2fo.cd
View file @
e88aa9a1
...
...
@@ -53,7 +53,7 @@ let highlight (String -> [ (Char)* ] )
<fo:block font-size="8pt">[!(text t)]]]]]]]
let content (t : Content) : [(block|basic-link|Char|inline|list-block|footnote)*] =
transform t with
| <section title=title1>c -> [<fo:block space-before="5pt">[<fo:block space-after="
3
pt" font-weight="bold">[title1] !(content c) ]]
| <section title=title1>c -> [<fo:block space-before="5pt">[<fo:block space-after="
4pt" font-size="14
pt" font-weight="bold">[title1] !(content c) ]]
| ((<sample >s) | <sample highlight="false">s)
-> [<fo:block font-family="Courier"
font-size="10pt"
...
...
@@ -123,11 +123,11 @@ let ma (it : [Item]) : block =
| [<footnotes>[]] -> <fo:block>[ ]
| [<page name=_ > [(<title>_)]] -> <fo:block>['box vide!!!!!!!!!!!!!']
| [<page name=x >[(<title>title1 litem::Item+)]] ->
<fo:block id=x text-align-last="justify">[
<fo:block text-align="center">[
<fo:block
font-size="30pt" space-after="15pt" space-before="15pt" color="indigo"
>[
<fo:inline text-decoration="underline"
>[title1]
]
] !(lireItem litem)
]
<fo:block id=x
break-before="page"
text-align-last="justify">[
<fo:block
text-align="left"
>[
<fo:block font-size="32pt" font-weight="bold" space-after="40pt" space-before="85pt" color="black"
>[title1]
] !(lireItem litem)
]
(*lireItem lit une sequence de bloc et applique*)
(*la fonction "ma" sur chaque item*)
...
...
@@ -136,7 +136,7 @@ let lireItem ([Item+] -> [block*])
| [it::Item ; it2 ] -> [(ma it)] @ (lireItem it2)
let gen_page (page : Page) : [block*] =
let gen_page (page : Page
, cduce_version : Latin1
) : [block*] =
match page with
(* le cas sans item*)
<page name=_>[(<title>_)] -> [<fo:block text-align="center" font-size="35pt" color="green" space-after="30pt">
...
...
@@ -147,8 +147,10 @@ let gen_page (page : Page) : [block*] =
let sortie : [block+]=
[
<fo:block text-align="center" font-size="35pt" color="orange" space-after="30pt">[
<fo:inline text-decoration="underline">[title1]
<fo:block text-align="center" space-before="130pt">[
<fo:block font-size="35pt" font-weight="bold">"CDuce Programming Language"
<fo:block font-size="35pt" font-weight="bold" space-after="20pt">[title1]
<fo:block font-size="18pt" font-weight="bold">("Language Version "@cduce_version)
]
!(lireItem litem)]
...
...
@@ -167,15 +169,15 @@ in
match argv [] with
| [
a & Latin1
] -> (
| [
(inp_file & Latin1) (out_file & Latin1) (cduce_version & Latin1)
] -> (
try
let ([ main_page ]) =
(load_include
a
:? [ Page ])
(load_include
inp_file
:? [ Page ])
in
let DebutFo : root = <fo:root >[<fo:layout-master-set>[
<fo:simple-page-master master-name="essai" page-height="29.7cm" page-width="21cm">[<fo:region-body margin-top="
2
cm" margin-bottom="
2
.5cm"
<fo:simple-page-master master-name="essai" page-height="29.7cm" page-width="21cm">[<fo:region-body margin-top="
3
cm" margin-bottom="
3
.5cm"
margin-left="2.5cm" margin-right="2.5cm">[]
]
]
...
...
@@ -186,8 +188,8 @@ match argv [] with
leader-length="100%"
rule-style="solid"
rule-thickness="0.5pt">[]]]
<fo:flow flow-name="xsl-region-body" font-size="12pt" text-align="justify"> [!(gen_page
main_page)] ]] in
dump_to_file "../doc/fomanual/
manual_fo.xml"
(print_xml DebutFo)
<fo:flow flow-name="xsl-region-body" font-size="12pt" text-align="justify"> [!(gen_page
(
main_page
,cduce_version)
)] ]] in
dump_to_file
(
"../doc/fomanual/
"@out_file)
(print_xml DebutFo)
(*print(print_xml(main_page));*)
(* print (gen_page main_page)*)
with err & Latin1 ->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment