forked from brucemiller/LaTeXML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChanges
570 lines (484 loc) · 23.5 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
0.5.x 2006-07-22
- Dealing with some font issues, and adding minimal
implementations: fixltx2e, textcomp, exscale
mathptmx,mathpazo,charter,utopia,chancery,helvet,avant,
courier,bookman,newcent,times,palatino,mathptm,mathpple
And a start at pifont...
0.5.x 2006-07-22
- Went through the TeX book and implemented bunches of
Appendix B (plain) --- still not complete, but better.
0.5.x 2006-07-21
- Added implementation of amsthm; thanks Ioan Sucan.
along with tests, implementation of LaTeX's newtheorem,
and a few other tweaks to make it cleaner.
0.5.x 2006-07-17
- Revised handling of sub/superscripts:
Abandoned the SUBSUPERSCRIPT combinination of sub+super
generated by the parser; now sub and superscripts
(including prescripts) are nested in the (seemingly)
given order; ams's sideset is done similarly.
This imho gives a more sensible semantic structure.
The stackscripts attribute was renamed to scriptpos
and generalized to track the position (pre, mid, post)
and the bracket nesting level where the script was created.
This allows the presentation mathml module to determine
sensible nesting and positioning so that it can
determine under/over vs sub/sup as well as subsuper combinations,
and mprescripts according to the given tree.
A few other enhancements were made to mathml generation, as well.
- Added class attribute to <text> and defined new (generic)
block element with class attribute. These can serve
as fallback elements for testing purposes.
0.5.x 2006-06-24
- With some trepidations...
Converted math arrays to use XMArray/XMRow/XMCell
so there's more sharing with tabular, and it can
handle the lines, headings, etc.
Instead of the more abstract XMApp/[role=ARRAY], etc.
- Added a meaning attribute to math.
The idea is:
role : grammar or presentation info.
name : a name for the token, probably from the cs,
but not necessarily completely semantic.
meaning: a hopefully semantic enough name for the token.
This would be used for content conversions.
- Recent runs show the Perl function bound as an XPath
extension are very costly. Recoded the font match
handling to avoid the perl function, using a set of
contains calls. Vastly faster!
0.5.x 2006-06-16
- Fixed typos in DTD parsing
Thanks Ioan Sucan <i.sucan@iu-bremen.de>
- Reworked pathname_find to be a little clearer about
seaching for files that come with the installation
(but can be overridden by SEARCHPATHS).
Added pathname_findall which finds all matching files,
and used it so that all available catalogs are loaded,
in particular any in the SEARCHPATHS.
In the process noted a bug that if the environment variable
XML_DEBUG_CATALOG is set, XML::LibXML bombs
(seeking advice from mailing list).
- Fix to \varintjlim (Ioan Sucan)_
0.5.x 2006-06-01
- Simplifications to PMML; use roles more consistently
(which means there are some roles that never appear in Grammar,
but which represent presentational structure).
0.5.x 2006-05-20
- Sorted out (hopefully finally) the Unicode nonsense
w/chars in 80--FF; Perl is dumm; you really need to use pack;
exported handy UTF(hex) from LaTeXML::Package to help.
I had been (over)using Unicode::Normalize::NFC to patchup
after the fact, but this has screwy effects
(translates \langle to something in chinese block !?!)
0.5.x 2006-04-28
- A number of initializations, typos, missing \and fixed.
Thanks Christopher B. Hamlin <chamlin@aip.org>
- Fix to eqnarray numbering bug.
Thanks Eduardo Tabacman <eduardot@dessci.com>
0.5.1 2006-04-27
- Release 0.5.1
0.5.x 2006-04-24
- Refined the math grammar, added some test cases.
0.5.x 2006-04-09
- Fixed up some math grammatical quirks,
redefined default role for :, \mid
- Corrected handling of \left.,\right.
- Fixed up Presentation MathML handling of unsuccessfully
parsed math.
0.5.x 2006-03-28
- straightened out some namespace mismatches in DTD's
- Updated documentation to reflect current commands & API's
0.5.0 2006-03-22
- Release 0.4.0
0.4.x 2006-03-18
- Defined \LXDeclMath for "Math Declarations" in latexml package.
These declarations can be embedded in the TeX Source.
Basically these define patterns to match to scoped portions
of the generated document tree (using Rewrite rules),
and add declarative attributes to support the math parsing.
0.4.x 2006-03-01
- Modularized the DTD, along with lots of cleanup.
0.4.x 2006-02-09
- Cleaned up Makefile.pm: made ImageMagick optional
(tho' without any clear failure mode when used, yet);
Safer XSL style file generation.
Should be close to able to install on windows.
- Wrote some Test::Builder support code, reorganized
the test suite, and started adding new tests.
0.4.x 2006-01-27
- Essentially backtracking on changes for 0.2.0,
I'm concerned about the number of globals and exports,
and formalizing extensible readers for control sequences.
Thus, yet another incompatible change in the parameters
to code blocks defining macros, primitives and constructors.
macro($gullet,@args)
primitive($stomach,@args)
beforeDigest($stomach)
afterDigest($stomach)
constructor($document,@args, %properties)
beforeDigest($stomach)
properties($stomach,@args)
afterDigest($stomach,$whatsit)
beforeConstruct($document,$whatsit)
afterConstruct($document,$whatsit,$node)
For Tag code blocks:
afterOpen($document,$node,$box);
afterClose($document,$node,$box);
0.4.x 2006-01-22
- Yet another rewrite of tabular processing.
Now allows @-expressions.
- New Tag option: whitspaceTrim; this trims
leading & trailing whitespace from the direct
text content of these tags.
- Significant namespace cleanup.
There are 2 prefix/namespace mappings.
(1) the one used in code (eg.ltxml) for constructors,etc.
(2) the one used to interpret the DocType (dtd).
Constructors should always specify a namespace prefix for names,
unless they are in the null namespace (NOT default namespace).
In fact, there is no longer a notion of default namespace, as such,
and RegisterNamespace no longer takes that 3rd argument.
DocType takes as extra args prefix=>namespaceURI mappings
to be used in interpretting the DTD, and the resulting document
will be constructed using those same prefixes.
0.4.1 2006-01-09
- Relase 0.4.1
0.4.x 2006-01-09
- Experimental tabular transformation.
More faithful reproduction of latex tabular in html,
via CSS. Heuristics for table headers.
0.4.x 2005-12-15
- Fixed some namespace usages, so that
constructors containing "<foo:bar>..." will
work, provided foo was registered (RegisterNamespace)
Added a too-simple testcase.
- If "-" is used on latexml|latexmlpost command line,
they reads the TeX|XML, respectively, from STDIN.
0.4.x 2005-09-27
- Added missing test result file keyval.xml
- Patch to postprocessor: only mung LaTeXML's DTDs.
0.4.0 2005-09-26
- Release 0.4.0
0.3.x 2005-09-xx
- Hopefully harmless simplifications in DTD regarding text.
Combined the <textstyle> and <hbox> with the <text> element.
Changed model for XMath to only allow <text> rather
than %Simple.class; and made <text> auto-open so that
all non-obviously math things will be wrapped in <text>.
- More DTD (and generation) modification to better support
a logical versus physical paragraph structure.
<paragraph> is a possibly numbered & labeled element
generated by the \paragraph command.
<para> represents a logical paragraph; It contains block
elements, in particular it can contain sequences of
<p> and <equation> that represent a logical paragraph.
It can have a refnum and label, although it does
NOT get the label assigned by \label.
<p> represents a physical paragraph --- a block of text.
- implemented various missing plain macros.
0.3.x 2005-08-xx
- Added support for LaTeX's picture environment and
pstricks (along with pst-node).
A Postprocessing module converts the resulting XML into SVG!
Thanks very much to Ioan Sucan!!
- Reverted the attribute xml:id to id on math nodes (XM*),
since XMRef's idref attribute should only refer to XMath nodes.
This also avoids conflict with other uses of xml:id that
a developer might need to make.
0.3.x 2005-07-xx
- INCOMPATIBLE changes.
In order to make constructors more flexible, I'm incorporating
the possibility to invoke arbitrary functions within constructors.
So, something like:
<foo bar='&Func(#1,'a')'/>
would set the attribute bar on the element foo to
be the result of applying the function Func to the first argument,
and the string 'a'.
Note that even w/o args,parens are required (so maybe entities still work).
The Incompatibility is due to absorbing previous ad-hoc functionality:
?IfMath is now ?#isMath
(since isMath is an internal property of all Whatsits)
Accessing bound values is
VALUE('name') => &LookupValue('name')
A new constructor pattern triggered by '%' is defined
such that %value adds a _set_ of attributes to an element,
where value would be something like #1, #foo, &KeyVals(#1)
such that the value returns a hash reference.
- The above also allows KeyVals to be better encapsulated
and pulled out from the core of LaTeXML.
The functionality of keyvals will now only be available if
you \usepackage{keyvals} or RequirePackage('keyval')
The Parameter specification for KeyVals is now of the form;
RequiredKeyVals:name
or OptionalKeyVals:name
where name is the name of the keyval set. The first expects
keyvals wrapped in the usual {} pair, whereas the second
expects optional args wrapped in [], if present.
Furthermore, the constructor patterns have been redefined in a more
general framework:
Accessing KeyVal data:
#1{key} is now &KeyVal(#1,'key')
Accessing all keys would now be
<foo %&KeyVals(#1)/>
instead of simply <foo #1/>
- Similar change to argument type semiverb. Instead of
{semiverb}
you should now write
Semiverbatim
this reads an {} delimited argument, but with most catcodes turned off.
- Conditional patterns in constructors now properly balance the delimiting
parentheses. Thus conditionals can now be nested, and function calls
used within the patterns should work.
- Revamped and regularized Parameter specs, making them more extensible.
{KeyVals:foo} => RequiredKeyVals:foo
[KeyVals:foo] => OptionalKeyVals:foo
Flag:* => OptionalKeyword:*
0.3.x 2005-06-xx
- Fixed Subtle bug with conditionals and \else;
Special case: \else doesn't get expanded while
the conditional test is being expanded! (See TeX: The Program)
(Thanks Kohlhase for pointing it out)
- Fixed \underline, \overrightarrow, \overleftarrow to work in textmode.
0.3.2 2005-05-16
- Cleanup of LaTeXML.dtd; to be make sure all elements get
appropriate attributes defined (should validate mostly).
- More tweaks & tuning for more understandable error messages.
- implemented \raggedright, \raisebox,\buildrel,\stackrel
- New functionality in Constructor patterns:
VALUE('keyword') can be used where a value is expected
to lookup a value in the state. Also allows args & such,
So \ref ends up defined as <ref labelref='#1'>VALUE('LABEL@#1')</ref>
This also means that the constructors \@VALUE and \REF are no longer
needed, so they're removed.
0.3.1 2005-05-10
- Improved mismatched environment reporting.
- More faithful implementation of verbatim & comment environments
with fixes to mouth's readRawLines.
- Fix in Stringify for XML nodes; apparently a documentation bug
in XML::LibXML::Namespace ? (it doesn't implement getValue)
- imcremental improvements in latexmlfind
0.3.0 2005-05-06
- Release 0.3.0
- Some speculative code on handling the picture environment,
along with pstricks, but not yet settled.
- More exports from Package for common operations there,
and hopefully reduce the usage of global $STOMACH, etc.
- Improved and updated documentation.
Still need to document the new Rewrite facilities
(but would like to make API more concise)
0.2.99x 2005-04-13
- Allow * flag (ignored) on \newcommand, et.al.
- Fixed some problems with fake environments
(ie. \begin{small}...\end{small})
0.2.99 2005-04-07
- Released as 0.2.99 so the Bremen folks can get
some work done. Documentation update is needed
for 0.3.0 release.
0.2.xx 2005-03-17
- Bigger changes, increment version.
- Modified DocType; don't add namespace, use RegisterNamespace
instead.
- Intestine now creates XML::LibXML structures directly.
Module LaTeXML::Node is removed.
In fact, Intestine essentially represents the Document itself
and thus is now renamed LaTeXML::Document.
- Removed global exported Font() and MathFont()
- Made more definitions scopable, cleaned up stash & scope
implementation. Renamed: methods {de}activateStash
- Implemented Rewrite rules that act on the constructed document.
They also allow rules defined in terms of TeX strings
(tokenized, digested, converted to document fragments
and then XPath statements, as needed).
These rules can be used to effectively declare variable
or symbol's Grammatical roles.
Math Parsing is now part of the latexml script
and removed from latexmlpost.
0.2.3 2005-01-xx
- Fixed a problem where misplaced egroups could
inadvertently change the mode. Mode is no longer
affected by the TeX stack; they must be explicitly
start/finished (even though they also introduce grouping).
- Fixed counting of `raw' lines read for
"comment"ed environments. Line numbers for
errors were getting skewed.
- Moved sectional attribute declarations inside the
%define.structure; block to ease defining extension DTD's
0.2.2 2005-01-11
- Random minor bug fixes and improvements to error
reporting.
0.2.1 2005-01-10
- Bug fixes to stylesheet LaTeXML-xhtml,
Thanks Yann Golanski
- A few rearrangements and renamings to make a simple
top-level 'digest from string' alternative.
[ $latexml->readAndDigestString($string) ]
Also, renamed the slightly misnamed Stomach methods:
readAndDigestChunk => digestNextChunk
readAndDigestBody => digestNextBody
- A few typos in Stomach fixed
- Almost complete implementation of the various AMS
packages:amsbsy,amsfonts,amsmath,amsopn,amssymb,amstext,amsxtra
Still need to complete and test the various alignment environments
0.2.0 2004-12-25
Extensive changes, so incrementing minor version, but
not robust enough for major version!
- Added version info to latexml, latexmlpost help output.
separated --debug and --trace options.
- Removed mathConstructor option to various DefXXs
Use new constructor conditional "?IfMath(..)(...)"
- POS is an annoying acronym. Role is better and
upon reflection, doesn't conflict with OpenMath's ussge.
Hence, partOfSpeech and POS have been replaced by role
to describe the grammatical role (or `part of speech')
of tokens to be interpreted during a math parse.
- Reduced introduction of new `name' attributes for
math tokens, especially when they add little value.
Most greek & math characters are just replaced
by thier unicode equivalent; In most cases, a name
is synthesized from the control sequence when needed.
The intestines will now create an XMTok, if required.
Also, it will automatically manage the font
and assign a `cs' attribute to record the macro
used to create the token.
- DefSymbol is deprecated (removed in fact)
- DefMath (new) covers what DefSymbol did,
and more: handles the common form for functions
taking arguments. When the macro takes args and
the replacement presentation text involves #1,
it generates an XMDual using the replacement as
an expansion, but also creates the content form.
To avoid duplicating the arguments, the XMArg's
containing the arguments in the content branch
are marked with an id; in the presentation branch
<XMRef idref='id..'/> is used. Corresponding
code in postprocessor looks up the referred node
when needed. XMRef can also be used on it's own:
see the macros \@XMArg and \@XMRef in TeX.ltxml.
- Constructors take property arguments which supply
properties to the whatsit (which can be CODE evaluated
at digestion time). These properties can be used
in the constructor pattern.
- Refactoring of Intestine & DOM; most interaction
with Model is done in Intestine. Renamed
DOM to Node and renamed it's subclasses.
- "In for a dime, in for a dollar":
Since I'd found it necessary to use global variables
to access the stomach and intestine from strange places,
then I might just USE the darn'ed things!
Consequently, most places were a $stomach, $intestine
(or $gullet and $model) were passed around as arguments,
no longer do. Now, just use the globals, which the inlines
STOMACH, INTESTINE and GULLET and MODEL return.
As a side effect, the `0-th' argument to CODE implementing
control sequences is generally the definition (for whatever
use that might be), or the Whatsit for constructors.
- Made DOM construction more forgiving by using SalvageError
when constructing a tree that doesn't conform to DTD.
The result may not be valid, but continues processing.
This led to major rewriting & cleanup of error reporting,
and storing a `locator' on all data objects that record
where in the source file they were created.
[Thanks to suggestions from Kevin Smith]
- Cleanup of math parsing, presentation mathml generation.
- Added postprocessing module for generating OpenMath.
It is insufficient, but a starting point.
- latexml.sty & latexml.ltxml
A start at providing special purpose macros that make sense
in LaTeX, and do even more interesting things in LaTeXML.
Currently, define some silly macros like \XML, \LaTeXML, etc,
and provide LaTeX bindings for things like DefMath!
- Sadly, I gave up on "overload". Nice idea, but
for a big package, it's tricky to get right.
The magic creation of methods can lead to hard-to-find
performance issues, if you try to do to much with Stringify.
So, Object doesn't use overload. To stringify or compare,
consider the (newly exported functions in Global):
Stringify($ob), ToString($ob) and Equals($a,$b).
- added latexml.sty which should get installed in the local branch
of the standard texmf directories. Not yet documented, but
it provides (or will) LaTeX bindings to interesting LaTeXML
declarations, eg. defining math commands.
0.1.2 2004-09-02
- Some experiments to reduce namespace redundancy.
C14N is too severe, use of $node->addNewChild
is non-portable and awkward.
Kludge: leverage the namespace cleanup on _parsing_ !!
(which means, write to string & reparse!!!)
(acknowledged need on libxml2 end, but not done)
- Portability fixes to LaTeXML::Util::Pathname
Should work in Windows, thanks Ioan Sucan.
- Modifications to Constructor patterns
* Changed the `property' value pattern to '#name'
(eg. #body instead of %body).
(Gratuitous, but simplifies the grammar)
* Values in patterns, #1 and #name can now
be followed by {key}, for KeyVal arguments,
to access the value associated with a given key.
* Conditional expressions now recognize general values:
?<value>(...) and also accept an else clause
?<value>(...)(...).
* The NOT conditional, !<value>(...), is removed;
Use ?<value>()(...) instead.
* Prefixing the constructor pattern with '^'
allows the generated XML to `float up' to a parent
node that is allowed to contain it, according to
the document type. The floats keyword for definitions
is also removed.
* The untex strings for constructors that shouldn't appear
in the math TeX string (used for image generation)
should now be empty, '', instead of using the floats keyword.
0.1.1 2004-06-15
- Packages:
* Made package loading more robust; doesn't re-load;
* Crude access to options
* Added several missing definitions to TeX & LaTeX
* Implemented comment, acronym packages;
initial (mostly empty) amssymb
- General:
* Catch filters that don't actually change the input.
* Refactoring: New module Global.pm carries all exported
constants and constructors to simplify coding.
* Refactoring: name changes & code movement of methods
confusingly called `digestFoo' and similar.
* Refactoring: Moved macro parameter handling to new
module Parameters.pm (and as side-effect had to
rename parameters to Register (DefRegister, etc))
* More careful Token equals method, so newline can convert to
a T_SPACE w/ newline inside; this means the output nominally
preserves lines! (but STOMACH->setValue('preserveNewLines',0);
disables it).
* New constructor \@VALUE fetches values from stomach during
absorbtion in intestines. This (or similar) used to put
reference numbers in \ref, like 2nd LaTeX pass.
- Math:
* Introduced new element <Math> which can contain the various
alternative representations of math, such as XMath, m:math, ...
Moved most of XMath's attributes to Math.
- Error/Warning Messages
* Added messages to show progress during processing (unless -quiet)
* New SalvageError message for things that in principle are errors,
but we're going to try to proceed; added some things to this category,
like unknown macros, and such.
* Added source locator to Whatsit to improve error messages.
- PostProcessing:
* Fixed xml catalog so it finds mathml dtd and entity files
* Fixed latexmlpost and LaTeXML::Post to recognize html and xhtml
output formats; refined the stylesheets (LaTeXML-html.xsl and
LaTeXML-xhtml.xsl (both of which include LaTeXML-base.xsl))
- Put LaTeXML tags in thier own namespace:
http://dlmf.nist.gov/LaTeXML
And first pass at fixing postprocessors to recognize this
[probably introduced bugs, and in any case, namespace normalization
is pretty crummy]
- NEED TO DO:
* Implement alltt package
* Question: Should XMath be duplicated before parsing?
(ie w/different status=tokenized|parsed|partially-parsed|....)
This would allow more inference and then re-run the parser.
* Extend constructor syntax to work with KeyVals, apply random functions?
* Refactor DOM? eg. use XML::LibXML, move more analysis to Intestine
this needs (at least) resorting Font reduction.
Thanks to Michael Kohlhase <m.kohlhase@iu-bremen.de> for comments & examples
leading to many of these patches.
0.1.0 2004-05-10
Initial (pre)release