From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68545 Path: news.gmane.org!not-for-mail From: Daniel Schopper Newsgroups: gmane.comp.tex.context Subject: Re: endnotes/critical apparatus Date: Fri, 20 May 2011 20:23:07 +0200 Message-ID: <4DD6B18B.2050100@aon.at> References: <4DD53A7C.7010304@aon.at> <2294DB2C-3330-47F2-906D-8915444EAAA0@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1305915815 3633 80.91.229.12 (20 May 2011 18:23:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 May 2011 18:23:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 20 20:23:31 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QNUMC-0002VZ-Lt for gctc-ntg-context-518@m.gmane.org; Fri, 20 May 2011 20:23:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 00FBBCAD2D; Fri, 20 May 2011 20:23:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xQRH6-HvtuzN; Fri, 20 May 2011 20:23:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 38CE9CAD22; Fri, 20 May 2011 20:23:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 746A9CAD22 for ; Fri, 20 May 2011 20:23:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Wv2A5YKL3q4P for ; Fri, 20 May 2011 20:23:11 +0200 (CEST) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by balder.ntg.nl (Postfix) with ESMTP id AFB61CAD21 for ; Fri, 20 May 2011 20:23:11 +0200 (CEST) Original-Received: from email.aon.at (smtpout03.highway.telekom.at [195.3.96.115]) by filter4-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4KIN8fX019026 for ; Fri, 20 May 2011 20:23:10 +0200 Original-Received: (qmail 20022 invoked from network); 20 May 2011 18:23:08 -0000 Original-Received: from 178-190-46-29.adsl.highway.telekom.at (HELO Daniel-Schoppers-iMac.local) ([178.190.46.29]) (envelope-sender ) by smarthub94.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 20 May 2011 18:23:07 -0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <2294DB2C-3330-47F2-906D-8915444EAAA0@googlemail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=195.3.96.115; country=AT; latitude=47.3333; longitude=13.3333; http://maps.google.com/maps?q=47.3333,13.3333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04EJSn98K - c9b0daab34cd - 20110520 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:68545 Archived-At: Great! Thanks a lot, Wolfgang! Yet=85 I have some other questions: - What about a simplified \page inside the lemma (not really common, but = anyway=85)? Adding \appendtoks\def\page[#1]{}\to\simplifiedcommands is ignored. - How can I tweak the note mechanism to put the apparatus notes inside = one single paragraph, concatenated by some arbitrary separator (\quad or = -- or something similar)? (Eventually I=91d like the lemmatas which appear = on the same page to be grouped in a paragraph) - I guess it should be = somewhere in strc-not.mkiv but must have missed it=85 Thanks again for the effort! Daniel minimal example: \def\doifelsesamepagereference#1#2% {\doifelse {\doifreferencefoundelse{#1}{\currentreferencepage}{-}} {\doifreferencefoundelse{#2}{\currentreferencepage}{+}} } \define[2]\Apparatus {\ifdefined\ApparatusCounter \doglobal\increment\ApparatusCounter \else \doglobal\newcounter\ApparatusCounter \fi \pagereference[apparatus:startpage:\ApparatusCounter]% = \startline[apparatus:line:\ApparatusCounter]{#1}\stopline[apparatus:line:\A= pparatusCounter]% \pagereference[apparatus:stoppage:\ApparatusCounter] \expanded{ \endnote{ {\bf\at[apparatus:startpage:\ApparatusCounter]% = \noexpand\doifelsesamepagereference{apparatus:startpage:\ApparatusCounter}{= apparatus:stoppage:\ApparatusCounter}{}{-\at[apparatus:stoppage:\ApparatusC= ounter]}}% /\noexpand\inline{{}}[apparatus:line:\ApparatusCounter]~% {\noexpand\simplifycommands #1}]~{#2} } }% } \setuplinenumbering[ method=3Dpage, distance=3D0.3em ] \appendtoks\def\blackrule[#1]{}\to\simplifiedcommands \appendtoks \def\crlf{/}\to\simplifiedcommands \appendtoks \def\bf{}\to\simplifiedcommands \appendtoks \def\page[#1]{\textbar\textbar}\to\simplifiedcommands %\setuplabeltext[en][lines=3D,line=3D] \setupnote [endnote] [textcommand=3D\gobbleoneargument, command=3D\gobbleoneargument, n=3D2] \starttext \startlinenumbering That=92s a \Apparatus{\bf qui\crlf te \page long lemma}{That=92s a variant = reading=85}.\crlf And here comes \Apparatus{another one}{the second one}. \stoplinenumbering \placenotes[endnote] \stoptext Am 19.05.11 23:23, schrieb Wolfgang Schuster: > Am 19.05.2011 um 17:42 schrieb Daniel Schopper: > >> > Dear list, >> > I=92m fiddling around with a simple apparatus for critical editions w= ith endnotes. For now this is working ok - but I=92m wondering if somebody = could advise me on some aspects of it (see below). Here=92s a minimal examp= le: >> > >> > [=85] >> > >> > Now, this is obviously a really primitive approach (I=92m still learn= ing=85) which I=92d like to improve in some ways: >> > >> > - How can I get rid of the blackrule in the apparatus? >> > \noexpand\let\blackrule[#1]=3D\noexpand\relax >> > throws an error (You can't use `macro parameter character #' in verti= cal mode.) while >> > \noexpand\let\blackrule=3D\noexpand\relax >> > eliminates the rule but simply prints the arguments in the square bra= ckets. (Same holds true for every macro with arguments.) > You can use \simplifycommands, see my example below. > >> > - What to do if I=92d want to gobble \crlf or \par in the lemma while= using them as separators after each apparatus entry? I tried to \let them = to \relax, which ends in luatex getting stuck when it tries to import the .= en-file. >> > >> > - How could I reset gobbled commands like \bf to their original meani= ng (I=92d like to ignore \bf inside a lemma but still be able to have bold = page numbers at the beginning of the apparatus entry)? >> > >> > I=92m sure there are much more elegant ways to do this (probably in l= ua?), maybe someone could provide me with a hint where to start from? > You can use contexts own note mechanism to collect the data and place the= m later in your document. > > \define[2]\Apparatus > {\ifdefined\ApparatusCounter > \doglobal\increment\ApparatusCounter > \else > \doglobal\newcounter\ApparatusCounter > \fi > \pagereference[apparatus:page:\ApparatusCounter]% > \startline[apparatus:line:\ApparatusCounter]{#1}\stopline[apparatus:l= ine:\ApparatusCounter]% > \begingroup\simplifycommands > \expanded{\endnote{\at[apparatus:page:\ApparatusCounter]/\noexpand\in= line[apparatus:line:\ApparatusCounter]~{#1}]~{#2}}}% > \endgroup} > > \appendtoks\def\blackrule[#1]{}\to\simplifiedcommands > \appendtoks \def\crlf{}\to\simplifiedcommands > \appendtoks \def\bf{}\to\simplifiedcommands > > \setuplabeltext[en][lines=3D,line=3D] > > \setupnote > [endnote] > [textcommand=3D\gobbleoneargument, > command=3D\gobbleoneargument] > > \starttext > > \startlinenumbering > That=92s a \Apparatus{\bf lemma}{That=92s a variant reading=85}. \input t= ufte > > But then there=92s a blackrule \Apparatus{\blackrule[width=3D5cm]\crlf an= d a linebreak}{-- which we don=92t want to repeat in the apparatus.}. > \stoplinenumbering > > \placenotes[endnote] > > \stoptext > > Wolfgang > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to= the Wiki! > > maillist :ntg-context@ntg.nl /http://www.ntg.nl/mailman/listinfo/ntg-con= text > webpage :http://www.pragma-ade.nl /http://tex.aanhet.net > archive :http://foundry.supelec.fr/projects/contextrev/ > wiki :http://contextgarden.net > _________________________________________________________________________= __________ > ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________