mirror of
https://github.com/fjdu/obsidian-latex-unicode.git
synced 2026-07-22 07:30:30 +00:00
add unicodeit to the source
This commit is contained in:
parent
9ee7b31dfb
commit
a9b9a90047
35 changed files with 14363 additions and 0 deletions
1
data.ts
1
data.ts
|
|
@ -4418,4 +4418,5 @@ export const subsuperscripts = [
|
||||||
['^>', ' ͐'],
|
['^>', ' ͐'],
|
||||||
['^,', ' ̓'],
|
['^,', ' ̓'],
|
||||||
['^,,', ' ̕'],
|
['^,,', ' ̕'],
|
||||||
|
['^.', 'ᐧ']
|
||||||
];
|
];
|
||||||
|
|
|
||||||
6
unicodeit/.eslintignore
Normal file
6
unicodeit/.eslintignore
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# don't ever lint node_modules
|
||||||
|
node_modules
|
||||||
|
# don't lint build output (make sure it's set to your correct build folder name)
|
||||||
|
ts_dist
|
||||||
|
# don't lint nyc coverage output
|
||||||
|
coverage
|
||||||
11
unicodeit/.eslintrc.js
Normal file
11
unicodeit/.eslintrc.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: [
|
||||||
|
'@typescript-eslint',
|
||||||
|
],
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
],
|
||||||
|
};
|
||||||
10
unicodeit/.pylintrc
Normal file
10
unicodeit/.pylintrc
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[BASIC]
|
||||||
|
|
||||||
|
variable-rgx=[a-z0-9_]{1,30}$
|
||||||
|
good-names=ap,ar,ax,d,f,g,gt,h,i,im,lr,p,r,s,t,t1,t2,th,v,vs,w,wh,x,x1,x2,xs,y,ys,xy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[TYPECHECK]
|
||||||
|
|
||||||
|
disable=duplicate-code,missing-docstring,invalid-name,redefined-outer-name
|
||||||
13
unicodeit/LICENSE
Normal file
13
unicodeit/LICENSE
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
Copyright 2020 Sven Kreiss, Kyle Cranmer and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some symbols were extracted from: http://milde.users.sourceforge.net/LUCR/Math/data/unimathsymbols.txt
|
||||||
|
which is Copyright 2011 by Günter Milde and licensed under the LaTeX Project Public License (LPPL)
|
||||||
|
included here as LICENSE.LPPL.
|
||||||
416
unicodeit/LICENSE.LPPL
Normal file
416
unicodeit/LICENSE.LPPL
Normal file
|
|
@ -0,0 +1,416 @@
|
||||||
|
The LaTeX Project Public License
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
|
||||||
|
LPPL Version 1.3c 2008-05-04
|
||||||
|
|
||||||
|
Copyright 1999 2002-2008 LaTeX3 Project
|
||||||
|
Everyone is allowed to distribute verbatim copies of this
|
||||||
|
license document, but modification of it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
========
|
||||||
|
|
||||||
|
The LaTeX Project Public License (LPPL) is the primary license under
|
||||||
|
which the LaTeX kernel and the base LaTeX packages are distributed.
|
||||||
|
|
||||||
|
You may use this license for any work of which you hold the copyright
|
||||||
|
and which you wish to distribute. This license may be particularly
|
||||||
|
suitable if your work is TeX-related (such as a LaTeX package), but
|
||||||
|
it is written in such a way that you can use it even if your work is
|
||||||
|
unrelated to TeX.
|
||||||
|
|
||||||
|
The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
|
||||||
|
below, gives instructions, examples, and recommendations for authors
|
||||||
|
who are considering distributing their works under this license.
|
||||||
|
|
||||||
|
This license gives conditions under which a work may be distributed
|
||||||
|
and modified, as well as conditions under which modified versions of
|
||||||
|
that work may be distributed.
|
||||||
|
|
||||||
|
We, the LaTeX3 Project, believe that the conditions below give you
|
||||||
|
the freedom to make and distribute modified versions of your work
|
||||||
|
that conform with whatever technical specifications you wish while
|
||||||
|
maintaining the availability, integrity, and reliability of
|
||||||
|
that work. If you do not see how to achieve your goal while
|
||||||
|
meeting these conditions, then read the document `cfgguide.tex'
|
||||||
|
and `modguide.tex' in the base LaTeX distribution for suggestions.
|
||||||
|
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
===========
|
||||||
|
|
||||||
|
In this license document the following terms are used:
|
||||||
|
|
||||||
|
`Work'
|
||||||
|
Any work being distributed under this License.
|
||||||
|
|
||||||
|
`Derived Work'
|
||||||
|
Any work that under any applicable law is derived from the Work.
|
||||||
|
|
||||||
|
`Modification'
|
||||||
|
Any procedure that produces a Derived Work under any applicable
|
||||||
|
law -- for example, the production of a file containing an
|
||||||
|
original file associated with the Work or a significant portion of
|
||||||
|
such a file, either verbatim or with modifications and/or
|
||||||
|
translated into another language.
|
||||||
|
|
||||||
|
`Modify'
|
||||||
|
To apply any procedure that produces a Derived Work under any
|
||||||
|
applicable law.
|
||||||
|
|
||||||
|
`Distribution'
|
||||||
|
Making copies of the Work available from one person to another, in
|
||||||
|
whole or in part. Distribution includes (but is not limited to)
|
||||||
|
making any electronic components of the Work accessible by
|
||||||
|
file transfer protocols such as FTP or HTTP or by shared file
|
||||||
|
systems such as Sun's Network File System (NFS).
|
||||||
|
|
||||||
|
`Compiled Work'
|
||||||
|
A version of the Work that has been processed into a form where it
|
||||||
|
is directly usable on a computer system. This processing may
|
||||||
|
include using installation facilities provided by the Work,
|
||||||
|
transformations of the Work, copying of components of the Work, or
|
||||||
|
other activities. Note that modification of any installation
|
||||||
|
facilities provided by the Work constitutes modification of the Work.
|
||||||
|
|
||||||
|
`Current Maintainer'
|
||||||
|
A person or persons nominated as such within the Work. If there is
|
||||||
|
no such explicit nomination then it is the `Copyright Holder' under
|
||||||
|
any applicable law.
|
||||||
|
|
||||||
|
`Base Interpreter'
|
||||||
|
A program or process that is normally needed for running or
|
||||||
|
interpreting a part or the whole of the Work.
|
||||||
|
|
||||||
|
A Base Interpreter may depend on external components but these
|
||||||
|
are not considered part of the Base Interpreter provided that each
|
||||||
|
external component clearly identifies itself whenever it is used
|
||||||
|
interactively. Unless explicitly specified when applying the
|
||||||
|
license to the Work, the only applicable Base Interpreter is a
|
||||||
|
`LaTeX-Format' or in the case of files belonging to the
|
||||||
|
`LaTeX-format' a program implementing the `TeX language'.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CONDITIONS ON DISTRIBUTION AND MODIFICATION
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
1. Activities other than distribution and/or modification of the Work
|
||||||
|
are not covered by this license; they are outside its scope. In
|
||||||
|
particular, the act of running the Work is not restricted and no
|
||||||
|
requirements are made concerning any offers of support for the Work.
|
||||||
|
|
||||||
|
2. You may distribute a complete, unmodified copy of the Work as you
|
||||||
|
received it. Distribution of only part of the Work is considered
|
||||||
|
modification of the Work, and no right to distribute such a Derived
|
||||||
|
Work may be assumed under the terms of this clause.
|
||||||
|
|
||||||
|
3. You may distribute a Compiled Work that has been generated from a
|
||||||
|
complete, unmodified copy of the Work as distributed under Clause 2
|
||||||
|
above, as long as that Compiled Work is distributed in such a way that
|
||||||
|
the recipients may install the Compiled Work on their system exactly
|
||||||
|
as it would have been installed if they generated a Compiled Work
|
||||||
|
directly from the Work.
|
||||||
|
|
||||||
|
4. If you are the Current Maintainer of the Work, you may, without
|
||||||
|
restriction, modify the Work, thus creating a Derived Work. You may
|
||||||
|
also distribute the Derived Work without restriction, including
|
||||||
|
Compiled Works generated from the Derived Work. Derived Works
|
||||||
|
distributed in this manner by the Current Maintainer are considered to
|
||||||
|
be updated versions of the Work.
|
||||||
|
|
||||||
|
5. If you are not the Current Maintainer of the Work, you may modify
|
||||||
|
your copy of the Work, thus creating a Derived Work based on the Work,
|
||||||
|
and compile this Derived Work, thus creating a Compiled Work based on
|
||||||
|
the Derived Work.
|
||||||
|
|
||||||
|
6. If you are not the Current Maintainer of the Work, you may
|
||||||
|
distribute a Derived Work provided the following conditions are met
|
||||||
|
for every component of the Work unless that component clearly states
|
||||||
|
in the copyright notice that it is exempt from that condition. Only
|
||||||
|
the Current Maintainer is allowed to add such statements of exemption
|
||||||
|
to a component of the Work.
|
||||||
|
|
||||||
|
a. If a component of this Derived Work can be a direct replacement
|
||||||
|
for a component of the Work when that component is used with the
|
||||||
|
Base Interpreter, then, wherever this component of the Work
|
||||||
|
identifies itself to the user when used interactively with that
|
||||||
|
Base Interpreter, the replacement component of this Derived Work
|
||||||
|
clearly and unambiguously identifies itself as a modified version
|
||||||
|
of this component to the user when used interactively with that
|
||||||
|
Base Interpreter.
|
||||||
|
|
||||||
|
b. Every component of the Derived Work contains prominent notices
|
||||||
|
detailing the nature of the changes to that component, or a
|
||||||
|
prominent reference to another file that is distributed as part
|
||||||
|
of the Derived Work and that contains a complete and accurate log
|
||||||
|
of the changes.
|
||||||
|
|
||||||
|
c. No information in the Derived Work implies that any persons,
|
||||||
|
including (but not limited to) the authors of the original version
|
||||||
|
of the Work, provide any support, including (but not limited to)
|
||||||
|
the reporting and handling of errors, to recipients of the
|
||||||
|
Derived Work unless those persons have stated explicitly that
|
||||||
|
they do provide such support for the Derived Work.
|
||||||
|
|
||||||
|
d. You distribute at least one of the following with the Derived Work:
|
||||||
|
|
||||||
|
1. A complete, unmodified copy of the Work;
|
||||||
|
if your distribution of a modified component is made by
|
||||||
|
offering access to copy the modified component from a
|
||||||
|
designated place, then offering equivalent access to copy
|
||||||
|
the Work from the same or some similar place meets this
|
||||||
|
condition, even though third parties are not compelled to
|
||||||
|
copy the Work along with the modified component;
|
||||||
|
|
||||||
|
2. Information that is sufficient to obtain a complete,
|
||||||
|
unmodified copy of the Work.
|
||||||
|
|
||||||
|
7. If you are not the Current Maintainer of the Work, you may
|
||||||
|
distribute a Compiled Work generated from a Derived Work, as long as
|
||||||
|
the Derived Work is distributed to all recipients of the Compiled
|
||||||
|
Work, and as long as the conditions of Clause 6, above, are met with
|
||||||
|
regard to the Derived Work.
|
||||||
|
|
||||||
|
8. The conditions above are not intended to prohibit, and hence do not
|
||||||
|
apply to, the modification, by any method, of any component so that it
|
||||||
|
becomes identical to an updated version of that component of the Work as
|
||||||
|
it is distributed by the Current Maintainer under Clause 4, above.
|
||||||
|
|
||||||
|
9. Distribution of the Work or any Derived Work in an alternative
|
||||||
|
format, where the Work or that Derived Work (in whole or in part) is
|
||||||
|
then produced by applying some process to that format, does not relax or
|
||||||
|
nullify any sections of this license as they pertain to the results of
|
||||||
|
applying that process.
|
||||||
|
|
||||||
|
10. a. A Derived Work may be distributed under a different license
|
||||||
|
provided that license itself honors the conditions listed in
|
||||||
|
Clause 6 above, in regard to the Work, though it does not have
|
||||||
|
to honor the rest of the conditions in this license.
|
||||||
|
|
||||||
|
b. If a Derived Work is distributed under a different license, that
|
||||||
|
Derived Work must provide sufficient documentation as part of
|
||||||
|
itself to allow each recipient of that Derived Work to honor the
|
||||||
|
restrictions in Clause 6 above, concerning changes from the Work.
|
||||||
|
|
||||||
|
11. This license places no restrictions on works that are unrelated to
|
||||||
|
the Work, nor does this license place any restrictions on aggregating
|
||||||
|
such works with the Work by any means.
|
||||||
|
|
||||||
|
12. Nothing in this license is intended to, or may be used to, prevent
|
||||||
|
complete compliance by all parties with all applicable laws.
|
||||||
|
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
===========
|
||||||
|
|
||||||
|
There is no warranty for the Work. Except when otherwise stated in
|
||||||
|
writing, the Copyright Holder provides the Work `as is', without
|
||||||
|
warranty of any kind, either expressed or implied, including, but not
|
||||||
|
limited to, the implied warranties of merchantability and fitness for a
|
||||||
|
particular purpose. The entire risk as to the quality and performance
|
||||||
|
of the Work is with you. Should the Work prove defective, you assume
|
||||||
|
the cost of all necessary servicing, repair, or correction.
|
||||||
|
|
||||||
|
In no event unless required by applicable law or agreed to in writing
|
||||||
|
will The Copyright Holder, or any author named in the components of the
|
||||||
|
Work, or any other party who may distribute and/or modify the Work as
|
||||||
|
permitted above, be liable to you for damages, including any general,
|
||||||
|
special, incidental or consequential damages arising out of any use of
|
||||||
|
the Work or out of inability to use the Work (including, but not limited
|
||||||
|
to, loss of data, data being rendered inaccurate, or losses sustained by
|
||||||
|
anyone as a result of any failure of the Work to operate with any other
|
||||||
|
programs), even if the Copyright Holder or said author or said other
|
||||||
|
party has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
|
||||||
|
MAINTENANCE OF THE WORK
|
||||||
|
=======================
|
||||||
|
|
||||||
|
The Work has the status `author-maintained' if the Copyright Holder
|
||||||
|
explicitly and prominently states near the primary copyright notice in
|
||||||
|
the Work that the Work can only be maintained by the Copyright Holder
|
||||||
|
or simply that it is `author-maintained'.
|
||||||
|
|
||||||
|
The Work has the status `maintained' if there is a Current Maintainer
|
||||||
|
who has indicated in the Work that they are willing to receive error
|
||||||
|
reports for the Work (for example, by supplying a valid e-mail
|
||||||
|
address). It is not required for the Current Maintainer to acknowledge
|
||||||
|
or act upon these error reports.
|
||||||
|
|
||||||
|
The Work changes from status `maintained' to `unmaintained' if there
|
||||||
|
is no Current Maintainer, or the person stated to be Current
|
||||||
|
Maintainer of the work cannot be reached through the indicated means
|
||||||
|
of communication for a period of six months, and there are no other
|
||||||
|
significant signs of active maintenance.
|
||||||
|
|
||||||
|
You can become the Current Maintainer of the Work by agreement with
|
||||||
|
any existing Current Maintainer to take over this role.
|
||||||
|
|
||||||
|
If the Work is unmaintained, you can become the Current Maintainer of
|
||||||
|
the Work through the following steps:
|
||||||
|
|
||||||
|
1. Make a reasonable attempt to trace the Current Maintainer (and
|
||||||
|
the Copyright Holder, if the two differ) through the means of
|
||||||
|
an Internet or similar search.
|
||||||
|
|
||||||
|
2. If this search is successful, then enquire whether the Work
|
||||||
|
is still maintained.
|
||||||
|
|
||||||
|
a. If it is being maintained, then ask the Current Maintainer
|
||||||
|
to update their communication data within one month.
|
||||||
|
|
||||||
|
b. If the search is unsuccessful or no action to resume active
|
||||||
|
maintenance is taken by the Current Maintainer, then announce
|
||||||
|
within the pertinent community your intention to take over
|
||||||
|
maintenance. (If the Work is a LaTeX work, this could be
|
||||||
|
done, for example, by posting to comp.text.tex.)
|
||||||
|
|
||||||
|
3a. If the Current Maintainer is reachable and agrees to pass
|
||||||
|
maintenance of the Work to you, then this takes effect
|
||||||
|
immediately upon announcement.
|
||||||
|
|
||||||
|
b. If the Current Maintainer is not reachable and the Copyright
|
||||||
|
Holder agrees that maintenance of the Work be passed to you,
|
||||||
|
then this takes effect immediately upon announcement.
|
||||||
|
|
||||||
|
4. If you make an `intention announcement' as described in 2b. above
|
||||||
|
and after three months your intention is challenged neither by
|
||||||
|
the Current Maintainer nor by the Copyright Holder nor by other
|
||||||
|
people, then you may arrange for the Work to be changed so as
|
||||||
|
to name you as the (new) Current Maintainer.
|
||||||
|
|
||||||
|
5. If the previously unreachable Current Maintainer becomes
|
||||||
|
reachable once more within three months of a change completed
|
||||||
|
under the terms of 3b) or 4), then that Current Maintainer must
|
||||||
|
become or remain the Current Maintainer upon request provided
|
||||||
|
they then update their communication data within one month.
|
||||||
|
|
||||||
|
A change in the Current Maintainer does not, of itself, alter the fact
|
||||||
|
that the Work is distributed under the LPPL license.
|
||||||
|
|
||||||
|
If you become the Current Maintainer of the Work, you should
|
||||||
|
immediately provide, within the Work, a prominent and unambiguous
|
||||||
|
statement of your status as Current Maintainer. You should also
|
||||||
|
announce your new status to the same pertinent community as
|
||||||
|
in 2b) above.
|
||||||
|
|
||||||
|
|
||||||
|
WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
|
||||||
|
======================================================
|
||||||
|
|
||||||
|
This section contains important instructions, examples, and
|
||||||
|
recommendations for authors who are considering distributing their
|
||||||
|
works under this license. These authors are addressed as `you' in
|
||||||
|
this section.
|
||||||
|
|
||||||
|
Choosing This License or Another License
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
If for any part of your work you want or need to use *distribution*
|
||||||
|
conditions that differ significantly from those in this license, then
|
||||||
|
do not refer to this license anywhere in your work but, instead,
|
||||||
|
distribute your work under a different license. You may use the text
|
||||||
|
of this license as a model for your own license, but your license
|
||||||
|
should not refer to the LPPL or otherwise give the impression that
|
||||||
|
your work is distributed under the LPPL.
|
||||||
|
|
||||||
|
The document `modguide.tex' in the base LaTeX distribution explains
|
||||||
|
the motivation behind the conditions of this license. It explains,
|
||||||
|
for example, why distributing LaTeX under the GNU General Public
|
||||||
|
License (GPL) was considered inappropriate. Even if your work is
|
||||||
|
unrelated to LaTeX, the discussion in `modguide.tex' may still be
|
||||||
|
relevant, and authors intending to distribute their works under any
|
||||||
|
license are encouraged to read it.
|
||||||
|
|
||||||
|
A Recommendation on Modification Without Distribution
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
It is wise never to modify a component of the Work, even for your own
|
||||||
|
personal use, without also meeting the above conditions for
|
||||||
|
distributing the modified component. While you might intend that such
|
||||||
|
modifications will never be distributed, often this will happen by
|
||||||
|
accident -- you may forget that you have modified that component; or
|
||||||
|
it may not occur to you when allowing others to access the modified
|
||||||
|
version that you are thus distributing it and violating the conditions
|
||||||
|
of this license in ways that could have legal implications and, worse,
|
||||||
|
cause problems for the community. It is therefore usually in your
|
||||||
|
best interest to keep your copy of the Work identical with the public
|
||||||
|
one. Many works provide ways to control the behavior of that work
|
||||||
|
without altering any of its licensed components.
|
||||||
|
|
||||||
|
How to Use This License
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
To use this license, place in each of the components of your work both
|
||||||
|
an explicit copyright notice including your name and the year the work
|
||||||
|
was authored and/or last substantially modified. Include also a
|
||||||
|
statement that the distribution and/or modification of that
|
||||||
|
component is constrained by the conditions in this license.
|
||||||
|
|
||||||
|
Here is an example of such a notice and statement:
|
||||||
|
|
||||||
|
%% pig.dtx
|
||||||
|
%% Copyright 2005 M. Y. Name
|
||||||
|
%
|
||||||
|
% This work may be distributed and/or modified under the
|
||||||
|
% conditions of the LaTeX Project Public License, either version 1.3
|
||||||
|
% of this license or (at your option) any later version.
|
||||||
|
% The latest version of this license is in
|
||||||
|
% http://www.latex-project.org/lppl.txt
|
||||||
|
% and version 1.3 or later is part of all distributions of LaTeX
|
||||||
|
% version 2005/12/01 or later.
|
||||||
|
%
|
||||||
|
% This work has the LPPL maintenance status `maintained'.
|
||||||
|
%
|
||||||
|
% The Current Maintainer of this work is M. Y. Name.
|
||||||
|
%
|
||||||
|
% This work consists of the files pig.dtx and pig.ins
|
||||||
|
% and the derived file pig.sty.
|
||||||
|
|
||||||
|
Given such a notice and statement in a file, the conditions
|
||||||
|
given in this license document would apply, with the `Work' referring
|
||||||
|
to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
|
||||||
|
generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
|
||||||
|
referring to any `LaTeX-Format', and both `Copyright Holder' and
|
||||||
|
`Current Maintainer' referring to the person `M. Y. Name'.
|
||||||
|
|
||||||
|
If you do not want the Maintenance section of LPPL to apply to your
|
||||||
|
Work, change `maintained' above into `author-maintained'.
|
||||||
|
However, we recommend that you use `maintained', as the Maintenance
|
||||||
|
section was added in order to ensure that your Work remains useful to
|
||||||
|
the community even when you can no longer maintain and support it
|
||||||
|
yourself.
|
||||||
|
|
||||||
|
Derived Works That Are Not Replacements
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
Several clauses of the LPPL specify means to provide reliability and
|
||||||
|
stability for the user community. They therefore concern themselves
|
||||||
|
with the case that a Derived Work is intended to be used as a
|
||||||
|
(compatible or incompatible) replacement of the original Work. If
|
||||||
|
this is not the case (e.g., if a few lines of code are reused for a
|
||||||
|
completely different task), then clauses 6b and 6d shall not apply.
|
||||||
|
|
||||||
|
|
||||||
|
Important Recommendations
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Defining What Constitutes the Work
|
||||||
|
|
||||||
|
The LPPL requires that distributions of the Work contain all the
|
||||||
|
files of the Work. It is therefore important that you provide a
|
||||||
|
way for the licensee to determine which files constitute the Work.
|
||||||
|
This could, for example, be achieved by explicitly listing all the
|
||||||
|
files of the Work near the copyright notice of each file or by
|
||||||
|
using a line such as:
|
||||||
|
|
||||||
|
% This work consists of all files listed in manifest.txt.
|
||||||
|
|
||||||
|
in that place. In the absence of an unequivocal list it might be
|
||||||
|
impossible for the licensee to determine what is considered by you
|
||||||
|
to comprise the Work and, in such a case, the licensee would be
|
||||||
|
entitled to make reasonable conjectures as to which files comprise
|
||||||
|
the Work.
|
||||||
|
|
||||||
73
unicodeit/README.md
Normal file
73
unicodeit/README.md
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
# UnicodeIt
|
||||||
|
|
||||||
|
Tested on Linux, Mac and Windows: 
|
||||||
|
|
||||||
|
Converts LaTeX tags to unicode.
|
||||||
|
Available online at [unicodeit.net](https://www.unicodeit.net).
|
||||||
|
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```
|
||||||
|
\alpha α, \beta β, \infty ∞ e^+ e⁺, \mu^- μ⁻ \exists ∃, \nexists ∄
|
||||||
|
\int ∫, \sum ∑, \partial ∂ \to →, p\bar{p} pp̅ \mathcal{H} ℋ, \mathbb{R} ℝ
|
||||||
|
\slash{\partial} ∂̸ \underline{x} x̲ \phone ☎, \checkmark ✓
|
||||||
|
\dot{x} ẋ, \ddot{x} ẍ A^6 A⁶, m_0 m₀ \Im ℑ, \Re ℜ, \hbar ℏ
|
||||||
|
\gamma γ, \Gamma Γ \~{O} Õ \perp ⊥, \parallel ∥
|
||||||
|
\sfrac{3}{5} ⅗ \therefore ∴, \because ∵ \subset ⊂, \supset ⊃
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Python
|
||||||
|
|
||||||
|
Install with `pip install unicodeit` and run
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python -m unicodeit.cli \\alpha
|
||||||
|
```
|
||||||
|
|
||||||
|
or in Python
|
||||||
|
|
||||||
|
```py
|
||||||
|
import unicodeit
|
||||||
|
print(unicodeit.replace('\\alpha'))
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## JavaScript / TypeScript
|
||||||
|
|
||||||
|
Install with `npm install unicodeit --save-dev` and use it like this:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var unicodeit = require('unicodeit');
|
||||||
|
console.log(unicodeit.replace('\\alpha'));
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Mac Automator
|
||||||
|
|
||||||
|
Create your own Automator Workflow:
|
||||||
|
|
||||||
|
* Create a new "Quick Action" (might also be labeled as "Service").
|
||||||
|
* At the top, leave the defaults: "Service receives *selected text* in *any application*"
|
||||||
|
* Select the checkmark "output replaces selected text".
|
||||||
|
* Add the action "Run Shell Script".
|
||||||
|
* From dropdown, select to "pass in: as arguments".
|
||||||
|
* The command is: `/usr/local/bin/python3 -m unicodeit.cli $1`. This Python interpreter must have unicodeit installed; e.g. with `/usr/local/bin/python3 -m pip install unicodeit`.
|
||||||
|
* It should look something like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
To set a keyboard shortcut, go to `System Preferences` →
|
||||||
|
`Keyboard` → `Shortcuts` → `Services` → `Text` → `UnicodeItAction`.
|
||||||
|
Choose a keyboard shortcut like `Command+Option+Shift U`.
|
||||||
|
|
||||||
|
Now you are all set to use your new keyboard shortcut in many apps, like here in Keynote:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## [dev] New Release Flow
|
||||||
|
|
||||||
|
* update version in `uncodeit/__init__.py` and `package.json`
|
||||||
|
* create a new release on Github
|
||||||
BIN
unicodeit/docs/automator.png
Normal file
BIN
unicodeit/docs/automator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 306 KiB |
50
unicodeit/docs/dev.md
Normal file
50
unicodeit/docs/dev.md
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
Update version number in
|
||||||
|
* `unicode/__init__.py`
|
||||||
|
* `package.json`
|
||||||
|
* in two places in `web/index.html`
|
||||||
|
|
||||||
|
Do a github release.
|
||||||
|
|
||||||
|
|
||||||
|
==================
|
||||||
|
OLD:
|
||||||
|
|
||||||
|
# Python Release
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# python checks
|
||||||
|
pytest
|
||||||
|
pylint unicodeit
|
||||||
|
|
||||||
|
# create package and upload
|
||||||
|
python setup.py sdist
|
||||||
|
twine upload dist/unicodeit...
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# NPM Release
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# update typescript data
|
||||||
|
python -m unicodeit.export_data
|
||||||
|
|
||||||
|
# typescript checks
|
||||||
|
npm run lint
|
||||||
|
npm run test
|
||||||
|
|
||||||
|
# rebuild typescript bundles
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# publish
|
||||||
|
npm publish
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# Website update
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# follow steps of NPM release first
|
||||||
|
|
||||||
|
# push web folder to gh-pages branch
|
||||||
|
ghp-import --no-jekyll --push web
|
||||||
|
```
|
||||||
BIN
unicodeit/docs/unicodeit_demo.gif
Normal file
BIN
unicodeit/docs/unicodeit_demo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,007 KiB |
3370
unicodeit/package-lock.json
generated
Normal file
3370
unicodeit/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
48
unicodeit/package.json
Normal file
48
unicodeit/package.json
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"name": "unicodeit",
|
||||||
|
"version": "0.7.5",
|
||||||
|
"description": "Converts LaTeX tags to unicode.",
|
||||||
|
"main": "ts_dist/js/index.js",
|
||||||
|
"types": "ts_dist/js/index.d.ts",
|
||||||
|
"directories": {
|
||||||
|
"test": "tests"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"ts_dist/**/*"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc && webpack",
|
||||||
|
"watch-tsc": "tsc --watch",
|
||||||
|
"watch-web": "webpack --watch",
|
||||||
|
"lint": "eslint ts_src --ext .js,.jsx,.ts,.tsx",
|
||||||
|
"test": "tsc && mocha ./ts_dist/js/tests.js"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/svenkreiss/unicodeit.git"
|
||||||
|
},
|
||||||
|
"author": "Sven Kreiss",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/svenkreiss/unicodeit/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/svenkreiss/unicodeit#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/chai": "^4.3.4",
|
||||||
|
"@types/jquery": "^3.5.16",
|
||||||
|
"@types/mocha": "^10.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
||||||
|
"@typescript-eslint/parser": "^5.54.1",
|
||||||
|
"chai": "^4.3.7",
|
||||||
|
"eslint": "^8.36.0",
|
||||||
|
"mocha": "^10.2.0",
|
||||||
|
"ts-loader": "^9.4.2",
|
||||||
|
"typescript": "^4.9.5",
|
||||||
|
"webpack": "^5.76.1",
|
||||||
|
"webpack-cli": "^5.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/typeahead": "^0.11.32",
|
||||||
|
"typeahead": "^0.2.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
3
unicodeit/setup.cfg
Normal file
3
unicodeit/setup.cfg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[pycodestyle]
|
||||||
|
max-line-length=119
|
||||||
|
ignore=E741,W503
|
||||||
33
unicodeit/setup.py
Normal file
33
unicodeit/setup.py
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
# extract version from __init__.py
|
||||||
|
with open('unicodeit/__init__.py', 'r') as f:
|
||||||
|
VERSION_LINE = [l for l in f if l.startswith('__version__')][0]
|
||||||
|
VERSION = VERSION_LINE.split('=')[1].strip()[1:-1]
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='unicodeit',
|
||||||
|
version=VERSION,
|
||||||
|
packages=[
|
||||||
|
'unicodeit',
|
||||||
|
],
|
||||||
|
license='MIT',
|
||||||
|
description='Converts LaTeX tags to unicode',
|
||||||
|
long_description=open('README.md', encoding='utf-8').read(),
|
||||||
|
long_description_content_type='text/markdown',
|
||||||
|
author='Sven Kreiss',
|
||||||
|
author_email='research@svenkreiss.com',
|
||||||
|
url='https://github.com/svenkreiss/unicodeit',
|
||||||
|
|
||||||
|
install_requires=[
|
||||||
|
],
|
||||||
|
extras_require={
|
||||||
|
'dev': [
|
||||||
|
'pytest',
|
||||||
|
'pylint',
|
||||||
|
'pycodestyle',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
)
|
||||||
62
unicodeit/tests/test_cli.py
Normal file
62
unicodeit/tests/test_cli.py
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
PYTHON = 'python3' if sys.platform != 'win32' else 'python'
|
||||||
|
|
||||||
|
|
||||||
|
def test_cli_symbols1():
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
'\\Sigma'
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == 'Σ'
|
||||||
|
|
||||||
|
|
||||||
|
def test_cli_symbols2():
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
'def\\Sigma_{01234}abc\\alpha_{567}ggg\\beta_{1234}lll "\\Sigma e_0 e^3"'
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == 'defΣ₀₁₂₃₄abcα₅₆₇gggβ₁₂₃₄lll "Σ e₀ e³"'
|
||||||
|
|
||||||
|
|
||||||
|
def test_cli_symbols3():
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
'def^{01234}abc\\alpha^{567abc} "\\:) \\:G"'
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == 'def⁰¹²³⁴abcα⁵⁶⁷ᵃᵇᶜ "☺ ㋡"'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip('this was already broken')
|
||||||
|
def test_cli_symbols4():
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
'ggg\\beta^{1234=\\(5\\)}lll'
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == 'Σ'
|
||||||
|
|
||||||
|
|
||||||
|
def test_subscripts():
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
'a_{\\beta\\gamma\\varphi\\rho\\chi}'
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == 'aᵦᵧᵩᵨᵪ'
|
||||||
|
|
||||||
|
|
||||||
|
def test_superscripts():
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
'm^{ABDEGHIJKLMNOPRTUWabcdefghiklmnoprstuvwxyz\\beta\\gamma\\delta\\varphi\\chi<>}'
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == 'mᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᶜᵈᵉᶠᵍʰⁱᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛʷˣʸᶻᵝᵞᵟᵠᵡ˂˃'
|
||||||
38
unicodeit/tests/test_data.py
Normal file
38
unicodeit/tests/test_data.py
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
import unicodeit
|
||||||
|
|
||||||
|
|
||||||
|
def test_order_replacements():
|
||||||
|
expr_length = float('inf')
|
||||||
|
for l, _ in unicodeit.data.REPLACEMENTS:
|
||||||
|
assert len(l) <= expr_length
|
||||||
|
expr_length = len(l)
|
||||||
|
|
||||||
|
|
||||||
|
def test_order_subsuperscripts():
|
||||||
|
expr_length = float('inf')
|
||||||
|
for l, _ in unicodeit.data.SUBSUPERSCRIPTS:
|
||||||
|
assert len(l) <= expr_length
|
||||||
|
expr_length = len(l)
|
||||||
|
|
||||||
|
|
||||||
|
def test_order_combiningmarks():
|
||||||
|
expr_length = float('inf')
|
||||||
|
for l, _ in unicodeit.data.COMBININGMARKS:
|
||||||
|
assert len(l) <= expr_length
|
||||||
|
expr_length = len(l)
|
||||||
|
|
||||||
|
|
||||||
|
def test_combining_not_in_replacement():
|
||||||
|
replacement_latex = {l.replace('{}', ''): u for l, u in unicodeit.data.REPLACEMENTS}
|
||||||
|
for l, u in unicodeit.data.COMBININGMARKS:
|
||||||
|
l = l.replace('{}', '')
|
||||||
|
if l not in replacement_latex:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# if the same command is in "replacements",
|
||||||
|
# it must not be the combining mark
|
||||||
|
assert replacement_latex[l] != u
|
||||||
|
|
||||||
|
|
||||||
|
def test_incomplete_combiningmark():
|
||||||
|
assert unicodeit.replace('\\breve{') == '\\breve{'
|
||||||
17
unicodeit/tests/test_subsuper.py
Normal file
17
unicodeit/tests/test_subsuper.py
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
import unicodeit
|
||||||
|
|
||||||
|
|
||||||
|
def test_superscript_12():
|
||||||
|
assert unicodeit.replace('a^{12}') == 'a¹²'
|
||||||
|
|
||||||
|
|
||||||
|
def test_superscript_minus1():
|
||||||
|
assert unicodeit.replace('cm^{-1}') == 'cm⁻¹'
|
||||||
|
|
||||||
|
|
||||||
|
def test_subscript_12():
|
||||||
|
assert unicodeit.replace('a_{12}') == 'a₁₂'
|
||||||
|
|
||||||
|
|
||||||
|
def test_subscript_minus1():
|
||||||
|
assert unicodeit.replace('cm_{-1}') == 'cm₋₁'
|
||||||
872
unicodeit/tests/test_v06symbols.py
Normal file
872
unicodeit/tests/test_v06symbols.py
Normal file
|
|
@ -0,0 +1,872 @@
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
PYTHON = 'python3' if sys.platform != 'win32' else 'python'
|
||||||
|
|
||||||
|
|
||||||
|
SYMBOLS_V06 = [
|
||||||
|
(r'\textfractionsolidus', '\u2044'),
|
||||||
|
(r'\leftrightsquigarrow', '\u21AD'),
|
||||||
|
(r'\textpertenthousand', '\u2031'),
|
||||||
|
(r'\blacktriangleright', '\u25B8'),
|
||||||
|
(r'\blacktriangledown', '\u25BE'),
|
||||||
|
(r'\blacktriangleleft', '\u25C2'),
|
||||||
|
(r'\twoheadrightarrow', '\u21A0'),
|
||||||
|
(r'\leftrightharpoons', '\u21CB'),
|
||||||
|
(r'\rightleftharpoons', '\u21CC'),
|
||||||
|
(r'\textreferencemark', '\u203B'),
|
||||||
|
(r'\circlearrowright', '\u21BB'),
|
||||||
|
(r'\rightrightarrows', '\u21C9'),
|
||||||
|
(r'\vartriangleright', '\u22B3'),
|
||||||
|
(r'\textordmasculine', '\u00BA'),
|
||||||
|
(r'\textvisiblespace', '\u2423'),
|
||||||
|
(r'\twoheadleftarrow', '\u219E'),
|
||||||
|
(r'\downharpoonright', '\u21C2'),
|
||||||
|
(r'\ntrianglerighteq', '\u22ED'),
|
||||||
|
(r'\rightharpoondown', '\u21C1'),
|
||||||
|
(r'\textperthousand', '\u2030'),
|
||||||
|
(r'\leftrightarrows', '\u21C6'),
|
||||||
|
(r'\textmusicalnote', '\u266A'),
|
||||||
|
(r'\nleftrightarrow', '\u21AE'),
|
||||||
|
(r'\rightleftarrows', '\u21C4'),
|
||||||
|
(r'\bigtriangledown', '\u25BD'),
|
||||||
|
(r'\textordfeminine', '\u00AA'),
|
||||||
|
(r'\ntrianglelefteq', '\u22EC'),
|
||||||
|
(r'\rightthreetimes', '\u22CC'),
|
||||||
|
(r'\trianglerighteq', '\u22B5'),
|
||||||
|
(r'\vartriangleleft', '\u22B2'),
|
||||||
|
(r'\rightsquigarrow', '\u21DD'),
|
||||||
|
(r'\downharpoonleft', '\u21C3'),
|
||||||
|
(r'\curvearrowright', '\u21B7'),
|
||||||
|
(r'\circlearrowleft', '\u21BA'),
|
||||||
|
(r'\leftharpoondown', '\u21BD'),
|
||||||
|
(r'\nLeftrightarrow', '\u21CE'),
|
||||||
|
(r'\curvearrowleft', '\u21B6'),
|
||||||
|
(r'\guilsinglright', '\u203A'),
|
||||||
|
(r'\leftthreetimes', '\u22CB'),
|
||||||
|
(r'\leftrightarrow', '\u2194'),
|
||||||
|
(r'\rightharpoonup', '\u21C0'),
|
||||||
|
(r'\guillemotright', '\u00BB'),
|
||||||
|
(r'\downdownarrows', '\u21CA'),
|
||||||
|
(r'\hookrightarrow', '\u21AA'),
|
||||||
|
(r'\hspace{0.25em}', '\u2005'),
|
||||||
|
(r'\dashrightarrow', '\u21E2'),
|
||||||
|
(r'\leftleftarrows', '\u21C7'),
|
||||||
|
(r'\trianglelefteq', '\u22B4'),
|
||||||
|
(r'\ntriangleright', '\u22EB'),
|
||||||
|
(r'\doublebarwedge', '\u2306'),
|
||||||
|
(r'\upharpoonright', '\u21BE'),
|
||||||
|
(r'\rightarrowtail', '\u21A3'),
|
||||||
|
(r'\looparrowright', '\u21AC'),
|
||||||
|
(r'\Leftrightarrow', '\u21D4'),
|
||||||
|
(r'\sphericalangle', '\u2222'),
|
||||||
|
(r'\divideontimes', '\u22C7'),
|
||||||
|
(r'\measuredangle', '\u2221'),
|
||||||
|
(r'\blacktriangle', '\u25B4'),
|
||||||
|
(r'\ntriangleleft', '\u22EA'),
|
||||||
|
# (r'\mathchar"1356', '\u2041'),
|
||||||
|
(r'\texttrademark', '\u2122'),
|
||||||
|
# (r'\\mathchar"2208', '\u2316'),
|
||||||
|
(r'\triangleright', '\u25B9'),
|
||||||
|
(r'\leftarrowtail', '\u21A2'),
|
||||||
|
(r'\guilsinglleft', '\u2039'),
|
||||||
|
(r'\upharpoonleft', '\u21BF'),
|
||||||
|
(r'\mathbb{gamma}', '\u213D'),
|
||||||
|
(r'\fallingdotseq', '\u2252'),
|
||||||
|
(r'\looparrowleft', '\u21AB'),
|
||||||
|
(r'\textbrokenbar', '\u00A6'),
|
||||||
|
(r'\hookleftarrow', '\u21A9'),
|
||||||
|
(r'\smallsetminus', '\uFE68'),
|
||||||
|
(r'\dashleftarrow', '\u21E0'),
|
||||||
|
(r'\guillemotleft', '\u00AB'),
|
||||||
|
(r'\leftharpoonup', '\u21BC'),
|
||||||
|
(r'\mathbb{Gamma}', '\u213E'),
|
||||||
|
(r'\bigtriangleup', '\u25B3'),
|
||||||
|
(r'\textcircledP', '\u2117'),
|
||||||
|
(r'\risingdotseq', '\u2253'),
|
||||||
|
(r'\triangleleft', '\u25C3'),
|
||||||
|
(r'\mathsterling', '\u00A3'),
|
||||||
|
(r'\textcurrency', '\u00A4'),
|
||||||
|
(r'\triangledown', '\u25BF'),
|
||||||
|
(r'\blacklozenge', '\uE80B'),
|
||||||
|
(r'\sfrac{5}{6}', '\u215A'),
|
||||||
|
(r'\preccurlyeq', '\u227C'),
|
||||||
|
(r'\Rrightarrow', '\u21DB'),
|
||||||
|
(r'\circledcirc', '\u229A'),
|
||||||
|
(r'\nRightarrow', '\u21CF'),
|
||||||
|
(r'\sfrac{3}{8}', '\u215C'),
|
||||||
|
(r'\sfrac{1}{3}', '\u2153'),
|
||||||
|
(r'\sfrac{2}{5}', '\u2156'),
|
||||||
|
(r'\vartriangle', '\u25B5'),
|
||||||
|
(r'\Updownarrow', '\u21D5'),
|
||||||
|
(r'\nrightarrow', '\u219B'),
|
||||||
|
(r'\sfrac{1}{2}', '\u00BD'),
|
||||||
|
(r'\sfrac{3}{5}', '\u2157'),
|
||||||
|
(r'\succcurlyeq', '\u227D'),
|
||||||
|
(r'\sfrac{4}{5}', '\u2158'),
|
||||||
|
(r'\diamondsuit', '\u2666'),
|
||||||
|
(r'\hphantom{0}', '\u2007'),
|
||||||
|
(r'\sfrac{1}{6}', '\u2159'),
|
||||||
|
(r'\curlyeqsucc', '\u22DF'),
|
||||||
|
(r'\blacksquare', '\u25AA'),
|
||||||
|
(r'\hphantom{,}', '\u2008'),
|
||||||
|
(r'\curlyeqprec', '\u22DE'),
|
||||||
|
(r'\sfrac{1}{8}', '\u215B'),
|
||||||
|
(r'\sfrac{7}{8}', '\u215E'),
|
||||||
|
(r'\sfrac{1}{5}', '\u2155'),
|
||||||
|
(r'\sfrac{2}{3}', '\u2154'),
|
||||||
|
(r'\updownarrow', '\u2195'),
|
||||||
|
(r'\backepsilon', '\u220D'),
|
||||||
|
(r'\circleddash', '\u229D'),
|
||||||
|
(r'\eqslantless', '\u22DC'),
|
||||||
|
(r'\sfrac{3}{4}', '\u00BE'),
|
||||||
|
(r'\sfrac{5}{8}', '\u215D'),
|
||||||
|
(r'\hspace{1pt}', '\u200A'),
|
||||||
|
(r'\sfrac{1}{4}', '\u00BC'),
|
||||||
|
(r'\mathbb{Pi}', '\u213F'),
|
||||||
|
(r'\mathcal{M}', '\u2133'),
|
||||||
|
(r'\mathcal{o}', '\U00002134'),
|
||||||
|
(r'\mathcal{O}', '\U0001d4aA'),
|
||||||
|
(r'\nsupseteqq', '\u2289'),
|
||||||
|
(r'\mathcal{B}', '\u212C'),
|
||||||
|
(r'\textrecipe', '\u211E'),
|
||||||
|
(r'\nsubseteqq', '\u2288'),
|
||||||
|
(r'\subsetneqq', '\u228A'),
|
||||||
|
(r'\mathcal{I}', '\u2111'),
|
||||||
|
(r'\upuparrows', '\u21C8'),
|
||||||
|
(r'\mathcal{e}', '\u212F'),
|
||||||
|
(r'\mathcal{L}', '\u2112'),
|
||||||
|
(r'\nleftarrow', '\u219A'),
|
||||||
|
(r'\mathcal{H}', '\u210B'),
|
||||||
|
(r'\mathcal{E}', '\u2130'),
|
||||||
|
(r'\eqslantgtr', '\u22DD'),
|
||||||
|
(r'\curlywedge', '\u22CF'),
|
||||||
|
(r'\varepsilon', '\u03B5'),
|
||||||
|
(r'\supsetneqq', '\u228B'),
|
||||||
|
(r'\rightarrow', '\u2192'),
|
||||||
|
(r'\mathcal{R}', '\u211B'),
|
||||||
|
(r'\sqsubseteq', '\u2291'),
|
||||||
|
(r'\mathcal{g}', '\u210A'),
|
||||||
|
(r'\sqsupseteq', '\u2292'),
|
||||||
|
(r'\complement', '\u2201'),
|
||||||
|
(r'\Rightarrow', '\u21D2'),
|
||||||
|
(r'\gtreqqless', '\u22DB'),
|
||||||
|
(r'\lesseqqgtr', '\u22DA'),
|
||||||
|
(r'\circledast', '\u229B'),
|
||||||
|
(r'\nLeftarrow', '\u21CD'),
|
||||||
|
(r'\Lleftarrow', '\u21DA'),
|
||||||
|
(r'\Leftarrow', '\u21D0'),
|
||||||
|
(r'\gvertneqq', '\u2269'),
|
||||||
|
(r'\mathbb{C}', '\u2102'),
|
||||||
|
(r'\supsetneq', '\u228B'),
|
||||||
|
(r'\leftarrow', '\u2190'),
|
||||||
|
(r'\nleqslant', '\u2270'),
|
||||||
|
(r'\mathbb{Q}', '\u211A'),
|
||||||
|
(r'\mathbb{Z}', '\u2124'),
|
||||||
|
(r'\llbracket', '\u301A'),
|
||||||
|
(r'\mathbb{H}', '\u210D'),
|
||||||
|
(r'\spadesuit', '\u2660'),
|
||||||
|
(r'\mathit{o}', '\U0001d45c'),
|
||||||
|
(r'\mathbb{P}', '\u2119'),
|
||||||
|
(r'\rrbracket', '\u301B'),
|
||||||
|
(r'\supseteqq', '\u2287'),
|
||||||
|
(r'\copyright', '\u00A9'),
|
||||||
|
(r'\textsc{k}', '\u0138'),
|
||||||
|
(r'\gtreqless', '\u22DB'),
|
||||||
|
(r'\mathbb{j}', '\u2149'),
|
||||||
|
(r'\pitchfork', '\u22D4'),
|
||||||
|
(r'\estimated', '\u212E'),
|
||||||
|
(r'\ngeqslant', '\u2271'),
|
||||||
|
(r'\mathbb{e}', '\u2147'),
|
||||||
|
(r'\therefore', '\u2234'),
|
||||||
|
(r'\triangleq', '\u225C'),
|
||||||
|
(r'\varpropto', '\u221D'),
|
||||||
|
(r'\subsetneq', '\u228A'),
|
||||||
|
(r'\heartsuit', '\u2665'),
|
||||||
|
(r'\mathbb{d}', '\u2146'),
|
||||||
|
(r'\lvertneqq', '\u2268'),
|
||||||
|
(r'\checkmark', '\u2713'),
|
||||||
|
(r'\nparallel', '\u2226'),
|
||||||
|
(r'\mathbb{R}', '\u211D'),
|
||||||
|
(r'\lesseqgtr', '\u22DA'),
|
||||||
|
(r'\downarrow', '\u2193'),
|
||||||
|
(r'\mathbb{D}', '\u2145'),
|
||||||
|
(r'\mathbb{i}', '\u2148'),
|
||||||
|
(r'\backsimeq', '\u22CD'),
|
||||||
|
(r'\mathbb{N}', '\u2115'),
|
||||||
|
(r'\Downarrow', '\u21D3'),
|
||||||
|
(r'\subseteqq', '\u2286'),
|
||||||
|
(r'\setminus', '\u2216'),
|
||||||
|
(r'\succnsim', '\u22E9'),
|
||||||
|
(r'\doteqdot', '\u2251'),
|
||||||
|
(r'\clubsuit', '\u2663'),
|
||||||
|
(r'\emptyset', '\u2205'),
|
||||||
|
(r'\varnothing', '\u2205'),
|
||||||
|
(r'\sqsupset', '\u2290'),
|
||||||
|
(r'\fbox{~~}', '\u25AD'),
|
||||||
|
(r'\curlyvee', '\u22CE'),
|
||||||
|
(r'\varkappa', '\u03F0'),
|
||||||
|
(r'\llcorner', '\u231E'),
|
||||||
|
(r'\varsigma', '\u03C2'),
|
||||||
|
(r'\approxeq', '\u224A'),
|
||||||
|
(r'\backcong', '\u224C'),
|
||||||
|
(r'\supseteq', '\u2287'),
|
||||||
|
(r'\circledS', '\u24C8'),
|
||||||
|
(r'\circledR', '\u00AE'),
|
||||||
|
(r'\textcent', '\u00A2'),
|
||||||
|
(r'\urcorner', '\u231D'),
|
||||||
|
(r'\lrcorner', '\u231F'),
|
||||||
|
(r'\boxminus', '\u229F'),
|
||||||
|
(r'\texteuro', '\u20AC'),
|
||||||
|
(r'\vartheta', '\u03D1'),
|
||||||
|
(r'\barwedge', '\u22BC'),
|
||||||
|
(r'\ding{86}', '\u2736'),
|
||||||
|
(r'\sqsubset', '\u228F'),
|
||||||
|
(r'\subseteq', '\u2286'),
|
||||||
|
(r'\intercal', '\u22BA'),
|
||||||
|
(r'\ding{73}', '\u2606'),
|
||||||
|
(r'\ulcorner', '\u231C'),
|
||||||
|
(r'\recorder', '\u2315'),
|
||||||
|
(r'\precnsim', '\u22E8'),
|
||||||
|
(r'\parallel', '\u2225'),
|
||||||
|
(r'\boxtimes', '\u22A0'),
|
||||||
|
(r'\ding{55}', '\u2717'),
|
||||||
|
(r'\multimap', '\u22B8'),
|
||||||
|
(r'\maltese', '\u2720'),
|
||||||
|
(r'\nearrow', '\u2197'),
|
||||||
|
(r'\swarrow', '\u2199'),
|
||||||
|
(r'\lozenge', '\u25CA'),
|
||||||
|
(r'\sqrt[3]', '\u221B'),
|
||||||
|
(r'\succsim', '\u227F'),
|
||||||
|
# (r'\tilde{}', '\u007E'),
|
||||||
|
(r'\lessgtr', '\u2276'),
|
||||||
|
(r'\Upsilon', '\u03D2'),
|
||||||
|
(r'\Cdprime', '\u042A'),
|
||||||
|
(r'\gtrless', '\u2277'),
|
||||||
|
(r'\backsim', '\u223D'),
|
||||||
|
(r'\nexists', '\u2204'),
|
||||||
|
(r'\dotplus', '\u2214'),
|
||||||
|
(r'\searrow', '\u2198'),
|
||||||
|
(r'\lessdot', '\u22D6'),
|
||||||
|
(r'\boxplus', '\u229E'),
|
||||||
|
(r'\upsilon', '\u03C5'),
|
||||||
|
(r'\epsilon', '\u03B5'),
|
||||||
|
(r'\diamond', '\u22C4'),
|
||||||
|
(r'\bigstar', '\u2605'),
|
||||||
|
(r'\ddagger', '\u2021'),
|
||||||
|
(r'\cdprime', '\u044A'),
|
||||||
|
(r'\Uparrow', '\u21D1'),
|
||||||
|
(r'\sqrt[4]', '\u221C'),
|
||||||
|
(r'\between', '\u226C'),
|
||||||
|
(r'\sqangle', '\u221F'),
|
||||||
|
(r'\digamma', '\u03DC'),
|
||||||
|
(r'\uparrow', '\u2191'),
|
||||||
|
(r'\nwarrow', '\u2196'),
|
||||||
|
(r'\precsim', '\u227E'),
|
||||||
|
(r'\breve{}', '\u02D8'),
|
||||||
|
(r'\because', '\u2235'),
|
||||||
|
(r'\bigcirc', '\u25EF'),
|
||||||
|
(r'\acute{}', '\u00B4'),
|
||||||
|
(r'\grave{}', '\u0060'),
|
||||||
|
(r'\check{}', '\u02C7'),
|
||||||
|
(r'\lesssim', '\u2272'),
|
||||||
|
(r'\partial', '\u2202'),
|
||||||
|
(r'\natural', '\u266E'),
|
||||||
|
(r'\supset', '\u2283'),
|
||||||
|
(r'\hstrok', '\u0127'),
|
||||||
|
(r'\Tstrok', '\u0166'),
|
||||||
|
(r'\coprod', '\u2210'),
|
||||||
|
(r'\models', '\u22A7'),
|
||||||
|
(r'\otimes', '\u2297'),
|
||||||
|
(r'\degree', '\u00B0'),
|
||||||
|
(r'\gtrdot', '\u22D7'),
|
||||||
|
(r'\preceq', '\u227C'),
|
||||||
|
(r'\Lambda', '\u039B'),
|
||||||
|
(r'\lambda', '\u03BB'),
|
||||||
|
(r'\cprime', '\u044C'),
|
||||||
|
(r'\varrho', '\u03F1'),
|
||||||
|
(r'\Bumpeq', '\u224E'),
|
||||||
|
(r'\hybull', '\u2043'),
|
||||||
|
(r'\lmidot', '\u0140'),
|
||||||
|
(r'\nvdash', '\u22AC'),
|
||||||
|
(r'\lbrace', '\u007B'),
|
||||||
|
(r'\bullet', '\u2022'),
|
||||||
|
(r'\varphi', '\u03C6'),
|
||||||
|
(r'\bumpeq', '\u224F'),
|
||||||
|
(r'\ddot{}', '\u00A8'),
|
||||||
|
(r'\Lmidot', '\u013F'),
|
||||||
|
(r'\Cprime', '\u042C'),
|
||||||
|
(r'\female', '\u2640'),
|
||||||
|
(r'\rtimes', '\u22CA'),
|
||||||
|
(r'\gtrsim', '\u2273'),
|
||||||
|
(r'\mapsto', '\u21A6'),
|
||||||
|
(r'\daleth', '\u2138'),
|
||||||
|
(r'\square', '\u25A0'),
|
||||||
|
(r'\nVDash', '\u22AF'),
|
||||||
|
(r'\rangle', '\u3009'),
|
||||||
|
(r'\tstrok', '\u0167'),
|
||||||
|
(r'\oslash', '\u2298'),
|
||||||
|
(r'\ltimes', '\u22C9'),
|
||||||
|
(r'\lfloor', '\u230A'),
|
||||||
|
(r'\marker', '\u25AE'),
|
||||||
|
(r'\Subset', '\u22D0'),
|
||||||
|
(r'\Vvdash', '\u22AA'),
|
||||||
|
(r'\propto', '\u221D'),
|
||||||
|
(r'\Hstrok', '\u0126'),
|
||||||
|
(r'\dlcrop', '\u230D'),
|
||||||
|
(r'\forall', '\u2200'),
|
||||||
|
(r'\nVdash', '\u22AE'),
|
||||||
|
(r'\Supset', '\u22D1'),
|
||||||
|
(r'\langle', '\u3008'),
|
||||||
|
(r'\ominus', '\u2296'),
|
||||||
|
(r'\rfloor', '\u230B'),
|
||||||
|
(r'\circeq', '\u2257'),
|
||||||
|
(r'\eqcirc', '\u2256'),
|
||||||
|
(r'\drcrop', '\u230C'),
|
||||||
|
(r'\veebar', '\u22BB'),
|
||||||
|
(r'\ulcrop', '\u230F'),
|
||||||
|
(r'\nvDash', '\u22AD'),
|
||||||
|
(r'\urcrop', '\u230E'),
|
||||||
|
(r'\exists', '\u2203'),
|
||||||
|
(r'\approx', '\u2248'),
|
||||||
|
(r'\dagger', '\u2020'),
|
||||||
|
(r'\boxdot', '\u22A1'),
|
||||||
|
(r'\succeq', '\u227D'),
|
||||||
|
(r'\bowtie', '\u22C8'),
|
||||||
|
(r'\subset', '\u2282'),
|
||||||
|
(r'\Sigma', '\u03A3'),
|
||||||
|
(r'\Omega', '\u03A9'),
|
||||||
|
(r'\nabla', '\u2207'),
|
||||||
|
(r'\colon', '\u003A'),
|
||||||
|
(r'\boxHu', '\u2567'),
|
||||||
|
(r'\boxHd', '\u2564'),
|
||||||
|
(r'\aleph', '\u2135'),
|
||||||
|
(r'\gnsim', '\u22E7'),
|
||||||
|
(r'\boxHU', '\u2569'),
|
||||||
|
(r'\boxHD', '\u2566'),
|
||||||
|
(r'\equiv', '\u2261'),
|
||||||
|
(r'\lneqq', '\u2268'),
|
||||||
|
(r'\alpha', '\u03B1'),
|
||||||
|
(r'\amalg', '\u2210'),
|
||||||
|
(r'\boxhU', '\u2568'),
|
||||||
|
(r'\boxhD', '\u2565'),
|
||||||
|
(r'\uplus', '\u228E'),
|
||||||
|
(r'\boxhu', '\u2534'),
|
||||||
|
(r'\kappa', '\u03BA'),
|
||||||
|
(r'\sigma', '\u03C3'),
|
||||||
|
(r'\boxDL', '\u2557'),
|
||||||
|
(r'\Theta', '\u0398'),
|
||||||
|
(r'\Vdash', '\u22A9'),
|
||||||
|
(r'\boxDR', '\u2554'),
|
||||||
|
(r'\boxDl', '\u2556'),
|
||||||
|
(r'\sqcap', '\u2293'),
|
||||||
|
(r'\boxDr', '\u2553'),
|
||||||
|
(r'\bar{}', '\u00AF'),
|
||||||
|
(r'\dashv', '\u22A3'),
|
||||||
|
(r'\vDash', '\u22A8'),
|
||||||
|
(r'\boxdl', '\u2510'),
|
||||||
|
(r'\boxVl', '\u2562'),
|
||||||
|
(r'\boxVh', '\u256B'),
|
||||||
|
(r'\boxVr', '\u255F'),
|
||||||
|
(r'\boxdr', '\u250C'),
|
||||||
|
(r'\boxdL', '\u2555'),
|
||||||
|
(r'\boxVL', '\u2563'),
|
||||||
|
(r'\boxVH', '\u256C'),
|
||||||
|
(r'\boxVR', '\u2560'),
|
||||||
|
(r'\boxdR', '\u2552'),
|
||||||
|
(r'\theta', '\u03B8'),
|
||||||
|
(r'\lhblk', '\u2584'),
|
||||||
|
(r'\uhblk', '\u2580'),
|
||||||
|
(r'\ldotp', '\u002E'),
|
||||||
|
(r'\ldots', '\u2026'),
|
||||||
|
(r'\boxvL', '\u2561'),
|
||||||
|
(r'\boxvH', '\u256A'),
|
||||||
|
(r'\boxvR', '\u255E'),
|
||||||
|
(r'\boxvl', '\u2524'),
|
||||||
|
(r'\boxvh', '\u253C'),
|
||||||
|
(r'\boxvr', '\u251C'),
|
||||||
|
(r'\Delta', '\u0394'),
|
||||||
|
(r'\boxUR', '\u255A'),
|
||||||
|
(r'\boxUL', '\u255D'),
|
||||||
|
(r'\oplus', '\u2295'),
|
||||||
|
(r'\boxUr', '\u2559'),
|
||||||
|
(r'\boxUl', '\u255C'),
|
||||||
|
(r'\doteq', '\u2250'),
|
||||||
|
(r'\happy', '\u32E1'),
|
||||||
|
(r'\varpi', '\u03D6'),
|
||||||
|
(r'\boxr', '\u2514'),
|
||||||
|
(r'\smile', '\u263A'),
|
||||||
|
(r'\boxul', '\u2518'),
|
||||||
|
(r'\simeq', '\u2243'),
|
||||||
|
(r'\boxuR', '\u2558'),
|
||||||
|
(r'\boxuL', '\u255B'),
|
||||||
|
(r'\boxhd', '\u252C'),
|
||||||
|
(r'\gimel', '\u2137'),
|
||||||
|
(r'\Gamma', '\u0393'),
|
||||||
|
(r'\lnsim', '\u22E6'),
|
||||||
|
(r'\sqcup', '\u2294'),
|
||||||
|
(r'\omega', '\u03C9'),
|
||||||
|
(r'\sharp', '\u266F'),
|
||||||
|
(r'\times', '\u00D7'),
|
||||||
|
(r'\block', '\u2588'),
|
||||||
|
(r'\hat{}', '\u005E'),
|
||||||
|
(r'\wedge', '\u2227'),
|
||||||
|
(r'\vdash', '\u22A2'),
|
||||||
|
(r'\angle', '\u2220'),
|
||||||
|
(r'\infty', '\u221E'),
|
||||||
|
(r'\gamma', '\u03B3'),
|
||||||
|
(r'\asymp', '\u224D'),
|
||||||
|
(r'\rceil', '\u2309'),
|
||||||
|
(r'\dot{}', '\u02D9'),
|
||||||
|
(r'\lceil', '\u2308'),
|
||||||
|
(r'\delta', '\u03B4'),
|
||||||
|
(r'\gneqq', '\u2269'),
|
||||||
|
(r'\frown', '\u2322'),
|
||||||
|
(r'\phone', '\u260E'),
|
||||||
|
(r'\vdots', '\u22EE'),
|
||||||
|
(r'\k{i}', '\u012F'),
|
||||||
|
(r'\`{I}', '\u00CC'),
|
||||||
|
(r'\perp', '\u22A5'),
|
||||||
|
(r'\"{o}', '\u00F6'),
|
||||||
|
(r'\={I}', '\u012A'),
|
||||||
|
(r'\`{a}', '\u00E0'),
|
||||||
|
(r'\v{T}', '\u0164'),
|
||||||
|
(r'\surd', '\u221A'),
|
||||||
|
(r'\H{O}', '\u0150'),
|
||||||
|
(r'\vert', '\u007C'),
|
||||||
|
(r'\k{I}', '\u012E'),
|
||||||
|
(r'\"{y}', '\u00FF'),
|
||||||
|
(r'\"{O}', '\u00D6'),
|
||||||
|
(r'\'{Y}', '\u00DD'),
|
||||||
|
(r'\u{u}', '\u045E'),
|
||||||
|
(r'\u{G}', '\u011E'),
|
||||||
|
(r'\.{E}', '\u0116'),
|
||||||
|
(r'\.{z}', '\u017C'),
|
||||||
|
(r'\v{t}', '\u0165'),
|
||||||
|
(r'\prec', '\u227A'),
|
||||||
|
(r'\H{o}', '\u0151'),
|
||||||
|
(r'\mldr', '\u2026'),
|
||||||
|
(r'\'{y}', '\u00FD'),
|
||||||
|
(r'\cong', '\u2245'),
|
||||||
|
(r'\.{e}', '\u0117'),
|
||||||
|
(r'\'{L}', '\u0139'),
|
||||||
|
(r'\star', '\u002A'),
|
||||||
|
(r'\.{Z}', '\u017B'),
|
||||||
|
(r'\'{e}', '\u00E9'),
|
||||||
|
(r'\geqq', '\u2267'),
|
||||||
|
(r'\cdot', '\u22C5'),
|
||||||
|
(r'\`{U}', '\u00D9'),
|
||||||
|
(r'\'{l}', '\u013A'),
|
||||||
|
(r'\v{L}', '\u013D'),
|
||||||
|
(r'\c{s}', '\u015F'),
|
||||||
|
(r'\'{s}', '\u015B'),
|
||||||
|
(r'\~{A}', '\u00C3'),
|
||||||
|
(r'\Vert', '\u2016'),
|
||||||
|
(r'\k{e}', '\u0119'),
|
||||||
|
(r'\lnot', '\u00AC'),
|
||||||
|
(r'\'{z}', '\u017A'),
|
||||||
|
(r'\leqq', '\u2266'),
|
||||||
|
(r'\beta', '\u03B2'),
|
||||||
|
(r'\beth', '\u2136'),
|
||||||
|
(r'\'{E}', '\u00C9'),
|
||||||
|
(r'\~{n}', '\u00F1'),
|
||||||
|
(r'\u{i}', '\u0439'),
|
||||||
|
(r'\c{S}', '\u015E'),
|
||||||
|
(r'\c{N}', '\u0145'),
|
||||||
|
(r'\H{u}', '\u0171'),
|
||||||
|
(r'\v{n}', '\u0148'),
|
||||||
|
(r'\'{S}', '\u015A'),
|
||||||
|
(r'\={U}', '\u016A'),
|
||||||
|
(r'\~{O}', '\u00D5'),
|
||||||
|
(r'\'{Z}', '\u0179'),
|
||||||
|
(r'\v{E}', '\u011A'),
|
||||||
|
(r'\'{R}', '\u0154'),
|
||||||
|
(r'\H{U}', '\u0170'),
|
||||||
|
(r'\v{N}', '\u0147'),
|
||||||
|
(r'\prod', '\u220F'),
|
||||||
|
(r'\v{s}', '\u0161'),
|
||||||
|
(r'\"{U}', '\u00DC'),
|
||||||
|
(r'\c{n}', '\u0146'),
|
||||||
|
(r'\k{U}', '\u0172'),
|
||||||
|
(r'\c{R}', '\u0156'),
|
||||||
|
(r'\'{A}', '\u00C1'),
|
||||||
|
(r'\~{o}', '\u00F5'),
|
||||||
|
(r'\v{e}', '\u011B'),
|
||||||
|
(r'\v{S}', '\u0160'),
|
||||||
|
(r'\u{A}', '\u0102'),
|
||||||
|
(r'\circ', '\u2218'),
|
||||||
|
(r'\"{u}', '\u00FC'),
|
||||||
|
(r'\flat', '\u266D'),
|
||||||
|
(r'\v{z}', '\u017E'),
|
||||||
|
(r'\r{U}', '\u016E'),
|
||||||
|
(r'\`{O}', '\u00D2'),
|
||||||
|
(r'\={u}', '\u016B'),
|
||||||
|
(r'\oint', '\u222E'),
|
||||||
|
(r'\c{K}', '\u0136'),
|
||||||
|
(r'\k{u}', '\u0173'),
|
||||||
|
(r'\not<', '\u226E'),
|
||||||
|
(r'\not>', '\u226F'),
|
||||||
|
(r'\`{o}', '\u00F2'),
|
||||||
|
(r'\"{I}', '\u00CF'),
|
||||||
|
(r'\v{D}', '\u010E'),
|
||||||
|
(r'\.{G}', '\u0120'),
|
||||||
|
(r'\r{u}', '\u016F'),
|
||||||
|
(r'\not=', '\u2260'),
|
||||||
|
(r'\`{u}', '\u00F9'),
|
||||||
|
(r'\v{c}', '\u010D'),
|
||||||
|
(r'\c{k}', '\u0137'),
|
||||||
|
(r'\.{g}', '\u0121'),
|
||||||
|
(r'\'{N}', '\u0143'),
|
||||||
|
(r'\odot', '\u2299'),
|
||||||
|
(r'\`{e}', '\u044D'),
|
||||||
|
(r'\c{T}', '\u0162'),
|
||||||
|
(r'\v{d}', '\u010F'),
|
||||||
|
(r'\"{e}', '\u0451'),
|
||||||
|
(r'\'{I}', '\u00CD'),
|
||||||
|
(r'\v{R}', '\u0158'),
|
||||||
|
(r'\k{a}', '\u0105'),
|
||||||
|
(r'\nldr', '\u2025'),
|
||||||
|
(r'\`{A}', '\u00C0'),
|
||||||
|
(r'\'{n}', '\u0144'),
|
||||||
|
(r'\~{N}', '\u00D1'),
|
||||||
|
(r'\nmid', '\u2224'),
|
||||||
|
(r'\.{C}', '\u010A'),
|
||||||
|
(r'\zeta', '\u03B6'),
|
||||||
|
(r'\~{u}', '\u0169'),
|
||||||
|
(r'\`{E}', '\u042D'),
|
||||||
|
(r'\~{a}', '\u00E3'),
|
||||||
|
(r'\c{t}', '\u0163'),
|
||||||
|
(r'\={o}', '\u014D'),
|
||||||
|
(r'\v{r}', '\u0159'),
|
||||||
|
(r'\={A}', '\u0100'),
|
||||||
|
(r'\.{c}', '\u010B'),
|
||||||
|
(r'\~{U}', '\u0168'),
|
||||||
|
(r'\k{A}', '\u0104'),
|
||||||
|
(r'\"{a}', '\u00E4'),
|
||||||
|
(r'\u{U}', '\u040E'),
|
||||||
|
(r'\iota', '\u03B9'),
|
||||||
|
(r'\={O}', '\u014C'),
|
||||||
|
(r'\c{C}', '\u00C7'),
|
||||||
|
(r'\gneq', '\u2269'),
|
||||||
|
(r'\'{c}', '\u0107'),
|
||||||
|
(r'\boxH', '\u2550'),
|
||||||
|
(r'\hbar', '\u210F'),
|
||||||
|
(r'\"{A}', '\u00C4'),
|
||||||
|
(r'\boxv', '\u2502'),
|
||||||
|
(r'\boxh', '\u2500'),
|
||||||
|
(r'\male', '\u2642'),
|
||||||
|
(r'\'{u}', '\u00FA'),
|
||||||
|
(r'\sqrt', '\u221A'),
|
||||||
|
(r'\succ', '\u227B'),
|
||||||
|
(r'\c{c}', '\u00E7'),
|
||||||
|
(r'\'{C}', '\u0106'),
|
||||||
|
(r'\v{l}', '\u013E'),
|
||||||
|
(r'\u{a}', '\u0103'),
|
||||||
|
(r'\v{Z}', '\u017D'),
|
||||||
|
(r'\'{o}', '\u00F3'),
|
||||||
|
(r'\c{G}', '\u0122'),
|
||||||
|
(r'\v{C}', '\u010C'),
|
||||||
|
(r'\lneq', '\u2268'),
|
||||||
|
(r'\"{E}', '\u0401'),
|
||||||
|
(r'\={a}', '\u0101'),
|
||||||
|
(r'\c{l}', '\u013C'),
|
||||||
|
(r'\'{a}', '\u00E1'),
|
||||||
|
(r'\={E}', '\u0112'),
|
||||||
|
(r'\boxV', '\u2551'),
|
||||||
|
(r'\u{g}', '\u011F'),
|
||||||
|
(r'\'{O}', '\u00D3'),
|
||||||
|
(r'\'{g}', '\u01F5'),
|
||||||
|
(r'\u{I}', '\u0419'),
|
||||||
|
(r'\c{L}', '\u013B'),
|
||||||
|
(r'\k{E}', '\u0118'),
|
||||||
|
(r'\.{I}', '\u0130'),
|
||||||
|
(r'\~{I}', '\u0128'),
|
||||||
|
(r'\quad', '\u2003'),
|
||||||
|
(r'\c{r}', '\u0157'),
|
||||||
|
(r'\'{r}', '\u0155'),
|
||||||
|
(r'\"{Y}', '\u0178'),
|
||||||
|
(r'\={e}', '\u0113'),
|
||||||
|
(r'\'{U}', '\u00DA'),
|
||||||
|
(r'\leq', '\u2264'),
|
||||||
|
(r'\Cup', '\u22D3'),
|
||||||
|
(r'\Psi', '\u03A8'),
|
||||||
|
(r'\neq', '\u2260'),
|
||||||
|
(r'\k{}', '\u02DB'),
|
||||||
|
(r'\={}', '\u203E'),
|
||||||
|
(r'\H{}', '\u02DD'),
|
||||||
|
(r'\cup', '\u222A'),
|
||||||
|
(r'\geq', '\u2265'),
|
||||||
|
(r'\mho', '\u2127'),
|
||||||
|
(r'\Dzh', '\u040F'),
|
||||||
|
(r'\cap', '\u2229'),
|
||||||
|
(r'\bot', '\u22A5'),
|
||||||
|
(r'\psi', '\u03C8'),
|
||||||
|
(r'\chi', '\u03C7'),
|
||||||
|
(r'\c{}', '\u00B8'),
|
||||||
|
(r'\Phi', '\u03A6'),
|
||||||
|
(r'\ast', '\u002A'),
|
||||||
|
(r'\ell', '\u2113'),
|
||||||
|
(r'\top', '\u22A4'),
|
||||||
|
(r'\lll', '\u22D8'),
|
||||||
|
(r'\tau', '\u03C4'),
|
||||||
|
(r'\Cap', '\u22D2'),
|
||||||
|
(r'\sad', '\u2639'),
|
||||||
|
(r'\iff', '\u21D4'),
|
||||||
|
(r'\eta', '\u03B7'),
|
||||||
|
(r'\eth', '\u00F0'),
|
||||||
|
(r'\d{}', '\u0323'),
|
||||||
|
(r'\rho', '\u03C1'),
|
||||||
|
(r'\dzh', '\u045F'),
|
||||||
|
(r'\div', '\u00F7'),
|
||||||
|
(r'\phi', '\u03D5'),
|
||||||
|
(r'\Rsh', '\u21B1'),
|
||||||
|
(r'\vee', '\u2228'),
|
||||||
|
(r'\b{}', '\u02CD'),
|
||||||
|
(r'\t{}', '\u0361'),
|
||||||
|
(r'\int', '\u222B'),
|
||||||
|
(r'\sim', '\u223C'),
|
||||||
|
(r'\r{}', '\u02DA'),
|
||||||
|
(r'\Lsh', '\u21B0'),
|
||||||
|
(r'\yen', '\u00A5'),
|
||||||
|
(r'\ggg', '\u22D9'),
|
||||||
|
(r'\mid', '\u2223'),
|
||||||
|
(r'\sum', '\u2211'),
|
||||||
|
(r'\Dz', '\u0405'),
|
||||||
|
(r'\Re', '\u211C'),
|
||||||
|
(r'\oe', '\u0153'),
|
||||||
|
(r'\DH', '\u00D0'),
|
||||||
|
(r'\ll', '\u226A'),
|
||||||
|
(r'\ng', '\u014B'),
|
||||||
|
(r'\'G', '\u0403'),
|
||||||
|
(r'\wr', '\u2240'),
|
||||||
|
(r'\wp', '\u2118'),
|
||||||
|
(r'\=I', '\u0406'),
|
||||||
|
(r'\:)', '\u263A'),
|
||||||
|
(r'\:(', '\u2639'),
|
||||||
|
(r'\AE', '\u00C6'),
|
||||||
|
(r'\AA', '\u00C5'),
|
||||||
|
(r'\ss', '\u00DF'),
|
||||||
|
(r'\dz', '\u0455'),
|
||||||
|
(r'\ae', '\u00E6'),
|
||||||
|
(r'\aa', '\u00E5'),
|
||||||
|
(r'\th', '\u00FE'),
|
||||||
|
(r'\to', '\u2192'),
|
||||||
|
(r'\Pi', '\u03A0'),
|
||||||
|
(r'\mp', '\u2213'),
|
||||||
|
(r'\Im', '\u2111'),
|
||||||
|
(r'\pm', '\u00B1'),
|
||||||
|
(r'\pi', '\u03C0'),
|
||||||
|
(r'\"I', '\u0407'),
|
||||||
|
(r'\'C', '\u040B'),
|
||||||
|
(r'\in', '\u2208'),
|
||||||
|
(r'\'K', '\u040C'),
|
||||||
|
(r'\'k', '\u045C'),
|
||||||
|
(r'\'c', '\u045B'),
|
||||||
|
(r'\'g', '\u0453'),
|
||||||
|
(r'\ni', '\u220B'),
|
||||||
|
(r'\ne', '\u2260'),
|
||||||
|
(r'\TH', '\u00DE'),
|
||||||
|
(r'\Xi', '\u039E'),
|
||||||
|
(r'\nu', '\u03BD'),
|
||||||
|
(r'\NG', '\u014A'),
|
||||||
|
(r'\:G', '\u32E1'),
|
||||||
|
(r'\xi', '\u03BE'),
|
||||||
|
(r'\OE', '\u0152'),
|
||||||
|
(r'\gg', '\u226B'),
|
||||||
|
(r'\DJ', '\u0110'),
|
||||||
|
(r'\=e', '\u0454'),
|
||||||
|
(r'\=E', '\u0404'),
|
||||||
|
(r'\mu', '\u03BC'),
|
||||||
|
(r'\dj', '\u0111'),
|
||||||
|
# (r'\:', '\u2004'),
|
||||||
|
# (r'\;', '\u2002'),
|
||||||
|
(r'\&', '\u0026'),
|
||||||
|
(r'\$', '\u0024'),
|
||||||
|
(r'\%', '\u0025'),
|
||||||
|
(r'\#', '\u0023'),
|
||||||
|
(r'\,', '\u2009'),
|
||||||
|
(r'\-', '\u00AD'),
|
||||||
|
(r'\S', '\u00A7'),
|
||||||
|
(r'\P', '\u00B6'),
|
||||||
|
(r'\O', '\u00D8'),
|
||||||
|
(r'\L', '\u0141'),
|
||||||
|
(r'\}', '\u007D'),
|
||||||
|
(r'\o', '\u00F8'),
|
||||||
|
(r'\l', '\u0142'),
|
||||||
|
(r'\h', '\u210E'),
|
||||||
|
(r'\i', '\u2139'),
|
||||||
|
]
|
||||||
|
COMBININGMARKS_V06 = [
|
||||||
|
(r'\tilde', '\u0303'),
|
||||||
|
(r'\grave', '\u0300'),
|
||||||
|
(r'\dot', '\u0307'),
|
||||||
|
(r'\acute', '\u0301'),
|
||||||
|
(r'\doubleunderline', '\u0333'),
|
||||||
|
(r'\ddot', '\u0308'),
|
||||||
|
(r'\slash', '\u0338'),
|
||||||
|
(r'\overline', '\u0305'),
|
||||||
|
(r'\vec', '\u20D7'),
|
||||||
|
(r'\hat', '\u0302'),
|
||||||
|
(r'\breve', '\u0306'),
|
||||||
|
(r'\underline', '\u0332'),
|
||||||
|
(r'\strikethrough', '\u0335'),
|
||||||
|
(r'\bar', '\u0305'),
|
||||||
|
]
|
||||||
|
SUBSUPERSCRIPTS_V06 = [
|
||||||
|
(r'_x', '\u2093'),
|
||||||
|
(r'_v', '\u1D65'),
|
||||||
|
(r'_u', '\u1D64'),
|
||||||
|
(r'_t', '\u209C'),
|
||||||
|
(r'_s', '\u209B'),
|
||||||
|
(r'_r', '\u1D63'),
|
||||||
|
(r'_p', '\u209A'),
|
||||||
|
(r'_o', '\u2092'),
|
||||||
|
(r'_n', '\u2099'),
|
||||||
|
(r'_m', '\u2098'),
|
||||||
|
(r'_l', '\u2097'),
|
||||||
|
(r'_k', '\u2096'),
|
||||||
|
(r'_j', '\u2C7C'),
|
||||||
|
(r'_i', '\u1D62'),
|
||||||
|
(r'_h', '\u2095'),
|
||||||
|
(r'_e', '\u2091'),
|
||||||
|
(r'_a', '\u2090'),
|
||||||
|
# (r'\^\u222B', '\u1DB4'),
|
||||||
|
(r'_>', '\u02F2'),
|
||||||
|
(r'_=', '\u208C'),
|
||||||
|
(r'_<', '\u02F1'),
|
||||||
|
(r'_9', '\u2089'),
|
||||||
|
(r'_8', '\u2088'),
|
||||||
|
(r'_7', '\u2087'),
|
||||||
|
(r'_6', '\u2086'),
|
||||||
|
(r'_5', '\u2085'),
|
||||||
|
(r'_4', '\u2084'),
|
||||||
|
(r'_3', '\u2083'),
|
||||||
|
(r'_2', '\u2082'),
|
||||||
|
(r'_1', '\u2081'),
|
||||||
|
(r'_0', '\u2080'),
|
||||||
|
(r'_-', '\u208B'),
|
||||||
|
(r'_+', '\u208A'),
|
||||||
|
(r'_)', '\u208E'),
|
||||||
|
(r'_(', '\u208D'),
|
||||||
|
# (r'_\u03C1', '\u1D68'),
|
||||||
|
# (r'_\u03C7', '\u1D6A'),
|
||||||
|
# (r'_\u03C6', '\u1D69'),
|
||||||
|
# (r'_\u03B2', '\u1D66'),
|
||||||
|
# (r'_\u03B3', '\u1D67'),
|
||||||
|
# (r'\^\u03C6', '\u1D60'),
|
||||||
|
# (r'\^\u03C7', '\u1D61'),
|
||||||
|
# (r'\^\u03B4', '\u1D5F'),
|
||||||
|
# (r'\^\u03B3', '\u1D5E'),
|
||||||
|
# (r'\^\u03B2', '\u1D5D'),
|
||||||
|
(r'^8', '\u2078'),
|
||||||
|
(r'^9', '\u2079'),
|
||||||
|
(r'^<', '\u02C2'),
|
||||||
|
(r'^=', '\u207C'),
|
||||||
|
(r'^>', '\u02C3'),
|
||||||
|
(r'^0', '\u2070'),
|
||||||
|
(r'^1', '\u00B9'),
|
||||||
|
(r'^2', '\u00B2'),
|
||||||
|
(r'^3', '\u00B3'),
|
||||||
|
(r'^4', '\u2074'),
|
||||||
|
(r'^5', '\u2075'),
|
||||||
|
(r'^6', '\u2076'),
|
||||||
|
(r'^7', '\u2077'),
|
||||||
|
(r'^(', '\u207D'),
|
||||||
|
(r'^)', '\u207E'),
|
||||||
|
(r'^*', '\u002A'),
|
||||||
|
(r'^+', '\u207A'),
|
||||||
|
(r'^-', '\u207B'),
|
||||||
|
(r'^P', '\u1D3E'),
|
||||||
|
(r'^R', '\u1D3F'),
|
||||||
|
(r'^T', '\u1D40'),
|
||||||
|
(r'^U', '\u1D41'),
|
||||||
|
(r'^V', '\u1111'),
|
||||||
|
(r'^W', '\u1D42'),
|
||||||
|
(r'^H', '\u1D34'),
|
||||||
|
(r'^I', '\u1D35'),
|
||||||
|
(r'^J', '\u1D36'),
|
||||||
|
(r'^K', '\u1D37'),
|
||||||
|
(r'^L', '\u1D38'),
|
||||||
|
(r'^M', '\u1D39'),
|
||||||
|
(r'^N', '\u1D3A'),
|
||||||
|
(r'^O', '\u1D3C'),
|
||||||
|
(r'^A', '\u1D2C'),
|
||||||
|
(r'^B', '\u1D2E'),
|
||||||
|
(r'^D', '\u1D30'),
|
||||||
|
(r'^E', '\u1D31'),
|
||||||
|
(r'^G', '\u1D33'),
|
||||||
|
(r'^x', '\u02E3'),
|
||||||
|
(r'^y', '\u02B8'),
|
||||||
|
(r'^z', '\u1DBB'),
|
||||||
|
(r'^p', '\u1D56'),
|
||||||
|
(r'^r', '\u02B3'),
|
||||||
|
(r'^s', '\u02E2'),
|
||||||
|
(r'^t', '\u1D57'),
|
||||||
|
(r'^u', '\u1D58'),
|
||||||
|
(r'^v', '\u1D5B'),
|
||||||
|
(r'^w', '\u02B7'),
|
||||||
|
(r'^h', '\u02B0'),
|
||||||
|
(r'^i', '\u2071'),
|
||||||
|
(r'^j', '\u02B2'),
|
||||||
|
(r'^k', '\u1D4F'),
|
||||||
|
(r'^l', '\u02E1'),
|
||||||
|
(r'^m', '\u1D50'),
|
||||||
|
(r'^n', '\u207F'),
|
||||||
|
(r'^o', '\u1D52'),
|
||||||
|
(r'^a', '\u1D43'),
|
||||||
|
(r'^b', '\u1D47'),
|
||||||
|
(r'^c', '\u1D9C'),
|
||||||
|
(r'^d', '\u1D48'),
|
||||||
|
(r'^e', '\u1D49'),
|
||||||
|
(r'^f', '\u1DA0'),
|
||||||
|
(r'^g', '\u1D4D'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('sets_of_symbols', [SYMBOLS_V06, SUBSUPERSCRIPTS_V06])
|
||||||
|
def test_symbols_v06(sets_of_symbols):
|
||||||
|
for i in range(0, len(sets_of_symbols), 20):
|
||||||
|
symbols = sets_of_symbols[i:i + 20]
|
||||||
|
latex = ''.join([l for l, _ in symbols])
|
||||||
|
unicode = ''.join([u for _, u in symbols])
|
||||||
|
print(latex)
|
||||||
|
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
latex,
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == unicode.strip()
|
||||||
|
|
||||||
|
|
||||||
|
def test_combiningmarks_v06():
|
||||||
|
for i in range(0, len(COMBININGMARKS_V06), 20):
|
||||||
|
symbols = COMBININGMARKS_V06[i:i + 20]
|
||||||
|
latex = ''.join([l + '{a}' for l, _ in symbols])
|
||||||
|
unicode = ''.join(['a' + u for _, u in symbols])
|
||||||
|
print(latex)
|
||||||
|
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
latex,
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == unicode
|
||||||
|
|
||||||
|
|
||||||
|
def test_combiningmarks_v06_nested_replace():
|
||||||
|
for i in range(0, len(COMBININGMARKS_V06), 20):
|
||||||
|
symbols = COMBININGMARKS_V06[i:i + 20]
|
||||||
|
latex = ''.join([l + '{\\alpha}' for l, _ in symbols])
|
||||||
|
unicode = ''.join(['\u03B1' + u for _, u in symbols])
|
||||||
|
print(latex)
|
||||||
|
|
||||||
|
r = subprocess.check_output([
|
||||||
|
PYTHON, '-m', 'unicodeit.cli',
|
||||||
|
latex,
|
||||||
|
])
|
||||||
|
print(r.decode())
|
||||||
|
assert r.decode().strip() == unicode
|
||||||
4391
unicodeit/ts_src/data.ts
Normal file
4391
unicodeit/ts_src/data.ts
Normal file
File diff suppressed because it is too large
Load diff
1
unicodeit/ts_src/index.ts
Normal file
1
unicodeit/ts_src/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export { replace } from './replace';
|
||||||
76
unicodeit/ts_src/replace.ts
Normal file
76
unicodeit/ts_src/replace.ts
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
// Copyright (c) 2010-2020 Sven Kreiss, Kyle Cranmer
|
||||||
|
|
||||||
|
import { combiningmarks, replacements, subsuperscripts } from './data';
|
||||||
|
|
||||||
|
|
||||||
|
export function replace(f: string): string {
|
||||||
|
// Catch cases like \not\subset and \not\in and convert them to
|
||||||
|
// use the combining character slash as in \slash{\subset}
|
||||||
|
f = f.replace(/\\not(\\[A-z]+)/g, '\\slash{$1}');
|
||||||
|
// escape combining marks with a space after the backslash
|
||||||
|
for (const ic in combiningmarks) {
|
||||||
|
const c = combiningmarks[ic];
|
||||||
|
|
||||||
|
let i = -1;
|
||||||
|
while (
|
||||||
|
(i = f.indexOf(c[0], i+1)) > -1
|
||||||
|
&& f.indexOf("}", i+1) > i
|
||||||
|
) {
|
||||||
|
f = f.slice(0, i+1) + ' ' + f.slice(i+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log(replacements);
|
||||||
|
for (const ir in replacements) {
|
||||||
|
const r = replacements[ir];
|
||||||
|
// dirty way of a replaceAll():
|
||||||
|
f = f.split(r[0]).join(r[1]);
|
||||||
|
|
||||||
|
if (r[0].slice(-2) == '{}') {
|
||||||
|
f = f.split('\\ '+r[0].slice(1)).join(r[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// expand groups of subscripts: _{01234}
|
||||||
|
let isub = -1;
|
||||||
|
while (
|
||||||
|
(isub = f.indexOf("_{", isub+1)) > -1
|
||||||
|
&& f.indexOf("}", isub+1) > isub
|
||||||
|
) {
|
||||||
|
f = f.slice(0, isub) + '_' + f[isub+2] + '_{' + f.slice(isub+3);
|
||||||
|
f = f.replace('_{}', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
// expand groups of superscripts: ^{01234}
|
||||||
|
let isup = -1;
|
||||||
|
while (
|
||||||
|
(isup = f.indexOf("^{", isup+1)) > -1
|
||||||
|
&& f.indexOf("}", isup+1) > isup
|
||||||
|
) {
|
||||||
|
f = f.slice(0, isup) + '^' + f[isup+2] + '^{' + f.slice(isup+3);
|
||||||
|
f = f.replace('^{}', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
// now replace subsuperscripts
|
||||||
|
for (const ir in subsuperscripts) {
|
||||||
|
const r = subsuperscripts[ir];
|
||||||
|
// dirty way of a replaceAll():
|
||||||
|
f = f.split(r[0]).join(r[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// combining marks (unicode char modifies previous char)
|
||||||
|
for (const ic in combiningmarks) {
|
||||||
|
const c = combiningmarks[ic];
|
||||||
|
|
||||||
|
let i = -1;
|
||||||
|
while (
|
||||||
|
(i = f.indexOf('\\ '+c[0].slice(1)+'{', i+1)) > -1
|
||||||
|
&& f.indexOf("}", i+1) > i
|
||||||
|
) {
|
||||||
|
const newString = f[i+c[0].length+2] + c[1];
|
||||||
|
f = f.slice(0,i)+newString+f.slice(i+1+c[0].length+3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return f;
|
||||||
|
}
|
||||||
31
unicodeit/ts_src/tests.ts
Normal file
31
unicodeit/ts_src/tests.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
import { expect } from 'chai';
|
||||||
|
import { replace } from './replace';
|
||||||
|
|
||||||
|
|
||||||
|
describe('Symbols', () => {
|
||||||
|
describe('replace alpha', () => {
|
||||||
|
it('converts', done => {
|
||||||
|
expect(replace('\\alpha')).to.equal('α');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('combining mark', () => {
|
||||||
|
it('adds dot to a', done => {
|
||||||
|
expect(replace('\\dot{a}')).to.equal('ȧ');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
it('adds dot to alpha', done => {
|
||||||
|
expect(replace('\\dot{\\alpha}')).to.equal('α̇');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
it('empty combining char', done => {
|
||||||
|
expect(replace('\\breve{}')).to.equal('˘');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
it('incomplete combining char', done => {
|
||||||
|
expect(replace('\\breve{')).to.equal('\\breve{');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
75
unicodeit/ts_src/ui.ts
Normal file
75
unicodeit/ts_src/ui.ts
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
import {replacements} from './data';
|
||||||
|
import {replace} from './replace';
|
||||||
|
|
||||||
|
const latexInput = $('#latexInput');
|
||||||
|
const unicodeOutput = $('#unicodeOutput');
|
||||||
|
const permaLink = $('.permalink');
|
||||||
|
|
||||||
|
|
||||||
|
// copy replacements and sort case insensitive
|
||||||
|
let listOfReplacements = replacements
|
||||||
|
.map(function(r) { return { value: r[0], unicode: r[1] }; })
|
||||||
|
.sort(function(a, b) { return a.value.toLowerCase().localeCompare(b.value.toLowerCase()); });
|
||||||
|
|
||||||
|
// reorder such that when just typing '\' suggestions starting with '\a' appear
|
||||||
|
const indexOfFirstA = listOfReplacements
|
||||||
|
.map(function(r) { return r.value.slice(0, 2).toLowerCase(); })
|
||||||
|
.indexOf('\\a');
|
||||||
|
listOfReplacements = listOfReplacements.slice(indexOfFirstA).concat(listOfReplacements.slice(0, indexOfFirstA));
|
||||||
|
|
||||||
|
|
||||||
|
// Bloodhound: the source (dataset) for typeahead
|
||||||
|
const mySource = new Bloodhound({
|
||||||
|
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.value); },
|
||||||
|
queryTokenizer: function(d) { const i = d.lastIndexOf('\\'); const r = [d.substr(0, i), d.substr(i)]; console.log(r); return r; },
|
||||||
|
local: listOfReplacements,
|
||||||
|
});
|
||||||
|
mySource.initialize();
|
||||||
|
|
||||||
|
// apply typeahead to input text field
|
||||||
|
latexInput.typeahead({
|
||||||
|
hint: false,
|
||||||
|
highlight: true,
|
||||||
|
minLength: 0,
|
||||||
|
}, {
|
||||||
|
display: 'value',
|
||||||
|
source: mySource.ttAdapter(),
|
||||||
|
limit: 15,
|
||||||
|
templates: {
|
||||||
|
suggestion: function(datum: {unicode:string, value:string}) {
|
||||||
|
return '<div><span style="display:inline-block;width:3em;">'+datum.unicode+'</span><strong>'+datum.value+'</strong></div>';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
latexInput.on('typeahead:selected', function (object, datum) {
|
||||||
|
$('input#unicodeOutput').val(datum.unicode);
|
||||||
|
});
|
||||||
|
// $('.tt-query').css('background-color','#fff');
|
||||||
|
latexInput.focus();
|
||||||
|
|
||||||
|
|
||||||
|
// click handler for LaTeX examples
|
||||||
|
$('.latexExample').on('click', function() {
|
||||||
|
latexInput
|
||||||
|
.typeahead('val', $(this).html())
|
||||||
|
.trigger('change')
|
||||||
|
.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
// generate unicode output and permalink
|
||||||
|
latexInput.on('keyup change', function() {
|
||||||
|
const input = <string>$(this).val();
|
||||||
|
unicodeOutput.val(replace(input));
|
||||||
|
permaLink.attr('href', 'https://www.unicodeit.net/?'+encodeURIComponent(input));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (location.search) {
|
||||||
|
const latex = decodeURIComponent(location.search.slice(1));
|
||||||
|
latexInput
|
||||||
|
.typeahead('val', latex)
|
||||||
|
.trigger('change')
|
||||||
|
.focus();
|
||||||
|
}
|
||||||
19
unicodeit/tsconfig.json
Normal file
19
unicodeit/tsconfig.json
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./ts_dist/js",
|
||||||
|
"sourceMap": true,
|
||||||
|
"declaration": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es6",
|
||||||
|
"jsx": "react",
|
||||||
|
"allowJs": true
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"ts_src/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules/",
|
||||||
|
"ts_dist"
|
||||||
|
]
|
||||||
|
}
|
||||||
6
unicodeit/unicodeit/__init__.py
Normal file
6
unicodeit/unicodeit/__init__.py
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
"""Converts LaTeX tags to unicode."""
|
||||||
|
|
||||||
|
from .replace import replace
|
||||||
|
|
||||||
|
__author__ = 'Sven Kreiss <me@svenkreiss.com>, Kyle Cranmer <kyle.cranmer@nyu.edu>'
|
||||||
|
__version__ = '0.7.5'
|
||||||
8
unicodeit/unicodeit/cli.py
Normal file
8
unicodeit/unicodeit/cli.py
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from .replace import replace
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
result = [replace(f) for f in sys.argv[1:]]
|
||||||
|
print(' '.join(result))
|
||||||
4391
unicodeit/unicodeit/data.py
Normal file
4391
unicodeit/unicodeit/data.py
Normal file
File diff suppressed because it is too large
Load diff
33
unicodeit/unicodeit/export_data.py
Normal file
33
unicodeit/unicodeit/export_data.py
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from .data import REPLACEMENTS, COMBININGMARKS, SUBSUPERSCRIPTS
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
outname = 'ts_src/data.ts'
|
||||||
|
if len(sys.argv) == 2:
|
||||||
|
outname = sys.argv[1]
|
||||||
|
|
||||||
|
with open(outname, 'w', encoding='utf8') as f:
|
||||||
|
f.write('// autogenerated with python -m unicodeit.export_data\n\n')
|
||||||
|
|
||||||
|
f.write('export const replacements = [\n')
|
||||||
|
for l, u in REPLACEMENTS:
|
||||||
|
l = l.replace('\\', '\\\\')
|
||||||
|
l = l.replace('\'', '\\\'')
|
||||||
|
u = u.replace('\\', '\\\\')
|
||||||
|
f.write(f' [\'{l}\', \'{u}\'],\n')
|
||||||
|
f.write('];\n\n')
|
||||||
|
|
||||||
|
f.write('export const combiningmarks = [\n')
|
||||||
|
for l, u in COMBININGMARKS:
|
||||||
|
l = l.replace('\\', '\\\\')
|
||||||
|
l = l.replace('\'', '\\\'')
|
||||||
|
u = u.encode('ascii', 'backslashreplace').decode()
|
||||||
|
f.write(f' [\'{l}\', \'{u}\'],\n')
|
||||||
|
f.write('];\n\n')
|
||||||
|
|
||||||
|
f.write('export const subsuperscripts = [\n')
|
||||||
|
for l, u in SUBSUPERSCRIPTS:
|
||||||
|
f.write(f' [\'{l}\', \'{u}\'],\n')
|
||||||
|
f.write('];\n')
|
||||||
71
unicodeit/unicodeit/replace.py
Normal file
71
unicodeit/unicodeit/replace.py
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
# Copyright (c) 2010 Sven Kreiss, Kyle Cranmer
|
||||||
|
import re
|
||||||
|
|
||||||
|
from .data import REPLACEMENTS, COMBININGMARKS, SUBSUPERSCRIPTS
|
||||||
|
|
||||||
|
|
||||||
|
def replace(f: str):
|
||||||
|
# Catch cases like \not\subset and \not\in and convert them to
|
||||||
|
# use the combining character slash as in \slash{\subset}
|
||||||
|
f = re.sub(r'\\not(\\[A-z]+)', r'\\slash{\1}', f)
|
||||||
|
# escape combining marks with a space after the backslash
|
||||||
|
for c in COMBININGMARKS:
|
||||||
|
f = f.replace(c[0] + '{', '\\ ' + c[0][1:] + '{')
|
||||||
|
|
||||||
|
# replace
|
||||||
|
for r in REPLACEMENTS:
|
||||||
|
f = f.replace(r[0], r[1])
|
||||||
|
|
||||||
|
# check whether it was escaped for combining marks but has empty braces
|
||||||
|
if r[0].endswith('{}'):
|
||||||
|
f = f.replace('\\ ' + r[0][1:], r[1])
|
||||||
|
|
||||||
|
# expand groups of subscripts: \_{01234}
|
||||||
|
offset = 0
|
||||||
|
for s in re.finditer(
|
||||||
|
r"_\{[0-9\+-=\(\)<>\-aeoxjhklmnpstiruv"
|
||||||
|
r"\u03B2\u03B3\u03C1\u03C6\u03C7\u2212]+\}", f):
|
||||||
|
newstring, n = re.subn(
|
||||||
|
r"([0-9\+-=\(\)<>\-aeoxjhklmnpstiruv"
|
||||||
|
r"\u03B2\u03B3\u03C1\u03C6\u03C7\u2212])",
|
||||||
|
r"_\1", s.group(0)[2:-1])
|
||||||
|
f = f[:s.start() + offset] + newstring + f[s.end() + offset:]
|
||||||
|
offset += n * 2 - (n + 3)
|
||||||
|
|
||||||
|
# expand groups of superscripts: \^{01234}
|
||||||
|
offset = 0
|
||||||
|
for s in re.finditer(
|
||||||
|
r"\^\{[0-9\+-=\(\)<>ABDEGHIJKLMNOPRTUW"
|
||||||
|
r"abcdefghijklmnoprstuvwxyz"
|
||||||
|
r"\u03B2\u03B3\u03B4\u03C6\u03C7\u222B\u2212]+\}", f):
|
||||||
|
newstring, n = re.subn(
|
||||||
|
r"([0-9\+-=\(\)<>ABDEGHIJKLMNOPRTUW"
|
||||||
|
r"abcdefghijklmnoprstuvwxyz"
|
||||||
|
r"\u03B2\u03B3\u03B4\u03C6\u03C7\u222B\u2212])",
|
||||||
|
r"^\1", s.group(0)[2:-1])
|
||||||
|
f = f[:s.start() + offset] + newstring + f[s.end() + offset:]
|
||||||
|
offset += n * 2 - (n + 3)
|
||||||
|
|
||||||
|
# now replace subsuperscripts
|
||||||
|
for r in SUBSUPERSCRIPTS:
|
||||||
|
f = f.replace(r[0], r[1])
|
||||||
|
|
||||||
|
# process combining marks first
|
||||||
|
for c in COMBININGMARKS:
|
||||||
|
escaped_latex = f'\\ {c[0][1:]}{{'
|
||||||
|
while escaped_latex in f:
|
||||||
|
i = f.index(escaped_latex)
|
||||||
|
if len(f) <= i + len(escaped_latex):
|
||||||
|
# incomplete: unescape and continue
|
||||||
|
f = f[:i] + c[0] + '{'
|
||||||
|
continue
|
||||||
|
|
||||||
|
combined_char = f[i + len(escaped_latex)]
|
||||||
|
|
||||||
|
remainder = ''
|
||||||
|
if len(f) >= i + len(escaped_latex) + 2:
|
||||||
|
remainder = f[i + len(escaped_latex) + 2:]
|
||||||
|
|
||||||
|
f = f[:i] + combined_char + c[1] + remainder
|
||||||
|
|
||||||
|
return f
|
||||||
1
unicodeit/web/CNAME
Normal file
1
unicodeit/web/CNAME
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
www.unicodeit.net
|
||||||
BIN
unicodeit/web/favicon.ico
Normal file
BIN
unicodeit/web/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
103
unicodeit/web/index.html
Normal file
103
unicodeit/web/index.html
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="no-js">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>unicodeit.net</title>
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<!-- Latest compiled and minified CSS -->
|
||||||
|
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
|
||||||
|
<link rel="stylesheet" href="style.css?version=0.7.2" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container page">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 leftColumn">
|
||||||
|
<h1>unicode<span class="banner_it">it</span>.net <small>β testing</small></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-8 rightColumn">
|
||||||
|
<h3>Online Demo</h3>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input type="text" class="form-control input-lg" placeholder="latex expression" id="latexInput">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input type="text" class="form-control input-lg" placeholder="unicode output" id="unicodeOutput">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<a class="permalink" href="">Permalink</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 leftColumn">
|
||||||
|
<p>Created by <a href="https://www.svenkreiss.com">Sven Kreiss</a> and <a href="http://www.theoryandpractice.org">Kyle Cranmer</a>.<br />
|
||||||
|
Maintained on <a href="https://github.com/svenkreiss/unicodeit">GitHub</a>.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://www.unicodeit.net" data-text="LaTeX to unicode symbols: \mathcal{H} → ℋ." data-via="svenkreiss" data-hashtags="unicodeit">Tweet</a>
|
||||||
|
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8 rightColumn">
|
||||||
|
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
|
<h3>Python / JavaScript / Automator</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
All the info in the <a href="https://github.com/svenkreiss/unicodeit/blob/master/README.md">README file</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Help</h3>
|
||||||
|
|
||||||
|
<p>Type LaTeX expressions in the input box on the left. The converted text in the box on the right can be copied to most programs including PowerPoint and Keynote, e-mail clients like Outlook and Mail and even apps on smart phones. UnicodeIt can create greek letters, arrows, mathematical symbols and many more for presentations, emails, chats, facebook, etc.</p>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<!-- Default panel contents -->
|
||||||
|
<div class="panel-heading" style="color:#999; font-weight:bold;">Examples</div>
|
||||||
|
|
||||||
|
<!-- Table -->
|
||||||
|
<table class="table examplesTable">
|
||||||
|
<tr><td></td><td class="latexExample">x \in (-\infty, \infty)</td><td>x ∈ (-∞, ∞)</td></tr>
|
||||||
|
<tr><td></td><td class="latexExample">p\bar{p} \to \mu^+\mu^-</td><td>pp̅ → μ⁺μ⁻</td></tr>
|
||||||
|
<tr><td></td><td class="latexExample">\alpha\omega\epsilon\S\om\in</td><td>αωε§øm∈</td></tr>
|
||||||
|
<tr><td></td><td class="latexExample">^2H ^6Li ^{10}B ^{14}N</td><td>²H ⁶Li ¹⁰B ¹⁴N</td></tr>
|
||||||
|
<tr><td></td><td class="latexExample">\mathcal{L} \mathcal{H} \mathbb{R} \mathbb{C}</td><td>ℒ ℋ ℝ ℂ</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br /><br /><br /><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
|
||||||
|
<script src="typeahead.bundle.min.js"></script>
|
||||||
|
<script src="ui.js?version=0.7.2"></script>
|
||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
|
ga('create', 'UA-4070485-7', 'unicodeit.net');
|
||||||
|
ga('set', 'anonymizeIp', true);
|
||||||
|
ga('send', 'pageview');
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
103
unicodeit/web/style.css
Normal file
103
unicodeit/web/style.css
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
body {
|
||||||
|
font-family: "Helvetica Neue", helvetica, arial;
|
||||||
|
padding: 30px 15px 30px 15px;
|
||||||
|
color:#999;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 { color:#55C; margin-top:0; }
|
||||||
|
.banner_it { color:#000; }
|
||||||
|
h1 small { font-size:40%; }
|
||||||
|
|
||||||
|
.leftColumn, .rightColumn { margin-top:50px; }
|
||||||
|
|
||||||
|
#content_manage { display:none; }
|
||||||
|
#content_participate { display:none; }
|
||||||
|
|
||||||
|
.subtitle { font-size:50%; color:#888; }
|
||||||
|
.beta { font-size:40%; color:#ccc; }
|
||||||
|
|
||||||
|
.large_stat { font-size:300%; }
|
||||||
|
.raw { word-wrap:break-word; }
|
||||||
|
|
||||||
|
.footer { color:#ccc; font-size:80%; }
|
||||||
|
.footer a { color:#ccc; }
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
input { margin:5px; }
|
||||||
|
.latexExample {
|
||||||
|
cursor:pointer;
|
||||||
|
max-width:9em;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.permalink {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 1em 1em 1em 0.5em;
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.twitter-typeahead{
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.twitter-typeahead .tt-query,
|
||||||
|
.twitter-typeahead .tt-hint {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.tt-menu {
|
||||||
|
min-width: 160px;
|
||||||
|
margin-top: 2px;
|
||||||
|
padding: 5px 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border: 1px solid rgba(0,0,0,.2);
|
||||||
|
*border-right-width: 2px;
|
||||||
|
*border-bottom-width: 2px;
|
||||||
|
-webkit-border-radius: 6px;
|
||||||
|
-moz-border-radius: 6px;
|
||||||
|
border-radius: 6px;
|
||||||
|
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
||||||
|
-moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
||||||
|
box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
||||||
|
-webkit-background-clip: padding-box;
|
||||||
|
-moz-background-clip: padding;
|
||||||
|
background-clip: padding-box;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tt-suggestion {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tt-suggestion:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #0081c2;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
|
||||||
|
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)
|
||||||
|
}
|
||||||
|
|
||||||
|
.tt-suggestion p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
8
unicodeit/web/typeahead.bundle.min.js
vendored
Normal file
8
unicodeit/web/typeahead.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
23
unicodeit/webpack.config.js
Normal file
23
unicodeit/webpack.config.js
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = [{
|
||||||
|
mode: 'development',
|
||||||
|
entry: './ts_src/ui.ts',
|
||||||
|
devtool: 'inline-source-map',
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.tsx?$/,
|
||||||
|
use: 'ts-loader',
|
||||||
|
exclude: /node_modules/,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: [ '.tsx', '.ts', '.js' ],
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
filename: 'ui.js',
|
||||||
|
path: path.resolve(__dirname, 'web'),
|
||||||
|
},
|
||||||
|
}];
|
||||||
Loading…
Reference in a new issue