/Source/thitracnghiem/QuanLyThi/bin/Debug/MathType/Translators/AMS LaTeX.tdl

http://thitracnghiem.googlecode.com/ · Unknown · 363 lines · 311 code · 52 blank · 0 comment · 0 complexity · ee067a26cc7a7d05fef3dc1180106864 MD5 · raw file

  1. MathType Output Translator 1.0: "TeX -- AMS-LaTeX", "AMS-LaTeX translator v1.00 by Design Science, Inc."
  2. // Copyright (c) 1998-2003 by Design Science, Inc.
  3. // License: You are allowed to create your own translators based on the contents of this file
  4. // solely for use with MathType. It is recommended that you change the filename, title, and description
  5. // in the first line of this file so as to reflect your modifications and the change of author and purpose.
  6. // Design Science, Inc. is not responsible for any damages caused by the use of this file or derived works.
  7. // $Header: /MathType/Translators/AMS LaTeX.tdl 11 8/19/03 1:43p Jackd $
  8. // include TeXBase.tdl for common control sequences, etc.
  9. include "TeX (base).tdl";
  10. // include TeXChars.tdl for character defintions common to all dialects of TeX
  11. include "TeX (chars).tdl";
  12. // include some AMS translations
  13. include "TeX (AMS base).tdl";
  14. // =====================================================
  15. // Basic Translation Strings
  16. // =====================================================
  17. eqn = "<StdStartCmt><EqnDataCmt>\[@n#@n\]@n<StdEndCmt>"; // \[ <eqn> \] -- display equation translation
  18. // =====================================================
  19. // Default Translation Strings
  20. // =====================================================
  21. deffunc = "\operatorname{#} "; // default function translation
  22. defchar = error "@nNo translation available for <FullDesc>. @nPlease add a translation for @"<Cmd>@" in the file 'AMS LaTeX.tdl'."; // default character translation
  23. deftmpl = error "@nNo translation available for <Desc>. @nPlease add a translation for @"<Cmd>@" in the file 'AMS LaTeX.tdl.'"; // default template translation
  24. defemb = error "@nNo translation available for <Desc>. @nPlease add a translation for @"<Cmd>@" in the file 'AMS LaTeX.tdl.'"; // default embellishment translation
  25. run/text = "{\text{#}}"; // run of Text style characters
  26. run/vector = "{\mathbf{#}}"; // run of Vector style characters
  27. // =====================================================
  28. // Piles
  29. // =====================================================
  30. // Pile translation (default, embedded)
  31. pile = "\begin{gathered}@n # \\ @n # \\ @n\end{gathered} "; // default
  32. pile/l = "\begin{gathered}@n # \hfill \\@n # \hfill \\ @n\end{gathered} "; // left justified
  33. pile/c = "\begin{gathered}@n # \\ @n # \\ @n\end{gathered} "; // centered
  34. pile/r = "\begin{gathered}@n \hfill # \\@n \hfill # \\ @n\end{gathered} "; // right justified
  35. pile/al = "\begin{aligned}@n # \\ @n # \\ @n\end{aligned} "; // aligned at alignment mark
  36. // Top level pile translation
  37. pile/t = "\begin{gathered}@n # \\ @n # \\ @n\end{gathered} "; // default
  38. pile/t/l = "\begin{gathered}@n # \hfill \\@n # \hfill \\ @n\end{gathered} "; // left justified
  39. pile/t/c = "\begin{gathered}@n # \\ @n # \\ @n\end{gathered} "; // centered
  40. pile/t/r = "\begin{gathered}@n \hfill # \\@n \hfill # \\ @n\end{gathered} "; // right justified
  41. pile/t/al = "\begin{aligned}@n # \\ @n # \\ @n\end{aligned} "; // aligned at alignment mark
  42. // 2-line limit pile translation (as in limit of summation)
  43. pile/lim/2 = "\substack{ #1 \\ #2 } "; // default
  44. pile/lim/2/l = "\begin{subarray}{l} @n #1 \\ @n #2 @n\end{subarray} "; // left justified
  45. pile/lim/2/c = "\substack{ #1 \\ #2 } "; // centered
  46. pile/lim/2/r = "\begin{subarray} @n \hfill #1 \\ @n \hfill #2 @n\end{subarray} "; // right justified
  47. // 3-line limit pile translation (as in limit of summation)
  48. pile/lim/3 = "\substack{ #1 \\ #2 \\ #3 } "; // default
  49. pile/lim/3/l = "\begin{subarray}{l} @n #1 \\ @n #2 \\ @n #3 @n\end{subarray} "; // left justified
  50. pile/lim/3/c = "\substack{ #1 \\ #2 \\ #3 } "; // centered
  51. pile/lim/3/r = "\begin{subarray} @n \hfill #1 \\ @n \hfill #2 \\ @n \hfill #3 @n\end{subarray} "; // right justified
  52. // =====================================================
  53. // Matrices and Matrix Elements
  54. // =====================================================
  55. // Matrix translation (not allowing for partition lines, but better spacing)
  56. // matrix = "\begin{matrix}@n#@n \end{matrix} ";
  57. // Matrix translation (allowing for partition lines, but worse spacing)
  58. matrix = "\begin{array}{*{20}c}@n#@n \end{array} ";
  59. // Matrix row translation
  60. matrow = " # \\@n";
  61. // =====================================================
  62. // Partition Lines for Matrices & Tables
  63. // =====================================================
  64. // Horizontal matrix partition lines (solid, dashed, dotted)
  65. // Only solid lines are supported in TeX
  66. hline = "\hline@n"; // Solid
  67. hline/dash = "\hline@n"; // Dashed
  68. hline/dot = "\hline@n"; // Dotted
  69. // Vertical matrix partition lines (solid, dashed, dotted)
  70. // Only solid lines are supported in TeX
  71. vline = "\vline & "; // Solid
  72. vline/dash = "\vline & "; // Dashed
  73. vline/dot = "\vline & "; // Dotted
  74. // =====================================================
  75. // Strike-through templates
  76. // =====================================================
  77. // strike/m = "?" // Mid-line strike-through
  78. // strike = "?" // Strike-through
  79. // strike/up = "?" // Strike-through (bottom-left to upper-right)
  80. // strike/dn = "?" // Strike-through (top-left to bottom-right)
  81. // =====================================================
  82. // Roots and Long Division
  83. // =====================================================
  84. root/nth = "\sqrt[#2]{#1}"; // higher root
  85. // =====================================================
  86. // Arrows with Slots Above and Below
  87. // =====================================================
  88. arrow = "\xrightarrow{#1}"; // right arrow, box on top
  89. arrow/l = "\xleftarrow{#1}"; // left arrow, box on top
  90. arrow/lr = "\overset #1 \longleftrightarrow "; // both arrow, box on top
  91. arrow/b = "\xrightarrow[#2]{}"; // right arrow, box on bottom
  92. arrow/l/b = "\xleftarrow[#2]{}"; // left arrow, box on bottom
  93. arrow/lr/b = "\underset #2 \longleftrightarrow "; // both arrow, box on bottom
  94. arrow/tb = "\xrightarrow[#2]{#1}"; // Right arrow with upper & lower text slots
  95. arrow/l/tb = "\xleftarrow[#2]{#1}"; // Left arrow with upper & lower text slots
  96. arrow/lr/tb = "\underset{#2}{\overset{#1}{\longleftrightarrow}}"; // Double-headed arrow with upper & lower text slots
  97. arrow/2 = "\overset #1 \leftrightarrows "; // Double arrow with upper text slot
  98. arrow/2/b = "\underset #2 \leftrightarrows "; // Double arrow with lower text slot
  99. arrow/2/tb = "\underset{#2}{\overset{#1}{\longleftrightarrow}}"; // Double arrow with upper & lower text slots
  100. // arrow/2/los = "?" // Large over small arrow with upper text slot
  101. // arrow/2/los/b = "?" // Large over small arrow with lower text slot
  102. // arrow/2/los/tb = "?" // Large over small arrow with upper & lower text slots
  103. // arrow/2/sol = "?" // Small over large arrow with upper text slot
  104. // arrow/2/sol/b = "?" // Small over large arrow with lower text slot
  105. // arrow/2/sol/tb = "?" // Small over large arrow with upper & lower text slots
  106. // arrow/2/h = "?" // Harpoons with upper text slot
  107. // arrow/2/h/b = "?" // Harpoons with lower text slot
  108. // arrow/2/h/tb = "?" // Harpoons with upper & lower text slots
  109. // arrow/2/h/los = "?" // Large over small harpoon with upper text slot
  110. // arrow/2/h/los/b = "?" // Large over small harpoon with lower text slot
  111. // arrow/2/h/los/tb = "?" // Large over small harpoon with upper & lower text slots
  112. // arrow/2/h/sol = "?" // Small over large harpoon with upper text slot
  113. // arrow/2/h/sol/b = "?" // Small over large harpoon with lower text slot
  114. // arrow/2/h/sol/tb = "?" // Small over large harpoon with upper & lower text slots
  115. // =====================================================
  116. // Hats, Tildes, Smiles & Frowns (wide ones, over several characters)
  117. // =====================================================
  118. // arc = "?" // Arc
  119. // jstat = "?" // Joint status
  120. // vec/h = "?" // Right harpoon over-bar
  121. // vec/u/h = "?" // Right harpoon under-bar
  122. // =====================================================
  123. // Embellishment Translations
  124. // =====================================================
  125. edot/3 = "\dddot #"; // three dot over
  126. edot/4 = "\ddddot #"; // four dots over
  127. edot/u = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\cdot}$}}{#} "; // one dot under
  128. edot/u/2 = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\cdot\cdot}$}}{#} "; // two dots under
  129. edot/u/3 = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\cdots}$}}{#} "; // three dot under
  130. edot/u/4 = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\cdot\cdot\cdot\cdot}$}}{#} "; // four dots under
  131. etilde/u = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\thicksim}$}}{#} "; // tilde under
  132. evec/l = "\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\leftarrow}$}}{#} "; // Left arrow above
  133. evec/lr = "\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\leftrightarrow}$}} {#} "; // Left-right arrow above
  134. evec/h = "\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\rightharpoonup}$}} {#} "; // Right harpoon above
  135. evec/h/l = "\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\leftharpoonup}$}} {#} "; // Left harpoon above
  136. evec/u = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\rightarrow}$}}{#} "; // Right arrow above
  137. evec/u/l = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\leftarrow}$}}{#} "; // Left arrow above
  138. evec/u/lr = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\leftrightarrow}$}} {#} "; // Left-right arrow above
  139. evec/u/h = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\rightharpoonup}$}} {#} "; // Right harpoon above
  140. evec/u/h/l = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\leftharpoonup}$}} {#} "; // Left harpoon above
  141. eubar = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle-}$}}{#} "; // Under bar
  142. earc = "\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{#} "; // Frown above
  143. earc/s = "\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\smile}$}}{#} "; // Smile above
  144. earc/u = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\frown}$}}{#} "; // Frown below
  145. earc/u/s = "\underset{\raise0.3em\hbox{$\smash{\scriptscriptstyle\smile}$}}{#} "; // Smile below
  146. // =====================================================
  147. // Script, Fraktur, Blackboard Bold, etc.
  148. // =====================================================
  149. char/0x2102 = "\mathbb{C}"; // Blackboard-bold capital C
  150. char/0x210B = "\mathcal{H}"; // Script capital H
  151. char/0x210C = "\mathfrak{H}"; // Fraktur capital H
  152. char/0x210D = "\mathbb{H}"; // Blackboard-bold capital H
  153. char/0x2110 = "\mathcal{I}"; // Script capital I
  154. char/0x2112 = "\mathcal{L}"; // Script capital L
  155. char/0x2115 = "\mathbb{N}"; // Blackboard-bold capital N
  156. char/0x2119 = "\mathbb{P}"; // Blackboard-bold capital P
  157. char/0x211A = "\mathbb{Q}"; // Blackboard-bold capital Q
  158. char/0x211B = "\mathcal{R}"; // Script capital R
  159. char/0x211D = "\mathbb{R}"; // Blackboard-bold capital R
  160. char/0x2124 = "\mathbb{Z}"; // Blackboard-bold capital Z
  161. char/0x2128 = "\mathfrak{X}"; // Fraktur capital X
  162. char/0x212C = "\mathcal{B}"; // Script capital B
  163. char/0x212D = "\mathfrak{C}"; // Fraktur capital C
  164. char/0x2130 = "\mathcal{E}"; // Script capital E
  165. char/0x2131 = "\mathcal{F}"; // Script capital F
  166. char/0x2133 = "\mathcal{M}"; // Script capital M
  167. // =====================================================
  168. // Other More Exotic Character Translations
  169. // =====================================================
  170. char/0x221B = "\sqrt[3]{\mathstrut} "; // Cube root
  171. char/0x221C = "\sqrt[4]{\mathstrut} "; // Fourth root
  172. //char/0x2237 = " "; // Proportion
  173. //char/0x2239 = " "; // Excess
  174. //char/0x223A = " "; // Geometric proportion
  175. //char/0x223B = " "; // Homothetic
  176. //char/0x223E = " "; // Inverted lazy s
  177. //char/0x223F = " "; // Sine wave
  178. //char/0x224B = " "; // Triple tilde
  179. char/0x2258 = " \overset{\lower1em\hbox{$\scriptstyle\frown$}}{=} "; // Corresponds to
  180. char/0x2259 = " \overset{\wedge}{=}"; // Estimates
  181. char/0x225A = " \overset{\vee}{=}"; // Equiangular to
  182. char/0x225B = " \overset{\lower1em\hbox{$\scriptstyle\star$}}{=} "; // Star equals
  183. char/0x225D = " \overset{\text{def}}{=}"; // Equal to by definition
  184. char/0x225E = " \overset{\wedge}{=}"; // Measured by
  185. char/0x225F = " \overset{?}{=}"; // Questioned equal to
  186. //char/0x2263 = " "; // Strictly equivalent to
  187. //char/0x228C = " "; // Multiset
  188. //char/0x228D = " "; // Multiset multiplication
  189. //char/0x229C = " "; // Circled equals
  190. //char/0x22AB = " "; // Double vertical bar double right turnstile
  191. //char/0x22B0 = " "; // Precedes under relation
  192. //char/0x22B1 = " "; // Succeeds under relation
  193. //char/0x22B6 = " "; // Original of
  194. //char/0x22B7 = " "; // Image of
  195. //char/0x22B9 = " "; // Hermitian conjugate matrix
  196. //char/0x22BE = " "; // Right angle with arc
  197. //char/0x22BF = " "; // Right triangle
  198. // =====================================================
  199. // Fraktur (black) letters
  200. // =====================================================
  201. char/0xF000 = "\mathfrak{A}"; // Fraktur capital A
  202. char/0xF001 = "\mathfrak{B}"; // Fraktur capital B
  203. char/0xF002 = "\mathfrak{C}"; // Fraktur capital C
  204. char/0xF003 = "\mathfrak{D}"; // Fraktur capital D
  205. char/0xF004 = "\mathfrak{E}"; // Fraktur capital E
  206. char/0xF005 = "\mathfrak{F}"; // Fraktur capital F
  207. char/0xF006 = "\mathfrak{G}"; // Fraktur capital G
  208. char/0xF007 = "\mathfrak{H}"; // Fraktur capital H
  209. char/0xF008 = "\mathfrak{I}"; // Fraktur capital I
  210. char/0xF009 = "\mathfrak{J}"; // Fraktur capital J
  211. char/0xF00A = "\mathfrak{K}"; // Fraktur capital K
  212. char/0xF00B = "\mathfrak{L}"; // Fraktur capital L
  213. char/0xF00C = "\mathfrak{M}"; // Fraktur capital M
  214. char/0xF00D = "\mathfrak{N}"; // Fraktur capital N
  215. char/0xF00E = "\mathfrak{O}"; // Fraktur capital O
  216. char/0xF00F = "\mathfrak{P}"; // Fraktur capital P
  217. char/0xF010 = "\mathfrak{Q}"; // Fraktur capital Q
  218. char/0xF011 = "\mathfrak{R}"; // Fraktur capital R
  219. char/0xF012 = "\mathfrak{S}"; // Fraktur capital S
  220. char/0xF013 = "\mathfrak{T}"; // Fraktur capital T
  221. char/0xF014 = "\mathfrak{U}"; // Fraktur capital U
  222. char/0xF015 = "\mathfrak{V}"; // Fraktur capital V
  223. char/0xF016 = "\mathfrak{W}"; // Fraktur capital W
  224. char/0xF017 = "\mathfrak{X}"; // Fraktur capital X
  225. char/0xF018 = "\mathfrak{Y}"; // Fraktur capital Y
  226. char/0xF019 = "\mathfrak{Z}"; // Fraktur capital Z
  227. char/0xF01A = "\mathfrak{a}"; // Fraktur small a
  228. char/0xF01B = "\mathfrak{b}"; // Fraktur small b
  229. char/0xF01C = "\mathfrak{c}"; // Fraktur small c
  230. char/0xF01D = "\mathfrak{d}"; // Fraktur small d
  231. char/0xF01E = "\mathfrak{e}"; // Fraktur small e
  232. char/0xF01F = "\mathfrak{f}"; // Fraktur small f
  233. char/0xF020 = "\mathfrak{g}"; // Fraktur small g
  234. char/0xF021 = "\mathfrak{h}"; // Fraktur small h
  235. char/0xF022 = "\mathfrak{i}"; // Fraktur small i
  236. char/0xF023 = "\mathfrak{j}"; // Fraktur small j
  237. char/0xF024 = "\mathfrak{k}"; // Fraktur small k
  238. char/0xF025 = "\mathfrak{l}"; // Fraktur small l
  239. char/0xF026 = "\mathfrak{m}"; // Fraktur small m
  240. char/0xF027 = "\mathfrak{n}"; // Fraktur small n
  241. char/0xF028 = "\mathfrak{o}"; // Fraktur small o
  242. char/0xF029 = "\mathfrak{p}"; // Fraktur small p
  243. char/0xF02A = "\mathfrak{q}"; // Fraktur small q
  244. char/0xF02B = "\mathfrak{r}"; // Fraktur small r
  245. char/0xF02C = "\mathfrak{s}"; // Fraktur small s
  246. char/0xF02D = "\mathfrak{t}"; // Fraktur small t
  247. char/0xF02E = "\mathfrak{u}"; // Fraktur small u
  248. char/0xF02F = "\mathfrak{v}"; // Fraktur small v
  249. char/0xF030 = "\mathfrak{w}"; // Fraktur small w
  250. char/0xF031 = "\mathfrak{x}"; // Fraktur small x
  251. char/0xF032 = "\mathfrak{y}"; // Fraktur small y
  252. char/0xF033 = "\mathfrak{z}"; // Fraktur small z
  253. // =====================================================
  254. // Double-struck (Blackboard bold) characters
  255. // =====================================================
  256. char/0xF080 = "\mathbb{A}"; // Blackboard-bold capital A
  257. char/0xF081 = "\mathbb{B}"; // Blackboard-bold capital B
  258. char/0xF082 = "\mathbb{C}"; // Blackboard-bold capital C
  259. char/0xF083 = "\mathbb{D}"; // Blackboard-bold capital D
  260. char/0xF084 = "\mathbb{E}"; // Blackboard-bold capital E
  261. char/0xF085 = "\mathbb{F}"; // Blackboard-bold capital F
  262. char/0xF086 = "\mathbb{G}"; // Blackboard-bold capital G
  263. char/0xF087 = "\mathbb{H}"; // Blackboard-bold capital H
  264. char/0xF088 = "\mathbb{I}"; // Blackboard-bold capital I
  265. char/0xF089 = "\mathbb{J}"; // Blackboard-bold capital J
  266. char/0xF08A = "\mathbb{K}"; // Blackboard-bold capital K
  267. char/0xF08B = "\mathbb{L}"; // Blackboard-bold capital L
  268. char/0xF08C = "\mathbb{M}"; // Blackboard-bold capital M
  269. char/0xF08D = "\mathbb{N}"; // Blackboard-bold capital N
  270. char/0xF08E = "\mathbb{O}"; // Blackboard-bold capital O
  271. char/0xF08F = "\mathbb{P}"; // Blackboard-bold capital P
  272. char/0xF090 = "\mathbb{Q}"; // Blackboard-bold capital Q
  273. char/0xF091 = "\mathbb{R}"; // Blackboard-bold capital R
  274. char/0xF092 = "\mathbb{S}"; // Blackboard-bold capital S
  275. char/0xF093 = "\mathbb{T}"; // Blackboard-bold capital T
  276. char/0xF094 = "\mathbb{U}"; // Blackboard-bold capital U
  277. char/0xF095 = "\mathbb{V}"; // Blackboard-bold capital V
  278. char/0xF096 = "\mathbb{W}"; // Blackboard-bold capital W
  279. char/0xF097 = "\mathbb{X}"; // Blackboard-bold capital X
  280. char/0xF098 = "\mathbb{Y}"; // Blackboard-bold capital Y
  281. char/0xF099 = "\mathbb{Z}"; // Blackboard-bold capital Z
  282. char/0xF0A4 = "\Bbbk "; // Blackboard-bold small k
  283. // =====================================================
  284. // Script (calligraphic) characters
  285. // =====================================================
  286. char/0xF100 = "\mathcal{A}"; // Script capital A
  287. char/0xF101 = "\mathcal{B}"; // Script capital B
  288. char/0xF102 = "\mathcal{C}"; // Script capital C
  289. char/0xF103 = "\mathcal{D}"; // Script capital D
  290. char/0xF104 = "\mathcal{E}"; // Script capital E
  291. char/0xF105 = "\mathcal{F}"; // Script capital F
  292. char/0xF106 = "\mathcal{G}"; // Script capital G
  293. char/0xF107 = "\mathcal{H}"; // Script capital H
  294. char/0xF108 = "\mathcal{I}"; // Script capital I
  295. char/0xF109 = "\mathcal{J}"; // Script capital J
  296. char/0xF10A = "\mathcal{K}"; // Script capital K
  297. char/0xF10B = "\mathcal{L}"; // Script capital L
  298. char/0xF10C = "\mathcal{M}"; // Script capital M
  299. char/0xF10D = "\mathcal{N}"; // Script capital N
  300. char/0xF10E = "\mathcal{O}"; // Script capital O
  301. char/0xF10F = "\mathcal{P}"; // Script capital P
  302. char/0xF110 = "\mathcal{Q}"; // Script capital Q
  303. char/0xF111 = "\mathcal{R}"; // Script capital R
  304. char/0xF112 = "\mathcal{S}"; // Script capital S
  305. char/0xF113 = "\mathcal{T}"; // Script capital T
  306. char/0xF114 = "\mathcal{U}"; // Script capital U
  307. char/0xF115 = "\mathcal{V}"; // Script capital V
  308. char/0xF116 = "\mathcal{W}"; // Script capital W
  309. char/0xF117 = "\mathcal{X}"; // Script capital X
  310. char/0xF118 = "\mathcal{Y}"; // Script capital Y
  311. char/0xF119 = "\mathcal{Z}"; // Script capital Z