mathtype 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e63e0066203f903b241d4aea4fc49cb5d458163
4
- data.tar.gz: 9f2e353a480a6906bd627bed7acea5ee1bc95324
3
+ metadata.gz: d3acc471e749498744e1431c051a98036a08bcf9
4
+ data.tar.gz: 0bda3f8b6113097c14f71c32f9ec50922aeaeec3
5
5
  SHA512:
6
- metadata.gz: 12990769275b638a8d8881576a913129c794e88ee40ed0ec46bd05f3e2795fb25c254f054cadc571bbbbc9c49984853849c1254e172cc8d23aa9c56314c31c10
7
- data.tar.gz: f316232cc828c7c694dfc040ec555c05341039d487c282182f9a2bf4094f5fe8c61c2bec57f0a39642ffc3b25a11fac32e6e0d711b2f7982e2856927a63fdbbc
6
+ metadata.gz: 0e4bb50e2893a8322e0b4aff4c7770d95d293d14349b3c68d424a1a244241a16e343f224d98fa81c86f6b1c14a0d4b0661ecd23ca0142d186d010334b6c0c5d9
7
+ data.tar.gz: 04c0689edd2821680150dc1d3fa3e1194e69d404021d4820f82dcbe613266562226ee5385fcc97aa829dded0f5805f4d72c86ad1f73a848b3fb7d319b6895e1d
@@ -1,3 +1,3 @@
1
1
  module Mathtype
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -118,6 +118,10 @@ module Mathtype
118
118
  end
119
119
 
120
120
  class Equation < BinData::Record
121
+ include Snapshot
122
+ EXPOSED_IN_SNAPSHOT = %i(mtef_version platform product product_version
123
+ product_subversion application_key equation_options equation)
124
+
121
125
  endian :little
122
126
  uint8 :mtef_version
123
127
  uint8 :platform
@@ -125,7 +129,11 @@ module Mathtype
125
129
  uint8 :product_version
126
130
  uint8 :product_subversion
127
131
  stringz :application_key
128
- uint8 :equation_options
132
+ uint8 :_equation_options
133
+
134
+ def equation_options
135
+ _equation_options == 1 ? "inline" : "block"
136
+ end
129
137
 
130
138
  array :equation, read_until: lambda { element.record_type == 0 } do
131
139
  named_record
@@ -0,0 +1,350 @@
1
+ <?xml version="1.0"?>
2
+ <root>
3
+ <mtef>
4
+ <mtef_version>5</mtef_version>
5
+ <platform>1</platform>
6
+ <product>0</product>
7
+ <product_version>6</product_version>
8
+ <product_subversion>9</product_subversion>
9
+ <application_key>DSMT6</application_key>
10
+ <equation_options>inline</equation_options>
11
+ <encoding_def>
12
+ <name>WinAllBasicCodePages</name>
13
+ </encoding_def>
14
+ <font_def>
15
+ <enc_def_index>5</enc_def_index>
16
+ <font_name>Times New Roman</font_name>
17
+ </font_def>
18
+ <font_def>
19
+ <enc_def_index>3</enc_def_index>
20
+ <font_name>Symbol</font_name>
21
+ </font_def>
22
+ <font_def>
23
+ <enc_def_index>5</enc_def_index>
24
+ <font_name>Courier New</font_name>
25
+ </font_def>
26
+ <font_def>
27
+ <enc_def_index>4</enc_def_index>
28
+ <font_name>MT Extra</font_name>
29
+ </font_def>
30
+ <encoding_def>
31
+ <name>WinAllCodePages</name>
32
+ </encoding_def>
33
+ <font_def>
34
+ <enc_def_index>6</enc_def_index>
35
+ <font_name>&#x2CE;&#x325;</font_name>
36
+ </font_def>
37
+ <eqn_prefs>
38
+ <options>0</options>
39
+ <sizes_count>8</sizes_count>
40
+ <sizes>
41
+ <unit>2</unit>
42
+ <nibbles>1</nibbles>
43
+ <nibbles>2</nibbles>
44
+ <nibbles>15</nibbles>
45
+ </sizes>
46
+ <sizes>
47
+ <unit>4</unit>
48
+ <nibbles>5</nibbles>
49
+ <nibbles>8</nibbles>
50
+ <nibbles>15</nibbles>
51
+ </sizes>
52
+ <sizes>
53
+ <unit>4</unit>
54
+ <nibbles>4</nibbles>
55
+ <nibbles>2</nibbles>
56
+ <nibbles>15</nibbles>
57
+ </sizes>
58
+ <sizes>
59
+ <unit>4</unit>
60
+ <nibbles>1</nibbles>
61
+ <nibbles>5</nibbles>
62
+ <nibbles>0</nibbles>
63
+ <nibbles>15</nibbles>
64
+ </sizes>
65
+ <sizes>
66
+ <unit>1</unit>
67
+ <nibbles>0</nibbles>
68
+ <nibbles>0</nibbles>
69
+ <nibbles>15</nibbles>
70
+ </sizes>
71
+ <sizes>
72
+ <unit>4</unit>
73
+ <nibbles>7</nibbles>
74
+ <nibbles>5</nibbles>
75
+ <nibbles>15</nibbles>
76
+ </sizes>
77
+ <sizes>
78
+ <unit>4</unit>
79
+ <nibbles>1</nibbles>
80
+ <nibbles>5</nibbles>
81
+ <nibbles>0</nibbles>
82
+ <nibbles>15</nibbles>
83
+ </sizes>
84
+ <sizes>
85
+ <unit>1</unit>
86
+ <nibbles>15</nibbles>
87
+ </sizes>
88
+ <spaces_count>30</spaces_count>
89
+ <spaces>
90
+ <unit>4</unit>
91
+ <nibbles>1</nibbles>
92
+ <nibbles>5</nibbles>
93
+ <nibbles>0</nibbles>
94
+ <nibbles>15</nibbles>
95
+ </spaces>
96
+ <spaces>
97
+ <unit>1</unit>
98
+ <nibbles>5</nibbles>
99
+ <nibbles>0</nibbles>
100
+ <nibbles>15</nibbles>
101
+ </spaces>
102
+ <spaces>
103
+ <unit>4</unit>
104
+ <nibbles>1</nibbles>
105
+ <nibbles>0</nibbles>
106
+ <nibbles>0</nibbles>
107
+ <nibbles>15</nibbles>
108
+ </spaces>
109
+ <spaces>
110
+ <unit>4</unit>
111
+ <nibbles>5</nibbles>
112
+ <nibbles>15</nibbles>
113
+ </spaces>
114
+ <spaces>
115
+ <unit>2</unit>
116
+ <nibbles>5</nibbles>
117
+ <nibbles>15</nibbles>
118
+ </spaces>
119
+ <spaces>
120
+ <unit>8</unit>
121
+ <nibbles>15</nibbles>
122
+ </spaces>
123
+ <spaces>
124
+ <unit>4</unit>
125
+ <nibbles>2</nibbles>
126
+ <nibbles>5</nibbles>
127
+ <nibbles>15</nibbles>
128
+ </spaces>
129
+ <spaces>
130
+ <unit>4</unit>
131
+ <nibbles>1</nibbles>
132
+ <nibbles>0</nibbles>
133
+ <nibbles>0</nibbles>
134
+ <nibbles>15</nibbles>
135
+ </spaces>
136
+ <spaces>
137
+ <unit>1</unit>
138
+ <nibbles>0</nibbles>
139
+ <nibbles>0</nibbles>
140
+ <nibbles>15</nibbles>
141
+ </spaces>
142
+ <spaces>
143
+ <unit>4</unit>
144
+ <nibbles>3</nibbles>
145
+ <nibbles>5</nibbles>
146
+ <nibbles>15</nibbles>
147
+ </spaces>
148
+ <spaces>
149
+ <unit>4</unit>
150
+ <nibbles>1</nibbles>
151
+ <nibbles>0</nibbles>
152
+ <nibbles>0</nibbles>
153
+ <nibbles>15</nibbles>
154
+ </spaces>
155
+ <spaces>
156
+ <unit>8</unit>
157
+ <nibbles>15</nibbles>
158
+ </spaces>
159
+ <spaces>
160
+ <unit>4</unit>
161
+ <nibbles>5</nibbles>
162
+ <nibbles>15</nibbles>
163
+ </spaces>
164
+ <spaces>
165
+ <unit>2</unit>
166
+ <nibbles>10</nibbles>
167
+ <nibbles>5</nibbles>
168
+ <nibbles>15</nibbles>
169
+ </spaces>
170
+ <spaces>
171
+ <unit>4</unit>
172
+ <nibbles>8</nibbles>
173
+ <nibbles>15</nibbles>
174
+ </spaces>
175
+ <spaces>
176
+ <unit>8</unit>
177
+ <nibbles>15</nibbles>
178
+ </spaces>
179
+ <spaces>
180
+ <unit>4</unit>
181
+ <nibbles>1</nibbles>
182
+ <nibbles>0</nibbles>
183
+ <nibbles>0</nibbles>
184
+ <nibbles>15</nibbles>
185
+ </spaces>
186
+ <spaces>
187
+ <unit>1</unit>
188
+ <nibbles>0</nibbles>
189
+ <nibbles>0</nibbles>
190
+ <nibbles>15</nibbles>
191
+ </spaces>
192
+ <spaces>
193
+ <unit>4</unit>
194
+ <nibbles>0</nibbles>
195
+ <nibbles>15</nibbles>
196
+ </spaces>
197
+ <spaces>
198
+ <unit>8</unit>
199
+ <nibbles>15</nibbles>
200
+ </spaces>
201
+ <spaces>
202
+ <unit>4</unit>
203
+ <nibbles>1</nibbles>
204
+ <nibbles>7</nibbles>
205
+ <nibbles>15</nibbles>
206
+ </spaces>
207
+ <spaces>
208
+ <unit>4</unit>
209
+ <nibbles>8</nibbles>
210
+ <nibbles>15</nibbles>
211
+ </spaces>
212
+ <spaces>
213
+ <unit>1</unit>
214
+ <nibbles>0</nibbles>
215
+ <nibbles>0</nibbles>
216
+ <nibbles>15</nibbles>
217
+ </spaces>
218
+ <spaces>
219
+ <unit>4</unit>
220
+ <nibbles>1</nibbles>
221
+ <nibbles>2</nibbles>
222
+ <nibbles>10</nibbles>
223
+ <nibbles>5</nibbles>
224
+ <nibbles>15</nibbles>
225
+ </spaces>
226
+ <spaces>
227
+ <unit>4</unit>
228
+ <nibbles>4</nibbles>
229
+ <nibbles>5</nibbles>
230
+ <nibbles>15</nibbles>
231
+ </spaces>
232
+ <spaces>
233
+ <unit>4</unit>
234
+ <nibbles>5</nibbles>
235
+ <nibbles>15</nibbles>
236
+ </spaces>
237
+ <spaces>
238
+ <unit>5</unit>
239
+ <nibbles>15</nibbles>
240
+ </spaces>
241
+ <spaces>
242
+ <unit>4</unit>
243
+ <nibbles>5</nibbles>
244
+ <nibbles>15</nibbles>
245
+ </spaces>
246
+ <spaces>
247
+ <unit>5</unit>
248
+ <nibbles>15</nibbles>
249
+ </spaces>
250
+ <spaces>
251
+ <unit>4</unit>
252
+ <nibbles>1</nibbles>
253
+ <nibbles>0</nibbles>
254
+ <nibbles>15</nibbles>
255
+ </spaces>
256
+ <styles_count>12</styles_count>
257
+ <styles>
258
+ <font_def>1</font_def>
259
+ <font_style>0</font_style>
260
+ </styles>
261
+ <styles>
262
+ <font_def>1</font_def>
263
+ <font_style>0</font_style>
264
+ </styles>
265
+ <styles>
266
+ <font_def>1</font_def>
267
+ <font_style>2</font_style>
268
+ </styles>
269
+ <styles>
270
+ <font_def>2</font_def>
271
+ <font_style>2</font_style>
272
+ </styles>
273
+ <styles>
274
+ <font_def>2</font_def>
275
+ <font_style>0</font_style>
276
+ </styles>
277
+ <styles>
278
+ <font_def>2</font_def>
279
+ <font_style>0</font_style>
280
+ </styles>
281
+ <styles>
282
+ <font_def>1</font_def>
283
+ <font_style>1</font_style>
284
+ </styles>
285
+ <styles>
286
+ <font_def>1</font_def>
287
+ <font_style>0</font_style>
288
+ </styles>
289
+ <styles>
290
+ <font_def>3</font_def>
291
+ <font_style>0</font_style>
292
+ </styles>
293
+ <styles>
294
+ <font_def>1</font_def>
295
+ <font_style>0</font_style>
296
+ </styles>
297
+ <styles>
298
+ <font_def>4</font_def>
299
+ <font_style>0</font_style>
300
+ </styles>
301
+ <styles>
302
+ <font_def>5</font_def>
303
+ <font_style>0</font_style>
304
+ </styles>
305
+ </eqn_prefs>
306
+ <full/>
307
+ <slot>
308
+ <options>0</options>
309
+ <char>
310
+ <typeface>3</typeface>
311
+ <mt_code_value>0x0072</mt_code_value>
312
+ <options>0</options>
313
+ <variation>mathmode</variation>
314
+ </char>
315
+ <char>
316
+ <typeface>2</typeface>
317
+ <mt_code_value>0x0028</mt_code_value>
318
+ <options>0</options>
319
+ <variation>mathmode</variation>
320
+ </char>
321
+ <char>
322
+ <typeface>3</typeface>
323
+ <mt_code_value>0x0072</mt_code_value>
324
+ <options>0</options>
325
+ <variation>mathmode</variation>
326
+ </char>
327
+ <char>
328
+ <typeface>6</typeface>
329
+ <mt_code_value>0x003E</mt_code_value>
330
+ <options>4</options>
331
+ <font_position>62</font_position>
332
+ <variation>mathmode</variation>
333
+ </char>
334
+ <char>
335
+ <typeface>8</typeface>
336
+ <mt_code_value>0x0031</mt_code_value>
337
+ <options>0</options>
338
+ <variation>mathmode</variation>
339
+ </char>
340
+ <char>
341
+ <typeface>2</typeface>
342
+ <mt_code_value>0x0029</mt_code_value>
343
+ <options>0</options>
344
+ <variation>mathmode</variation>
345
+ </char>
346
+ <end/>
347
+ </slot>
348
+ <end/>
349
+ </mtef>
350
+ </root>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mathtype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jure Triglav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -148,6 +148,7 @@ files:
148
148
  - mathtype.gemspec
149
149
  - spec/fixtures/expected/299.xml
150
150
  - spec/fixtures/expected/arrows.xml
151
+ - spec/fixtures/expected/embedded.xml
151
152
  - spec/fixtures/expected/embellishments.xml
152
153
  - spec/fixtures/expected/equation1.xml
153
154
  - spec/fixtures/expected/equation10.xml
@@ -167,6 +168,7 @@ files:
167
168
  - spec/fixtures/expected/sizes.xml
168
169
  - spec/fixtures/input/299.bin
169
170
  - spec/fixtures/input/arrows.bin
171
+ - spec/fixtures/input/embedded.bin
170
172
  - spec/fixtures/input/embellishments.bin
171
173
  - spec/fixtures/input/equation1.bin
172
174
  - spec/fixtures/input/equation10.bin
@@ -213,6 +215,7 @@ summary: A Ruby gem for reading MathType binaries and converting them to an XML
213
215
  test_files:
214
216
  - spec/fixtures/expected/299.xml
215
217
  - spec/fixtures/expected/arrows.xml
218
+ - spec/fixtures/expected/embedded.xml
216
219
  - spec/fixtures/expected/embellishments.xml
217
220
  - spec/fixtures/expected/equation1.xml
218
221
  - spec/fixtures/expected/equation10.xml
@@ -232,6 +235,7 @@ test_files:
232
235
  - spec/fixtures/expected/sizes.xml
233
236
  - spec/fixtures/input/299.bin
234
237
  - spec/fixtures/input/arrows.bin
238
+ - spec/fixtures/input/embedded.bin
235
239
  - spec/fixtures/input/embellishments.bin
236
240
  - spec/fixtures/input/equation1.bin
237
241
  - spec/fixtures/input/equation10.bin