* Any linguists (or other gb4e/linguex users) on this list?
@ 2014-02-21 19:49 Richard Lawrence
2014-02-25 4:37 ` Aaron Ecay
0 siblings, 1 reply; 3+ messages in thread
From: Richard Lawrence @ 2014-02-21 19:49 UTC (permalink / raw)
To: emacs-orgmode
Hi Org folks,
I am wondering if anyone on this list uses the gb4e or linguex packages
in LaTeX documents that they export from Org.
I have been working on an export backend derived from the LaTeX exporter
to allow exporting ordinary Org lists as linguistics examples formatted
by one of these two packages. For example, a list like:
#+ATTR_LATEX: :environment gb4e-exe
1) This is an example sentence. <<s:example>>
2) * This ungrammatical sentence! <<s:ungrammatical>>
would be exported as:
\begin{exe}
\ex[ ]{This is an example sentence.} \label{s:example}
\ex[*]{This ungrammatical sentence!} \label{s:ungrammatical}
\end{exe}
This allows typing your examples using Org's nicer syntax, and referring
to them using Org links.
The backend is still in very early stages (it doesn't support linguex
yet, for example, nor have I tested it with glosses), but it supports
simple gb4e examples, including nested lists. If anyone else is
interested in this, I can try to package it up in a form that could be
shared or put in org-contrib. Let me know!
--
Best,
Richard
(If possible, please encrypt your reply to me using my PGP key:
Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646.
See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Any linguists (or other gb4e/linguex users) on this list?
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
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Ecay @ 2014-02-25 4:37 UTC (permalink / raw)
To: Richard Lawrence, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 127 bytes --]
Hi Richard,
This looks very interesting. I have created some code that uses tables
for glossed examples. So it turns this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-org, Size: 265 bytes --]
#+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 |
[-- Attachment #3: Type: text/plain, Size: 8 bytes --]
into:
[-- Attachment #4: Type: text/x-tex, Size: 290 bytes --]
\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
[-- Attachment #5: Type: text/plain, Size: 919 bytes --]
This uses the expex glossing package <http://www.ctan.org/pkg/expex>,
which I find to be the most flexible (despite also having some annoying
quirks, such as being targeted towards plain TeX use and thus not being
fully integrated with LaTeX conventions).
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.
2014ko otsailak 21an, Richard Lawrence-ek idatzi zuen:
[...]
>
> \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...
--
Aaron Ecay
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Any linguists (or other gb4e/linguex users) on this list?
2014-02-25 4:37 ` Aaron Ecay
@ 2014-02-25 6:16 ` Richard Lawrence
0 siblings, 0 replies; 3+ messages in thread
From: Richard Lawrence @ 2014-02-25 6:16 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-25 6:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.