From: "Idris Samawi Hamid" <ishamid@colostate.edu>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: substitutions
Date: Wed, 08 Oct 2008 09:43:16 -0600 [thread overview]
Message-ID: <op.uippyetnnx1yh1@ihamidnb.libarts.colostate.edu> (raw)
In-Reply-To: <6faad9f00810080746n613372e4v47a9566b8c3c7ffb@mail.gmail.com>
On Wed, 08 Oct 2008 08:46:21 -0600, Mojca Miklavec
<mojca.miklavec.lists@gmail.com> wrote:
> On Wed, Oct 8, 2008 at 2:41 PM, Idris Samawi Hamid ادريس سماوي حامد
> wrote:
>>
>> I would like to be able to do things like
>>
>> Mohamed -> Muḥammad
>>
>> which would save me a lot of time in proofreading, editing, etc.
>
> It's easy to write a simple ruby/perl(or even lua) script that will do
> such changes for you *before* typesetting articles. That's probably
> much better, since you also want to have clean sources at some point.
Yes, but the above is just one kind of example. Indeed, what I am thinking
of is just an extension of the kind of configurability texies like to do.
For your average user -- or a secretary -- we don't want to have to point
them to lua or ruby etc...
> Of course, writing the list of substitutions still needs to be done by
> you, but that's in either case.
>
> If you need that, write kind-of-specification how you would like to
> use such a command.
Maybe I misunderstand... I could see something like I mentioned in the
original mail
\definesubstitution{<string1>}{<string2>}
or even a database approach:
\definesubstitutions[
<string1>,<string1'>|
<string2>,<string2'>|
<string3>,<string3'>
]
Here is another example. I generally prefer an en-dash padded with spaces
-- and with a no-break space after -- to an em-dash for parenthetical
constructions. So I would like to do, eg
\definesubstitution{<emdash>}{ <endash>~}
Again, this saves time in extensive editing, and I can stay in TeX without
fiddling so much with scripting, CTRL-F/H/R etc. It maintains control in
case I change my mind and want to revert etc. For long documents and
projects this gets unwieldy pretty fast and I end up with lots of typos
etc.
I guess we could get really funky and add a regular expressions engine
using lua:
\definesubstitution[regex]{<string1>}{<string2>}
And I'm sure Hans, Taco, and other programmers can think of other nifty
macros...
But the basic functionality would suffice for now :-)
Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2008-10-08 15:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-05 23:57 substitutions Idris Samawi Hamid ادريس سماوي حامد
2008-10-07 10:53 ` substitutions Mojca Miklavec
2008-10-07 18:16 ` substitutions Hans Hagen
2008-10-08 12:41 ` substitutions Idris Samawi Hamid ادريس سماوي حامد
2008-10-08 14:46 ` substitutions Mojca Miklavec
2008-10-08 15:43 ` Idris Samawi Hamid [this message]
2008-10-08 22:53 ` substitutions Mojca Miklavec
2009-03-27 12:05 ` substitutions Khaled Hosny
2009-03-29 1:27 ` substitutions: can i send this? Idris Samawi Hamid ادريس سماوي حامد
2009-03-29 17:25 ` Khaled Hosny
2009-03-29 17:37 ` Hans Hagen
2008-10-08 12:34 ` substitutions Idris Samawi Hamid ادريس سماوي حامد
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=op.uippyetnnx1yh1@ihamidnb.libarts.colostate.edu \
--to=ishamid@colostate.edu \
--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).