Observe how after the interlinear gloss I have to insert [''] -- otherwise, the quote continues (and in textmate4 the rest of the text is colored accordingly). Is there some way to resolve this without putting the [''] at the end?


\ex {\glll ``Um ch'aqitumpiw     \\
\{u-m(a)    ch'aq(u)-itu-mpi-w(a)    \\
that-\textsc{cp}    brain-\textsc{dm.masc-com-decl} \\}

\sn{\glll zanq't'ast''  qow ``[sumitr]_{pp}''. \\
  zanq'(a)-t'a-s(i)-t       q(e)-o-w(a)     \emph{sumit}-r(i)\}\\
  eat-\textsc{m-refl-1sim}  say-\textsc{3sim-decl}  summit-\textsc{all}\\
\glt `{}``Thus with a bit of brains, I ate'', he said, ``[on the summit]_{pp}.''' [FBV5.52A]}

  • I'm not sure I understand your problem. This compiles fine without the final '' so I don't understand by your saying that the quote continues. Is there a problem with the output or just with the syntax colouring in Textmate?
    – Alan Munn
    Jul 1 '13 at 5:23
  • Compiling is indeed fine -- but TextMate believes that without those end quotes, the entirety of what remains of my text is a giant quote. This is not just aesthetic -- in the following text, it makes it impossible to see what is an authentic quote and what is not.
    – Teusz
    Jul 1 '13 at 5:44
  • 3
    So this is a problem with the editor. Quote matching isn't trivial, so it's not too surprising that it can get confused. You could avoid the problem by using the csquotes package and use \enquote{<text>} instead of actual quotation marks. See for example Automatically convert quotations in the form of "abc" to become ``abc".
    – Alan Munn
    Jul 1 '13 at 6:04
  • Also, how is this problem related to linguistics or gb4e? Presumably the problem will arise in any environment that splits across lines no?
    – Alan Munn
    Jul 1 '13 at 6:04
  • 1
    The best way to cope with the problem would be to disable the highlighting of quoted material, which I find disturbing in general. Unfortunately, TextMate's interface to syntax highlighting is not “friendly”; “daunting” might be a better description.
    – egreg
    Jul 1 '13 at 9:02

This is problem with your editor (TextMate), and the way it does (or doesn't do) quote matching for syntax highlighting. Your problem is with quotes, and quote matching is hard, especially given the fact that TextMate's syntax highlighting is based on regular expression matching. Changing the rules for the highlighting in TextMate doesn't seem trivial, so perhaps the simplest way to do this is to give your quoted material in glosses at least proper LaTeX markup. You can do this using the csquotes package, See for example:

If you are interested in trying to fix this in TextMate, Stackoverflow has a number of TextMate questions on syntax highlighting, and so asking a question there might also get you some help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.