mailing-list for TeXmacs Users

Text archives Help


[TeXmacs] How do I create a multi-argument macro?


Chronological Thread 
  • From: Karl Hegbloom <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: [TeXmacs] How do I create a multi-argument macro?
  • Date: Tue, 28 Feb 2012 15:13:56 -0700
  • Authentication-results: spamcheck-ng1.citic74.net; dkim=pass (1024-bit key) header.i=@gmail.com; dkim-asp=none
  • Authentication-results: mr.google.com; spf=pass (google.com: domain of address@hidden designates 10.152.135.198 as permitted sender) smtp.mail=address@hidden; dkim=pass header.i=address@hidden

I tried to create a multi-argument macro for abstracting legal statute citations. I want to enter something like \UTStatute Tab 78B Tab 7 Tab 115 Tab 3 Enter, and see 78B-7-115(3) in the document, and as I enter it, see <UTStatute|78B|7|115|3>. The thing is though, that I want to also be able to enter only the 78B, or the 78b-7, out to Title, Chapter, Section, Paragraph, SubLevel-1, SubLevel-2, SubLevel-3.

What I managed to get was the Title typeset, then it won't let me enter additional arguments. I think it needs to test for whether an argument has  a value or not, since if it's an empty string, nothing should appear there; and if Section is not defined, there cannot be Paragraph or any sublevels.

Hypothetically, the expansion could contain labels or links, but for now, only the special formatting in terms of adding the parentheses and italics for sub-level letters.




Archive powered by MHonArc 2.6.19.

Top of page