Maintainer | hapytexeu+gh@gmail.com |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
One can make use of a block of Unicode characters to emulate subscript and superscript. Note that the subscript and superscript will be
aligned with the baseline and the cap line respectively, and is thus not equivalent to sub.../sub
and sup.../sup
in HTML. Furthermore only a small subset of characters
is supported.
This module allows one to map certain characters to their subscript and superscript counterpart, and furthermore makes it more convenient to transform a number (both positive and negative)
to a Text
that specifies this number in subscript and superscript.
Synopsis
- toSub :: Char -> Maybe Char
- toSup :: Char -> Maybe Char
- asSub :: Integral i => PlusStyle -> i -> Text
- asSub' :: Integral i => i -> Text
- asSubPlus :: Integral i => i -> Text
- asSup :: Integral i => PlusStyle -> i -> Text
- asSup' :: Integral i => i -> Text
- asSupPlus :: Integral i => i -> Text
- ratioToUnicode :: Integral i => PlusStyle -> Ratio i -> Text
- ratioToUnicode' :: Integral i => Ratio i -> Text
Convert characters to their subscript and superscript counterpart
:: Char | The given character to convert to its subscript counterpart. |
-> Maybe Char | A character wrapped in a |
Convert a set of characters to their subscript counterpart, given that characters exists.
:: Char | The given character to convert to its superscript counterpart. |
-> Maybe Char | A character wrapped in a |
Convert a set of characters to their superscript counterpart, given that characters exists.
Numbers as subscript and superscript.
:: Integral i | |
=> PlusStyle | The given |
-> i | The given number to convert. |
-> Text | A |
Convert a number (positive or negative) to a Text
object that denotes
that number in subscript characters.
:: Integral i | |
=> i | The number to convert. |
-> Text | A |
Convert a number (positive or negative) to a Text
that specifies that
number in subscript characters.
:: Integral i | |
=> i | The number to convert. |
-> Text | A |
Convert a number (positive or negative) to a Text
that specifies that
number in subscript characters. For positive characters, the subscript
contains a plus character (₊
).
:: Integral i | |
=> PlusStyle | The given |
-> i | The given number to convert. |
-> Text | A |
Convert a number (positive or negative) to a Text
object that denotes
that number in superscript characters.
:: Integral i | |
=> i | The number to convert. |
-> Text | A |
Convert a number (positive or negative) to a Text
object that denotes that
number in superscript characters.
:: Integral i | |
=> i | The number to convert. |
-> Text | A |
Convert a number (positive or negative) to a Text
that specifies that
number in superscript characters. For positive characters, the superscript
contains a plus character (⁺
).