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.

Text::MathematicalCase v0.0.6

convert to/from mathematical case

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Text::MathematicalCase

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.