ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Matthijs Kooijman <matthijs@stdin.nl>
To: ntg-context@ntg.nl
Subject: Why are pretty printer names uppercased?
Date: Wed, 26 Aug 2009 10:52:57 +0200	[thread overview]
Message-ID: <20090826085257.GP12901@katherina.student.utwente.nl> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1253 bytes --]

Hi all,

according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:

  \installprettytype [PHP]        [PHP]

Referring to them should be uppercased as well:
  \definetyping[PHP]   [option=PHP]
  \setuptyping[option=PHP]

However, the filename should be lowercase, e.g. pret-php.lua and the pretty
printer should register itself in lowercase as well:
buffers.newvisualizer("lua"). The first thing that happens to the arguments of
installprettytype is to lowercase them, and every option= argument that points
to a pretty printer is lowercased by setvisualizer in lua before being used.

If everything is lowercased, why do we still recommend the arguments to
\installprettytype and option= to be uppercase? IMHO this makes things
confusing when trying to understand which PHP refers to which php or PHP in
the greater picture of things. 

Why not recommend people to use lowercase identifiers instead, since we're
changing everything into lowercase anyway? Or perhaps go a bit further and
remove the lowercasing code alltogether, since I don't see any real gain. If
the strings / filenames should just match exactly, things will get a lot more
predictable?

Gr.

Matthijs

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2009-08-26  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26  8:52 Matthijs Kooijman [this message]
2009-08-26  9:11 ` Hans Hagen
2009-08-26  9:37   ` Matthijs Kooijman
2009-08-26  9:47     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090826085257.GP12901@katherina.student.utwente.nl \
    --to=matthijs@stdin.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).