Text::Typography 0.01
Sponsored Links
Text::Typography 0.01 Ranking & Summary
File size:
0.008 MB
Platform:
Any Platform
License:
Other/Proprietary License
Price:
Downloads:
515
Date added:
2007-08-22
Publisher:
Thomas Sibley
Text::Typography 0.01 description
Text::Typography can markup ASCII text with correct typography for HTML.
SYNOPSIS
use Text::Typography qw(typography);
print typography($text);
This module is a thin wrapper for John Grubers SmartyPants plugin for various CMSs.
SmartyPants is a web publishing utility that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
Straight quotes ( " and ) into "curly" quote HTML entities
Backticks-style quotes (``like this) into "curly" quote HTML entities
Dashes (-- and ---) into en- and em-dash entities
Three consecutive dots (...) into an ellipsis entity
SmartyPants does not modify characters within < pre >, < code >, < kbd >, < script >, or < math > tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
typography($text[, $attributes])
Returns a string marked up with the proper HTML entities for proper typography.
For fine grain control over what gets converted, use the $attributes option. The default value is 3.
The following numeric values set a group of options:
0 : do nothing
1 : set all
2 : set all, using old school en- and em- dash shortcuts (-- and ---)
3 : set all, using inverted old school en- and em- dash shortcuts (--- and --)
For even finer control, specify a string of one or more of the following characters:
q : quotes
b : backtick quotes (``double only)
B : backtick quotes (``double and `single)
d : dashes
D : old school dashes
i : inverted old school dashes
e : ellipses
w : convert " entities to " for Dreamweaver users
Backslash Escapes
If you need to use literal straight quotes (or plain hyphens and periods), SmartyPants accepts the following backslash escape sequences to force non-smart punctuation. It does so by transforming the escape sequence into a decimal-encoded HTML entity:
Escape Value Character
------ ----- ---------
\
" " "
. . .
- - -
` ` `
This is useful, for example, when you want to use straight quotes as foot and inch marks: 62" tall; a 17" iMac.
Algorithmic Shortcomings
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I dont think this problem can be solved in the general case -- every word processor Ive tried gets this wrong as well. In such cases, its best to use the proper HTML entity for closing single-quotes (’) by hand.
SYNOPSIS
use Text::Typography qw(typography);
print typography($text);
This module is a thin wrapper for John Grubers SmartyPants plugin for various CMSs.
SmartyPants is a web publishing utility that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
Straight quotes ( " and ) into "curly" quote HTML entities
Backticks-style quotes (``like this) into "curly" quote HTML entities
Dashes (-- and ---) into en- and em-dash entities
Three consecutive dots (...) into an ellipsis entity
SmartyPants does not modify characters within < pre >, < code >, < kbd >, < script >, or < math > tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
typography($text[, $attributes])
Returns a string marked up with the proper HTML entities for proper typography.
For fine grain control over what gets converted, use the $attributes option. The default value is 3.
The following numeric values set a group of options:
0 : do nothing
1 : set all
2 : set all, using old school en- and em- dash shortcuts (-- and ---)
3 : set all, using inverted old school en- and em- dash shortcuts (--- and --)
For even finer control, specify a string of one or more of the following characters:
q : quotes
b : backtick quotes (``double only)
B : backtick quotes (``double and `single)
d : dashes
D : old school dashes
i : inverted old school dashes
e : ellipses
w : convert " entities to " for Dreamweaver users
Backslash Escapes
If you need to use literal straight quotes (or plain hyphens and periods), SmartyPants accepts the following backslash escape sequences to force non-smart punctuation. It does so by transforming the escape sequence into a decimal-encoded HTML entity:
Escape Value Character
------ ----- ---------
\
" " "
. . .
- - -
` ` `
This is useful, for example, when you want to use straight quotes as foot and inch marks: 62" tall; a 17" iMac.
Algorithmic Shortcomings
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I dont think this problem can be solved in the general case -- every word processor Ive tried gets this wrong as well. In such cases, its best to use the proper HTML entity for closing single-quotes (’) by hand.
Text::Typography 0.01 Screenshot
Text::Typography 0.01 Keywords
HTML
SmartyPants
ASCII
Typography 0.01
Old school
HTML entities
For HTML
correct typography
ASCII text
quotes
typography
text
entities
markup
dashes
Text::Typography
Bookmark Text::Typography 0.01
Text::Typography 0.01 Copyright
WareSeeker periodically updates pricing and software information of Text::Typography 0.01 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Text::Typography 0.01 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
ascii text art
what does html stand for
quotes of the day
typography definitions
graphic design typography
love quotes
html codes for myspace
typography layout
quotes on love
html code
typography design
quotes about life
old school choppers
html source for a guestbook
typography alphabet
quotes about children
famous quotes
typography unit
Related Software
Text::MetaMarkup::HTML is a MM-to-HTML converter. Free Download
Text::VisualWidth is a Perl module that provides functions to treat half-width and full-width characters. Free Download
Text::VimColor is a syntax color text in HTML or XML using Vim. Free Download
Text::Emoticon::GoogleTalk is a Perl module emoticon filter of GoogleTalk. Free Download
Template::Simple is a simple and fast template module. Free Download
blah project consists of a utility for maintaining a list of frequently copy-and-pasted text. Free Download
XML Extractor is a set of tools for transforming XML-like markup into entities or well-formed XML files. Free Download
Text::Quote contains quotes strings as required for perl to eval them back correctly. Free Download
Latest Software
Popular Software
Favourite Software