[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Double quotes
From: |
Thorsten Seitz |
Subject: |
Re: Double quotes |
Date: |
08 May 2002 14:36:56 +0200 |
Not long ago I wrote two function for quotes which are used like that:
@Q { quoted text }
@SQ { single quoted text }
though I have to admit that this is a bit unwieldy compared to just
typing "quoted text" (especially on a german keyboard where the braces
need the AltGr modifier key... :-).
For compensation they have the following useful properties:
The functions check for English/German to select the correct quotes
(this should be generalized).
Furthermore there is a setting which selects french quotes (<<quoted
text>>) instead of normal quotes.
-Thorsten
# quotes
#
export
@FrenchQuotes @Q @SQ
def @QuoteSetup
named @FrenchQuotes { no } # use angled quotes (Guillemets
>>...<<)
instead of normal quotes
{
# quotation marks
def @OpeningQuote
{
@CurrLang @Case {
{ German Deutsch } @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guillemotright
else @Yield @Char quotedblbase
}
}
else @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guillemotleft
else @Yield @Char quotedblleft
}
}
}
}
def @ClosingQuote
{
@CurrLang @Case {
{ German Deutsch } @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guillemotleft
else @Yield @Char quotedblleft
}
}
else @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guillemotright
else @Yield @Char quotedblright
}
}
}
}
def @SingleOpeningQuote
{
@CurrLang @Case {
{ German Deutsch } @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guilsinglright
else @Yield @Char quotesinglbase
}
}
else @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guilsinglleft
else @Yield @Char quoteleft
}
}
}
}
def @SingleClosingQuote
{
@CurrLang @Case {
{ German Deutsch } @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guilsinglleft
else @Yield @Char quoteleft
}
}
else @Yield {
@FrenchQuotes @Case {
{ yes Yes } @Yield @Char guilsinglright
else @Yield @Char quoteright
}
}
}
}
def @Q
right x
{
@OpeningQuote{ x address@hidden
}
def @SQ
right x
{
@SingleOpeningQuote{ x address@hidden
}
}