Should predefined attributes for character replacement be read-only?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Should predefined attributes for character replacement be read-only?

rockyallen
I can write (if I am really stupid)

:amp: -frogs-

and Derby{amp}Jones

becomes

Derby-frogs-Jones

Is there a legitimate use for this, or should predefined attributes be made read-only?
Reply | Threaded
Open this post in threaded view
|

Re: Should predefined attributes for character replacement be read-only?

mojavelinux
Administrator
Rocky,

At first glance, you might conclude that predefined attributes should be read only. But this flexibility is a key advantage of AsciiDoc. I'll explain why.

AsciiDoc is all about keeping source and output/presentation separate. The predefined values carry with them a bias towards XML and XML-like output. It's these very attributes that need to be fined-tuned when creating other types of output, and one of the main reasons that they exist. In other words, they communicate an intent to create a glyph or series of characters without tying that content to a specific output format. That's exactly why they shouldn't be read only.

However, we can say that you shouldn't be overridding them unless you know what you are doing. Obviously, changing `amp` to resolve to `frogs` doesn't make a whole lot of sense...unless of course "frogs" represents "ampersand" in the output format you are targeting. That may seem strange, but consider that the value for trademark in a manpage is \(tm. Who knows what the output format requires.

-Dan

On Sun, Mar 6, 2016 at 10:56 AM, rockyallen [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I can write (if I am really stupid)

:amp: -frogs-

and Derby{amp}Jones

becomes

Derby-frogs-Jones

Is there a legitimate use for this, or should predefined attributes be made read-only?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Should-predefined-attributes-for-character-replacement-be-read-only-tp4474.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Should predefined attributes for character replacement be read-only?

mojavelinux
Administrator
In reply to this post by rockyallen
To say it a lot simpler, it's an important abstraction.

-Dan

On Tue, Mar 8, 2016 at 6:53 PM, Dan Allen <[hidden email]> wrote:
Rocky,

At first glance, you might conclude that predefined attributes should be read only. But this flexibility is a key advantage of AsciiDoc. I'll explain why.

AsciiDoc is all about keeping source and output/presentation separate. The predefined values carry with them a bias towards XML and XML-like output. It's these very attributes that need to be fined-tuned when creating other types of output, and one of the main reasons that they exist. In other words, they communicate an intent to create a glyph or series of characters without tying that content to a specific output format. That's exactly why they shouldn't be read only.

However, we can say that you shouldn't be overridding them unless you know what you are doing. Obviously, changing `amp` to resolve to `frogs` doesn't make a whole lot of sense...unless of course "frogs" represents "ampersand" in the output format you are targeting. That may seem strange, but consider that the value for trademark in a manpage is \(tm. Who knows what the output format requires.

-Dan

On Sun, Mar 6, 2016 at 10:56 AM, rockyallen [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I can write (if I am really stupid)

:amp: -frogs-

and Derby{amp}Jones

becomes

Derby-frogs-Jones

Is there a legitimate use for this, or should predefined attributes be made read-only?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Should-predefined-attributes-for-character-replacement-be-read-only-tp4474.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen