lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quote characters in @RawVerbatim output


From: slomium
Subject: Re: Quote characters in @RawVerbatim output
Date: Wed, 5 Mar 2014 16:43:26 -0600

On Mon, Mar 3, 2014 at 3:54 PM, Valery Ushakov  wrote:
> On Mon, Mar 03, 2014 at 14:49:07 -0600, slomium wrote:
>
>> I'd like to change the output that Lout generates when using the
>> @RawVerbatim feature.  My expectation is that the output is identical to
>> the input, but this is not in fact the case for some characters.  Please
>> consider the following example:
>>
>> @SysInclude{doc}
>> @Document
>> //
>> @Text @Begin
>> @LP {Courier Base address@hidden @OneRow @RawVerbatim @Begin
>> ' is a different character in output
>> @End @RawVerbatim
>> @End @Text
>>
>> I expect ' to remain ' in output, but it's transformed into what I think is
>> a right single quote mark.  I'm writing documentation of shell commands and
>> the resulting Lout output is unsuitable for copying and pasting into a
>> terminal.
>
> @Verbatim only affects input.  Output is still affected by font's
> mapping and Courier is defined to use LtLatin1.LCM that uses
> quoteright glyph for '.
>
> To get ascii single quote in the output you need to define a new font
> with @FontDef (see Expert's Guide).  Copy LtLatin1.LCM to, say,
> LtASCII.LCM and edit it to use quotesingle for character 39 (')
> instead of quoteright.  Use that LCM file as the @Mapping of your font
> definition, say, CourierASCII, and use CourierASCII intead of Courier
> for your examples.

Thank you for your quick, thorough reply.  Your solution works great.

Here are the details on what I did.  I have Basser Lout Version 3.39
(September 2010)

I went to the file Latin1.LCM (not LtLatin1.LCM) and edited line 60 to
contain the following:
039    047    quotesingle

No additional changes were necessary.  In fontdefs.ld , Courier is the
only font family that uses Latin1.LCM so this is a clean way to go --
nothing else should be affected.

Would it make sense for Jeff to update Latin1.LCM to contain this
change?   My guess is that most people would, when using Courier,
expect to type character 39 (') and get character 39 in Lout output.

Thanks,
David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]