emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
Subject: Re: Any linguists (or other gb4e/linguex users) on this list?
Date: Mon, 24 Feb 2014 22:16:51 -0800	[thread overview]
Message-ID: <87sir7ogx8.fsf@berkeley.edu> (raw)
In-Reply-To: 87r46rn6y2.fsf@gmail.com

Aaron Ecay <aaronecay@gmail.com> writes:

> This looks very interesting.  I have created some code that uses tables
> for glossed examples.  So it turns this:
>
> #+name: ex:ilurdotz
> #+header: :gloss yes
> #+header: :trans You carried me in the car.
> #+header: :cite /MVAV/ Southern High Navarre, p.\space{}160
> | zuek    | ekarri | n-ai-zue        | neri    | kotxe-an |
> | 2PL.ERG | bring  | 1SG-AUX-2PL.ERG | 1SG.DAT | car-LOC  |
>
> into:
>
> \ex
> \begingl
> \gla[] zuek ekarri n-ai-zue neri kotxe-an//
> \glb[] \textsc{2pl.erg} bring \textsc{1sg-aux-2pl.erg} \textsc{1sg.dat} car-\textsc{loc}//
> \glft ‘You carried me in the car.’ \trailingcitation{\emph{MVAV} Southern High Navarre, p.\ 160}//
> \endgl
> \label{ex:ilurdotz}
> \xe

Hmm, cool!  I don't actually have much use for glosses myself, but this
seems like a nice way to do this.  Did you have to define a derived
export backend to make this work?  Or are you able to do this using
filters?

> I also have some code for embedding syntax trees, which basically just
> passes them through to LaTeX (with some niceties such as translating
> #+caption to \caption{}).  I’ve been meaning to rewrite this for some
> time so that it compiles the trees to SVG to enable embedding into html.

That would also be nice.  If you feel like this code would be worth
packaging up, maybe we could put it together with mine in an
"org-linguistics" contrib package or some such.

>> \begin{exe}
>> \ex[ ]{This is an example sentence.} \label{s:example}
>> \ex[*]{This ungrammatical sentence!} \label{s:ungrammatical}
>> \end{exe}
>
> Does this work correctly when the \label is outside the brackets of the
> \ex?  I guess it must, but I was surprised...

Indeed it does.  Actually I assumed it /had/ to be outside, probably
because I misinterpreted a comment in the documentation that when you
have judgment brackets, ``in this case you have to indicate the scope of
the example itself with {...}'s''.  (This probably reveals my ignorance
about how LaTeX magically associates labels with what they label.) But
looking again, the gb4e documentation doesn't really make it clear
either way.  If it should go on the inside, that would actually simplify
my code a little bit.

I think it would be straightforward to extend what I've got to exporting
linguex examples, and possibly even expex examples (though I haven't
used that package myself).  Would that be useful to you?

Best,
Richard

      reply	other threads:[~2014-02-25  6:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 19:49 Any linguists (or other gb4e/linguex users) on this list? Richard Lawrence
2014-02-25  4:37 ` Aaron Ecay
2014-02-25  6:16   ` Richard Lawrence [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sir7ogx8.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).