Commit 2cc567e6 authored by gerd's avatar gerd

T1 encoding


git-svn-id: https://godirepo.camlcity.org/svn/app-presentation/trunk@8 50e5f3cf-a9f2-0310-83d8-d11ec64cb5ab
parent bd5109a2
(* $Id: to_latex.ml,v 1.1 2003/02/24 01:24:36 gerd Exp $
(* $Id: to_latex.ml,v 1.2 2003/03/21 20:34:35 gerd Exp $
* ----------------------------------------------------------------------
*
*)
......@@ -37,6 +37,7 @@ let escape_latex ?(tt = false) s =
(fun s ->
(* ~tt: always use \symbol *)
match s with
(*
"<" when not tt -> "$<${}"
| ">" when not tt -> "$>${}"
| "\\" when not tt -> "$\\backslash${}"
......@@ -44,6 +45,7 @@ let escape_latex ?(tt = false) s =
| "{" when not tt ->"\\{"
| "|" when not tt ->"$\\vert${}"
| "}" when not tt ->"\\}"
*)
| _ -> "\\symbol{" ^ string_of_int(Char.code s.[0]) ^ "}")
s'
in
......@@ -65,7 +67,7 @@ let escape_latex ?(tt = false) s =
| 168 -> "\\symbol{127}"
| 169 -> "\\copyright{}"
| 170 -> "" (* ??? *)
| 171 -> "``{}" (* LEFT ANGLE QUOT *)
| 171 -> "\\symbol{19}" (* LEFT ANGLE QUOT (T1) *)
| 172 -> "$\\neg${}"
| 173 -> "-{}"
| 174 -> "" (* REG TRADEMARK *)
......@@ -81,7 +83,7 @@ let escape_latex ?(tt = false) s =
| 184 -> "\\c{ }"
| 185 -> "${}^1${}"
| 186 -> "" (* ??? *)
| 187 -> "''{}" (* RIGHT ANGLE QUOT *)
| 187 -> "\\symbol{20}" (* RIGHT ANGLE QUOT (T1) *)
| 188 -> "$\\frac{1}{4}${}"
| 189 -> "$\\frac{1}{3}${}"
| 190 -> "$\\frac{3}{4}${}"
......@@ -116,7 +118,7 @@ let escape_latex ?(tt = false) s =
| 219 -> "\\^{U}"
| 220 -> "\\\"{U}"
| 221 -> "\\`{Y}"
| 222 -> "" (* THORN *)
| 222 -> "\\symbol{222}" (* THORN (T1) *)
| 223 -> "\\ss{}"
| 224 -> "\\`{a}"
| 225 -> "\\'{a}"
......@@ -134,7 +136,7 @@ let escape_latex ?(tt = false) s =
| 237 -> "\\'{i}"
| 238 -> "\\^{i}"
| 239 -> "\\\"{i}"
| 240 -> "" (* eth *)
| 240 -> "\\symbol{240}" (* eth (T1) *)
| 241 -> "\\~{n}"
| 242 -> "\\`{o}"
| 243 -> "\\'{o}"
......@@ -148,7 +150,7 @@ let escape_latex ?(tt = false) s =
| 251 -> "\\^{u}"
| 252 -> "\\\"{u}"
| 253 -> "\\`{y}"
| 254 -> "" (* thorn *)
| 254 -> "\\symbol{254}" (* thorn (T1) *)
| 255 -> "\\\"{y}"
| 338 -> "\\OE{}"
| 339 -> "\\oe{}"
......@@ -232,8 +234,8 @@ let escape_latex ?(tt = false) s =
| 8240 -> "" (* TODO: permille sign *)
| 8242 -> "$\\prime${}"
| 8243 -> "$\\prime\\prime${}"
| 8249 -> "" (* TODO: single left-pointing angle quot mark *)
| 8250 -> "" (* TODO: single right-pointing angle quot mark *)
| 8249 -> "\\symbol{14}" (* TODO: single left-pointing angle quot mark (T1) *)
| 8250 -> "\\symbol{15}" (* TODO: single right-pointing angle quot mark (T1) *)
| 8252 -> "$\\overline{\\;}${}"
| 8260 -> "$/${}"
| 8472 -> "$\\wp${}"
......@@ -515,6 +517,7 @@ class presentation =
output_string out "\\documentclass{article}\n";
output_string out "\\usepackage[a4paper,lmargin=2cm,rmargin=2cm,tmargin=3cm,bmargin=4cm]{geometry}\n";
output_string out "\\usepackage[T1]{fontenc}\n";
output_string out "\\usepackage{pslatex}\n";
output_string out "\\usepackage[pdftex]{color}\n";
output_string out "\\usepackage{calc}\n";
......@@ -1021,6 +1024,9 @@ let tag_map =
* History:
*
* $Log: to_latex.ml,v $
* Revision 1.2 2003/03/21 20:34:35 gerd
* T1 encoding
*
* Revision 1.1 2003/02/24 01:24:36 gerd
* Initial revision
*
......
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