Commit Graph

553 Commits

Author SHA1 Message Date
Eddie Kohler
3af23fd8a4 Fix #711 issue with multiple superscripts.
The previous code incorrectly implemented TeXbook rules. First off,
the font metrics at issue should be those for the superscript/
subscript style, not the main style. Secondly, the metrics should be
scaled by the font size.

This changes some screenshotter tests (and they look more like TeX
now).
2017-06-05 23:52:16 -04:00
Kevin Barabash
9f3f445360 Merge pull request #684 from edemaine/anglebracket
Support <, >, | and many \text... commands in text mode
2017-05-16 20:19:38 -04:00
Kevin Barabash
78be8d4a29 Merge pull request #697 from edemaine/implies
Add \iff, \implies, \impliedby support
2017-05-16 20:02:39 -04:00
Erik Demaine
1428136e52 Support <, >, |, and long-form symbols. Fix #662
Add long-form aliases for various text symbols

* \textgreater is an alias for > in text mode
* \textless is an alias for < in text mode
* \textbar is an alias for | in text mode
* \textdollar is an alias for \$ in text mode
* \textunderscore is an alias for \_ in text mode
* \textbraceleft is an alias for \{ in text mode
* \textbraceright is an alias for \} in text mode
* \textless is an alias for < in text mode
* \textgreater is an alias for > in text mode
* \textbar is an alias for | in text mode
* \textbardbl is an alias for \| in text mode
* \textendash is an alias for -- in text mode
* \textemdash is an alias for --- in text mode
* \textquoteleft is an alias for ` in text mode
* \textquoteright is an alias for ' in text mode
* \textquotedblleft is an alias for `` in text mode
* \textquotedblright is an alias for '' in text mode
* \textdagger is an alias for \dag in text mode
* \textdaggerdbl is an alias for \ddag in text mode
* \textsterling is an alias for \pounds in text mode
* \dag, \ddag work in text mode
* \circledR, \checkmark, \pounds work in text mode too
* Extend Symbols1 test to test \pounds and \textdollar in \text
* Add note about \pounds in text vs. math mode
2017-05-16 18:03:47 -04:00
Erik Demaine
46f34181e3 Add \iff, \implies, \impliedby support. Fix #190.
* Based on @ronkok's code, but without \mathrel as it's absent
  from amstex.sty.
* Add toBuild tests to ensure these operators expand.
2017-05-16 17:50:06 -04:00
Kevin Barabash
e4b93379fb Merge pull request #699 from edemaine/middle
Refactor and comment space splicing code
2017-05-13 15:07:05 -04:00
Erik Demaine
5165cc48e6 Refactor and comment space splicing code 2017-05-12 09:33:14 -04:00
Eddie Kohler
7192bd6595 Fix #683.
Shift spaces back into the replacement middle delimiter.
2017-05-12 09:28:49 -04:00
Tab Atkins Jr
b9e7b6898f Rephrase displayMode description to be clearer (#648)
* Clarify meaning of true and false
* Clarify inline vs. block
2017-04-27 19:02:19 -04:00
Kevin Barabash
429c1f6f52 Merge pull request #678 from edemaine/symbols
Fix font typo math -> main
2017-04-15 20:55:53 -04:00
Kevin Barabash
2c92a9a368 Merge pull request #605 from gagern/overset
Builtin macros, macro arguments, \overset and \underset
2017-04-15 20:39:01 -04:00
Erik Demaine
171e38f28a Old font command support: \rm, \sf, \tt, \bf, \it (#675)
Squashed:
* \rm, \sf, \tt, \bf, \it support
* Fix space consumption after macros without arguments
* Add tests for old font commands
2017-04-07 22:06:23 +01:00
Erik Demaine
1379c2666e Fix font typo math -> main 2017-04-07 14:51:57 -04:00
Martin von Gagern
3a95d8889b Added screenshotter tests for overset and underset 2017-04-05 21:43:21 +01:00
Martin von Gagern
28ad473e4a Indicate missing support for delimited macros 2017-04-05 21:43:12 +01:00
Martin von Gagern
e2763a3007 Support \bgroup and \egroup 2017-04-05 21:43:04 +01:00
Martin von Gagern
96d1e6aea7 Introduce defineMacro function
… as suggested by Erik Demaine, to future-proof the code.
2017-04-05 21:42:48 +01:00
Martin von Gagern
7ec455083f Builtin macros, macro arguments, overset and underset
* Ship predefined macros with the library, in macros.js.
* Allow macro arguments #1 and so on, with argument count deduced from string.
* Use these features to implement \overset and \underset, fixes #484.
2017-04-05 21:42:38 +01:00
Noxx
40ec1b92b8 Fixed missing verb in README (#668) 2017-03-14 11:53:20 -04:00
Tab Atkins Jr
f3df1ccbac Use utils.deflt for Settings (#649)
Rather than duplicate the definition of the undefined-defaulter, use the version already present in utils.
2017-01-27 07:54:05 +01:00
Sergey Pashinin
fdd83db65a fix #509: added some international operators (#647)
* fix #509: added some international operators

* trailing comma
2017-01-26 15:04:18 -05:00
Kevin Barabash
742e512172 Merge pull request #642 from gagern/release
Fix release script after experience from 0.7.1 release
2017-01-23 07:53:48 -05:00
Kevin Barabash
3fea3dfbbc Merge pull request #635 from gagern/fontDiff
Set up a diff attribute and textconv instructions for font files
2017-01-22 19:57:03 -05:00
Kevin Barabash
301d7cfb1a Merge pull request #639 from gagern/printSize
Show compressed sizes correctly
2017-01-22 19:27:17 -05:00
Kevin Barabash
7aa84d010c Merge pull request #644 from gagern/readmeMacros
Describe site-provided macros in README
2017-01-22 18:21:51 -05:00
Martin von Gagern
59c4e008db Fix case of string in README 2017-01-22 22:39:57 +01:00
Martin von Gagern
fc115e1f66 Obtain updated README by using a checkout
As the dist directory isn't available on the original branch, we cant use
its files to update the SRI hashes.  Checking out from the release tag is
therefore the better option.  A checkout will automatically stage its files.
2017-01-22 15:28:37 +01:00
Martin von Gagern
079fecaf86 Update README files to 0.7.1 release 2017-01-22 14:48:00 +01:00
Martin von Gagern
76051a6ac2 Fix release script after experience from 0.7.1 release
* Also edit dist/README.md. Otherwise npm publish will overwrite that
  AFTER the dist directory has been added, causing the git checkout to fail.
  And it's the right thing to do anyway, having ALL the READMEs edited.
* Add all the modified READMEs so they get committed correctly.
* Improve two references to master which are no longer accurate.
* Check for uncommitted changes just before creating the tag.
* Encourage always specifying the next version, as discussed in
  https://github.com/Khan/KaTeX/pull/615#discussion_r97208770
2017-01-22 00:51:00 +01:00
Kevin Barabash
8dd161d4b2 Merge pull request #615 from gagern/release
Improve release script and bower support
2017-01-21 17:49:15 -05:00
Erik Demaine
a5e38d3b8a Switch speed test in README (#640)
Permission to reference page granted in
https://github.com/Khan/KaTeX/issues/420#issuecomment-270810784
2017-01-20 22:50:10 +01:00
Martin von Gagern
8dc1374e7a Show compressed sizes correctly
On my macOS 10.12 all the sizes used to show as zero.  Having them in a
single shell invocation should avoid that problem in a portable fashion.
2017-01-20 12:05:03 +01:00
Erik Demaine
a738185704 Fix x'^2 (#636)
* Fix x'^2
* Add screenshot for x'^2
* x^2' should fail.  Add and fix multiple prime/superscript tests.
2017-01-19 19:50:16 +01:00
Martin von Gagern
a3f0653e5c Set up a diff attribute and textconv instructions for font files
This may help us generate human-readable diffs of font files.
2017-01-19 17:47:59 +01:00
Erik Demaine
d4aa6a7253 Fix all AMS mathord symbols (#618)
* Fix all AMS mathord symbols

* Fix \imath, \jmath, \pounds support

* Fix \mathit support

* Fix Greek capitals

* Default font to main (fix Unicode support)

* Now using correct \maltese

* Correct mathit documentation

* var -> const

* Add trailing commas

* Remove greekCapitals (no longer needed)
2017-01-15 19:05:21 -05:00
Erik Demaine
f1c02226cc Change cell style to 'text' in {array}, {matrix}, {cases}. Add {darray} and {dcases}. (#606)
* Change cell style to 'text' in {array}, {matrix}, {cases}.
* Add {darray} and {dcases} which use display style for their cells.
* Add ArrayMode test with \frac's inside {array} in display mode.
2017-01-15 22:17:45 +01:00
Martin von Gagern
38ba9f9187 Serve files with and without babelify step
As babelify is slow, it may be desriable to not run it during development.
This is OK if the browser is recent enough to understand ES6 natively.
(This does not include current Firefox due to it having problems with
for(const … in …), https://bugzilla.mozilla.org/show_bug.cgi?id=1094995.)
For older browsers, or to check issues possibly introduced by babelify,
adding /babel as the first component of the path will switch to a version
which has been processed by babelify.  This is also used for screenshots.
2017-01-13 22:37:17 -05:00
Martin von Gagern
bd9db332d2 Turn var into const or let 2017-01-13 22:37:17 -05:00
Martin von Gagern
9b565a6375 Include babelify step in browserify calls
This allows using ES6 syntax in our code, while maintaining backwards
compatibility for the generated file.
2017-01-13 22:37:17 -05:00
Martin von Gagern
a0cd343d85 Improve description of macros
Separate type, meaning and format to clarify the paragraph.
2017-01-13 19:59:36 +01:00
Martin von Gagern
5e4f50dc09 Drop --insane flag, just formulate the prompt appropriately 2017-01-13 13:48:25 +01:00
Martin von Gagern
5783e193ed Update CDN version numbers and SRI hashes on release 2017-01-13 13:43:41 +01:00
Martin von Gagern
961e9db514 Add --dry-run and --insane options to release script
Now we have some sanity checks, a way to skip them and a way to see which
commands would be executed on the git and npm side without actually
executing them.
2017-01-13 13:38:39 +01:00
Martin von Gagern
35ff154ead Make release tag an annotated tag
It is customary to use annotated tags for releases, to preserve the
information about when the tag itself was created, by whom and for what
purpose.  In our case we always have a commit directly before the tag, but
some workflows may expect annotated tags nonetheless, “git describe” among
them.  We might want to sign them one day, too.
2017-01-13 13:38:39 +01:00
Martin von Gagern
6404cfd269 Drop version field from bower.json
According to bower docs, that field is deprecated and ignored.
Git tag names (or commit ids) are the way to identify a given version.
2017-01-13 13:38:39 +01:00
Martin von Gagern
73cafd16da Avoid some warnings from bower
Bower prefers to have package names in lower case, and to have uncompressed
sources listed as entry points.  Otherwise it will issue warnings.
2017-01-13 13:38:39 +01:00
Martin von Gagern
a3988d9d56 Allow creating releases from branches other than master 2017-01-13 13:38:39 +01:00
Martin von Gagern
840771c643 Un-ignore dist directory on releases for the sake of bower 2017-01-13 13:38:39 +01:00
James Lee
549104c5a8 auto-renderer README.md - added integrity (#591)
Integrity generated from https://www.srihash.org/
Reference: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
2017-01-13 12:15:57 +01:00
James Lee
90ba0e341d README.md - added integrity (#590)
Integrity generated from https://www.srihash.org/
Reference: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
2017-01-13 12:15:28 +01:00