vile
[Top][All Lists]
Advanced

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

Re: [vile] vile, perl, TeX, bracket pairing


From: J. Chris Coppick
Subject: Re: [vile] vile, perl, TeX, bracket pairing
Date: Mon, 9 Feb 2015 18:56:12 -0600


If it really bugs you, you could workaround it by, for example,

   print '\x{7b}\tt This is typewriter font';

or

   print ' and this is more text in that font.\x{7d}',"\n';

More fun to read, but at least the braces match up.  You could create some function wrappers to make the code read a little cleaner...

   sub lbrace_prt ($str) {
      print "\x{7b}" . $str;
   }

   lbrace_prt('\tt This is typewriter font');

Long way to go just to bounce on the % key I suppose.  :-)

   Chris


On Mon, Feb 9, 2015 at 6:03 PM, <address@hidden> wrote:
So I've found an issue, and I'm sure the answer is "Too bad" but I
figured I'd ask anyway.

I have a Perl script whose purpose is to generate a TeX file.
Both Perl and TeX use curly-brackets { } for grouping things.

So I might have a construct like this:

if (something)
{
  print '{\tt This is typewriter font';
}
else
{
  print '{\bf This is boldface font';
}
print ' and this is more text in that font.}',"\n';

The two different uses for brackets will interfere with each other
when I try to use the % command to match my brackets into pairs.

I don't suppose there's anything to be done, where vile might (for example)
recognize the difference between a bracket inside a pair of quotation
marks and a bracket that is not inside a pair of quotation marks.

Like I said, I think I'm out of luck, but I thought I'd ask.

--hymie!    http://lactose.homelinux.net/~hymie    address@hidden

_______________________________________________
vile mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/vile


reply via email to

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