README
NAME
Text::MathematicalCase - convert to/from mathematical case
SYNOPSIS
use Text::MathematicalCase; # just mc
say mc "Hello World" :serif:bold; # ššš„š„šØ ššØš«š„š
use Text::MathematicalCase :all; # mc lc uc adverbs
say uc "ššš„š„šØ ššØš«š„š"; # ššššš ššššš
DESCRIPTION
Text::MathematicalCase is module that exports an mc
subroutine that implements converting to/from "mathematical case". Just like you can have UPPERCASE or lowercase, you can also have š¦ššš”šš¦ššš¢ššš„ ššš¬š.
"Mathematical case" is basically text expressed in the alphanumeric symbols of the Mathematical Alphanumeric Symbols unicode block. In it, several styles are supported:
serif: serif, š¬šš«š¢š ššØš„š, š šššš šš”šššš, ššššš šššš šššššš
sans-serif: ššŗšš-šš¾šššæ, šš®š»š-šš²šæš¶š³ šÆš¼š¹š±, š“š¢šÆš“-š“š¦š³šŖš§ šŖšµš¢ššŖš¤, šØšš£šØ-šØšš§šš šš¤š”š šš©šš”šš
script: ššøšš¾š š, š¼š¬š»š²š¹š½ š«šøšµš
fraktur: š£šÆššØš±š²šÆ, ššššššš šššš
monospace: ššššššššš
double-struck: šš š¦ššš-š¤š„š£š¦šš
It optionally also exports an lc
and/or a uc
subroutine (that perform the same function as the standard lc
and uc
subroutines, but are aware of mathematical case characters). And it optionally exports an adverbs
subroutine that lists all the possible combinations of adverbs that can be passed on to the mc
subroutine.
This distribution also installs a mc
script for easy access to the mathematical case functionality.
SUBROUTINES
mc
say mc "Hello World" :serif:bold; # ššš„š„šØ ššØš«š„š
Convert a string to mathematical case with the given adverbs.
lc
use Text::MathematicalCase <lc>;
say lc "ššš„š„šØ ššØš«š„š"; # š”šš„š„šØ š°šØš«š„š
Convert a string to lowercase taking mathematical case into account as well.
uc
use Text::MathematicalCase <uc>;
say uc "ššš„š„šØ ššØš«š„š"; # ššššš ššššš
Convert a string to uppercase taking mathematical case into account as well.
adverbs
use Text::MathematicalCase <adverbs>;
.say for adverbs;
# :double-struck
# :fraktur
# :fraktur:bold
# :monospace
# :sans-serif
# :sans-serif:bold
# :sans-serif:bold:italic
# :sans-serif:italic
# :script
# :script:bold
# :serif
# :serif:bold
# :serif:bold:italic
# :serif:italic
SCRIPTS
mc
$ mc "Hello World" --double-struck
āšššš šš š£šš
$ mc --double-struck < file-with-text
āš šš„ššš„ š š šššš-šØšš„š-š„šš©š„
The mc
script either takes a string, or reads from STDIN
and performs the mathematical case transformation as indicated by its named arguments.
SEE ALSO
See also the App::Unicode::Mangle module for a different approach to this type of functionality.
AUTHOR
Elizabeth Mattijsen [email protected]
Source can be located at: https://github.com/lizmat/Text-MathematicalCase . Comments and Pull Requests are welcome.
COPYRIGHT AND LICENSE
Copyright 2020, 2021 Elizabeth Mattijsen
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.