conversion-table.tsv, the generated LaTeX <-> Unicode conversion
table bundled as a module resource. See tools/GenerateTable.java and tools/CONFLICTS.md in
the source tree for how the table is generated and merged from its upstream sources.
The table is loaded lazily and exactly once, on first access to any lookup method.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static record |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Map | |
| private static final Pattern | |
| private final Map | |
| private final Map | |
| private static final String | |
| private final List | |
| private static final Pattern | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Optional | accentForCombining(int codePoint)
Reverse of |
| public static OptionalInt | baseForSubscript(int codePoint)
Reverse of |
| public static OptionalInt | baseForSuperscript(int codePoint)
Reverse of |
| public static Optional | combiningForAccent(String accentCommand)
Looks up the combining Unicode mark produced by a bare LaTeX accent command (e.g. |
| public static Map | commandArities()
Distinct alphabetic LaTeX command names appearing anywhere in the table, mapped to the
argument count implied by the row's latex text: bare |
| public static Optional | |
| public static boolean | encodeNeedsMathMode(int codePoint)
Whether the encode-preferred spelling for |
| private static ConversionTable | |
| public static Optional | |
| private static List | |
| public static int | |
| public static Map | |
| public static OptionalInt | subscriptFor(int codePoint)
Returns the styled subscript codepoint for a base codepoint, if this table has one. |
| public static OptionalInt | superscriptFor(int codePoint)
Returns the styled superscript codepoint for a base codepoint (e.g. |
| private static String |
| accentByCombining | back to summary |
|---|---|
| private final Map<Integer, String> accentByCombining | |
| combiningByAccent | back to summary |
|---|---|
| private final Map<String, ConversionTable. | |
| COMMAND_SPELLING | back to summary |
|---|---|
| private static final Pattern COMMAND_SPELLING | |
| decodable | back to summary |
|---|---|
| private final Map<String, ConversionTable. | |
| encodePreferred | back to summary |
|---|---|
| private final Map<Integer, ConversionTable. | |
| RESOURCE_PATH | back to summary |
|---|---|
| private static final String RESOURCE_PATH | |
| rows | back to summary |
|---|---|
| private final List<ConversionTable. | |
| SCRIPT_LATEX | back to summary |
|---|---|
| private static final Pattern SCRIPT_LATEX | |
| subscriptBaseToStyled | back to summary |
|---|---|
| private final Map<Integer, Integer> subscriptBaseToStyled | |
| subscriptStyledToBase | back to summary |
|---|---|
| private final Map<Integer, Integer> subscriptStyledToBase | |
| superscriptBaseToStyled | back to summary |
|---|---|
| private final Map<Integer, Integer> superscriptBaseToStyled | |
| superscriptStyledToBase | back to summary |
|---|---|
| private final Map<Integer, Integer> superscriptStyledToBase | |
| UNICODE_ESCAPE | back to summary |
|---|---|
| private static final Pattern UNICODE_ESCAPE | |
| ConversionTable | back to summary |
|---|---|
| private ConversionTable() | |
| accentForCombining | back to summary |
|---|---|
| public static Optional Reverse of | |
| baseForSubscript | back to summary |
|---|---|
| public static OptionalInt baseForSubscript(int codePoint) Reverse of | |
| baseForSuperscript | back to summary |
|---|---|
| public static OptionalInt baseForSuperscript(int codePoint) Reverse of | |
| combiningForAccent | back to summary |
|---|---|
| public static Optional Looks up the combining Unicode mark produced by a bare LaTeX accent command (e.g. | |
| commandArities | back to summary |
|---|---|
| public static Map Distinct alphabetic LaTeX command names appearing anywhere in the table, mapped to the
argument count implied by the row's latex text: bare Used to register the table's vocabulary with the parser; single-character command names
( | |
| commandToUnicode | back to summary |
|---|---|
| public static Optional Decodes a LaTeX command/spelling to its Unicode replacement text. Decode direction only: rows flagged | |
| encodeNeedsMathMode | back to summary |
|---|---|
| public static boolean encodeNeedsMathMode(int codePoint) Whether the encode-preferred spelling for | |
| instance | back to summary |
|---|---|
| private static ConversionTable instance() | |
| latexForCodePoint | back to summary |
|---|---|
| public static Optional Encodes a Unicode codepoint back to LaTeX. Encode direction only: returns the table's encode-preferred row for | |
| load | back to summary |
|---|---|
| private static List | |
| size | back to summary |
|---|---|
| public static int size() Total number of rows loaded from the table, for test sanity checks. | |
| styleMap | back to summary |
|---|---|
| public static Map Builds the base-codepoint -> styled-codepoint map for a math alphabet style command, e.g.
Only | |
| subscriptFor | back to summary |
|---|---|
| public static OptionalInt subscriptFor(int codePoint) Returns the styled subscript codepoint for a base codepoint, if this table has one. | |
| superscriptFor | back to summary |
|---|---|
| public static OptionalInt superscriptFor(int codePoint) Returns the styled superscript codepoint for a base codepoint (e.g. | |
| unescapeUnicode | back to summary |
|---|---|
| private static String unescapeUnicode(String value) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final ConversionTable |
| Access | Constructor and Description |
|---|---|
| private |
| INSTANCE | back to summary |
|---|---|
| private static final ConversionTable INSTANCE | |
| Holder | back to summary |
|---|---|
| private Holder() | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | category
Record Component accessed by category(). |
| private final List | |
| private final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public List | |
| pack-priv boolean | |
| public final int | |
| public String | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| public String |
| category | back to summary |
|---|---|
| private final String category Record Component accessed by category(). | |
| flags | back to summary |
|---|---|
| private final List<String> flags Record Component accessed by flags(). | |
| latex | back to summary |
|---|---|
| private final String latex Record Component accessed by latex(). | |
| unicode | back to summary |
|---|---|
| private final String unicode Record Component accessed by unicode(). | |
| Row | back to summary |
|---|---|
| private Row(String category, String unicode, String latex, List<String> flags) | |
| category | back to summary |
|---|---|
| public String category() Record Component getter of category. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| flags | back to summary |
|---|---|
| public List Record Component getter of flags. | |
| hasFlag | back to summary |
|---|---|
| pack-priv boolean hasFlag(String flag) | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| latex | back to summary |
|---|---|
| public String latex() Record Component getter of latex. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| unicode | back to summary |
|---|---|
| public String unicode() Record Component getter of unicode. | |