From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: reference grammar (was: unknown)
Date: Sun, 28 May 2023 20:28:27 +0000 [thread overview]
Message-ID: <ZHO5a8Yb1bpEHwja@localhost> (raw)
In-Reply-To: <CADAJKhDp12Y8yc8uzA75zL+Pe-3_G=8RKe_8t=CAkgB1QxUwpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Using both LaTeX and ConTeXt, I find that ConTeXt is worth the learning curve if you have specific typographic requirements. A good starting point is the “Not so short introduction to ConTeXt”, and then you can explore the various manuals and the wiki. However, a lot of commands are rather badly documented, so you will have to do experiments with them and read the source code. The mailing list and its archive are a good source of information too.
Regarding sorting, you may be interested in https://wiki.contextgarden.net/Command/definesorting. It is possible to add a language in the sorters.definitions Lua table via \directlua after https://source.contextgarden.net/tex/context/base/mkiv/sort-lan.lua (I just wrote a simple example, you can contact me privately if you are interested).
Le Sunday 28 May 2023 à 12:27:17PM, BPJ a écrit :
> First of all apologies for forgetting to put a subject on my original post!
>
> Den fre 26 maj 2023 00:20Rik <[1]amphiboly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
> On 2023-05-25 09:52, BPJ wrote:
> > (Apologies to those who get cross-posts of this — I hope to reach as
> > many as possible, and believe that there may be people here who have
> > relevant experience.)
> >
> > Hello everyone,
> >
> > I'm looking for advice from people who have used LaTeX, preferably
> > XeLaTeX but LuaLaTeX is interesting too,[1] to write a (“traditional”)
> > reference grammar (or even better an historical reference grammar), and
> > if so have you anything to share — code or pointers or examples? I will
> > almost certainly mesh LaTeX and Pandoc so experiences from handling the
> > issues mentioned below in that context are very welcome.
> >
> > I have tried to find something on CTAN but have come up empty handed,
> > and googling “write [natural language] reference grammar with LaTeX” has
> > proved useless.
> >
> > The first feature I will need is section numbers — “§ 42” style — which
> are
> >
> > - in the left margin against a paragraph;
> > - possible to reference with links in the PDF;
> > - preferably using a label since the actual numbers may be subject to
> > change when adding/moving around parts;
> > - with running § numbers (of first § on left page and (preferably)
> > last § on right page) in the page headers;
> > - independent of chapter/heading structure: a § number/label stands
> > against a paragraph rather than a heading, and naturally a paragraph may
> > or may not have one;
> > - possibile to have indices — index rerum and index verborum for
> > multiple languages — referring to § numbers rather than pages.
> >
> > So I think that more generally this is about
> >
> > - custom label/reference categories;
> > - custom counters;
> > - getting things into the (left) margin flush with the top of a
> paragraph;
> > - getting custom things (involving counters) into page headers;
> > - custom index formats, specifically indices referencing other numbers
> > than page numbers.[2]
> >
> > I fully expect to have to set up most of this myself, and am willing to
> > write external scripts to deal with aspects of it — preferred language
> > Perl (which I have been using since the mid nineties) and I’m able and
> > willing to use PerlTeX if convenient, since I’m a far better Perl than
> > TeX programmer, although getting a grip on LaTeX solutions would be
> > wonderful! :-) I also have Lua experience but as I'm using above-ASCII
> > Unicode a lot Lua may be less useful. FWIW I have a good grip on how to
> > do Unicode-aware/custom-order sorting in Perl and I have even written
> > (slow) code to do Unicode-aware/custom-order sorting in Lua.
> >
> > [1] This involves needing to use system fonts and Unicode/UTF-8 encoded
> > text using multiple scripts. Mostly Latin, IPA, Greek and some Cyrillic,
> > but using some “exotic” Latin letters and combining marks.
> >
> > [2] This looks relevant: <[2]https://tex.stackexchange.com/a/63674/93534
> > <[3]https://tex.stackexchange.com/a/63674/93534>>. Using memoir seems to
> > be a good idea anyway.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to
> > [4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > <mailto:[5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> > To view this discussion on the web visit
> > [6]https://groups.google.com/d/msgid/pandoc-discuss/
> CADAJKhBggA8DZjkoC%3Dm7GvWRK-PdG-eDByP03tE47znBY4qOiw%40mail.gmail.com <[7]
> https://groups.google.com/d/msgid/pandoc-discuss/
> CADAJKhBggA8DZjkoC%3Dm7GvWRK-PdG-eDByP03tE47znBY4qOiw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.
>
>
>
> I believe that ConTeXt can handle all of these requirements. Refer to
> \definelabel and related for the first three requirements,
> \definemarking and related for the next, and register subentries for the
> last (see [8]https://www.mail-archive.com/ntg-context-wvrSQK3plZs@public.gmane.org/msg74028.html)
> for more on that.
>
>
> That looks promising, if it is worth the learning curve since there are a
> number of LaTeX packages which I already rely on which may not have a ready
> ConTeXt equivalent. How hard would it be to define a sort order for a new
> script, perhaps wholly or partly located in the/a PUA?
>
>
>
> --
> Rik
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [9]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [10]https://groups.google.com/d/
> msgid/pandoc-discuss/u4omtu%24jj4%241%40ciao.gmane.io.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [12]https://groups.google.com/d/msgid/
> pandoc-discuss/
> CADAJKhDp12Y8yc8uzA75zL%2BPe-3_G%3D8RKe_8t%3DCAkgB1QxUwpQ%40mail.gmail.com.
>
> References:
>
> [1] mailto:amphiboly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [2] https://tex.stackexchange.com/a/63674/93534
> [3] https://tex.stackexchange.com/a/63674/93534
> [4] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [5] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [6] https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBggA8DZjkoC%3Dm7GvWRK-PdG-eDByP03tE47znBY4qOiw%40mail.gmail.com
> [7] https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBggA8DZjkoC%3Dm7GvWRK-PdG-eDByP03tE47znBY4qOiw%40mail.gmail.com?utm_medium=email&utm_source=footer
> [8] https://www.mail-archive.com/ntg-context-wvrSQK3plZs@public.gmane.org/msg74028.html
> [9] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [10] https://groups.google.com/d/msgid/pandoc-discuss/u4omtu%24jj4%241%40ciao.gmane.io
> [11] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [12] https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDp12Y8yc8uzA75zL%2BPe-3_G%3D8RKe_8t%3DCAkgB1QxUwpQ%40mail.gmail.com?utm_medium=email&utm_source=footer
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ZHO5a8Yb1bpEHwja%40localhost.
prev parent reply other threads:[~2023-05-28 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 13:52 (unknown) BPJ
[not found] ` <CADAJKhBggA8DZjkoC=m7GvWRK-PdG-eDByP03tE47znBY4qOiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-05-25 22:19 ` (unknown) Rik
2023-05-28 10:27 ` reference grammar (was: unknown) BPJ
[not found] ` <CADAJKhDp12Y8yc8uzA75zL+Pe-3_G=8RKe_8t=CAkgB1QxUwpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-05-28 20:28 ` Bastien DUMONT [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZHO5a8Yb1bpEHwja@localhost \
--to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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.
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 NNTP newsgroup(s).