From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36991 Path: news.gmane.org!not-for-mail From: Peter Schorsch Newsgroups: gmane.comp.tex.context Subject: Re: currentheadnumber / doif.. problem Date: Tue, 16 Oct 2007 00:01:46 +0200 Message-ID: <200710160001.46785.tralalas@freenet.de> References: <200709101309.09374.tralalas@freenet.de> <200709252142.28518.tralalas@freenet.de> Reply-To: tralalas@freenet.de, mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_KN+EHArdiW6FMCC" X-Trace: ger.gmane.org 1192490603 5741 80.91.229.12 (15 Oct 2007 23:23:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2007 23:23:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 16 01:23:12 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IhYh3-0006tv-Tk for gctc-ntg-context-518@m.gmane.org; Tue, 16 Oct 2007 00:45:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0F7BE1FB01; Tue, 16 Oct 2007 00:45:42 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11700-02-3; Tue, 16 Oct 2007 00:45:41 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5C57E1FB55; Tue, 16 Oct 2007 00:07:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50DCF1FAC0 for ; Tue, 16 Oct 2007 00:07:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09773-10 for ; Tue, 16 Oct 2007 00:07:19 +0200 (CEST) Original-Received: from mout2.freenet.de (mout2.freenet.de [195.4.92.92]) by ronja.ntg.nl (Postfix) with ESMTP id 3BF1A1FBE8 for ; Tue, 16 Oct 2007 00:03:13 +0200 (CEST) Original-Received: from [195.4.92.16] (helo=mx6.freenet.de) by mout2.freenet.de with esmtpa (Exim 4.68) (envelope-from ) id 1IhY1k-00084x-Ih for ntg-context@ntg.nl; Tue, 16 Oct 2007 00:03:08 +0200 Original-Received: from [91.64.14.232] (port=57671 helo=henning.mobil.haeske.com) by mx6.freenet.de with esmtpsa (ID tralalas@freenet.de) (TLSv1:AES256-SHA:256) (port 25) (Exim 4.68 #6) id 1IhY1k-0000dy-Gr for ntg-context@ntg.nl; Tue, 16 Oct 2007 00:03:08 +0200 User-Agent: KMail/1.9.7 In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:36991 Archived-At: --Boundary-00=_KN+EHArdiW6FMCC Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Aditya wrote: > Can you create a minimum example to play with? I attached the module t-pararef.tex and the example pararef-test.tex. The r= ef1=20 is still wrong.=20 When I replace \currentheadnumber in \paragraphMark with the before defined= =20 \presentheadnumber =A0context is saying that a =ABMissing control sequence= =20 inserted=BB - but I don't see any mistake there (but there must be)... But finally I only want that the ref1 in the example is also working (see a= t=20 the end of example file). A second questions: why is the paragraph of ref3 in the example indented? Thanks, P. --Boundary-00=_KN+EHArdiW6FMCC Content-Type: text/x-tex; charset="iso-8859-1"; name="pararef-test.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pararef-test.tex" \usemodule[pararef] \starttext \chapter{first heading} \section{hamha} \startparagraph\paragraphMark[ref1]\paragraphHeading{tztzttzt} blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopparagraph \startparagraph blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopparagraph \section[ref2]{dumdidim} \startparagraph blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopparagraph \chapter{first heading} \startparagraph blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopparagraph \startparagraph\paragraphHeading{heuho} blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopparagraph \startparagraph\paragraphMark[ref3] blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopparagraph ref1 should be: para. 1.1/2 and is: \crossref{para.}[ref1] ref2 should be: sec. 1.2 and is: \crossref{sec.}[ref2] ref3 should be: para. 2/3 and is: \crossref{para.}[ref3] \stoptext --Boundary-00=_KN+EHArdiW6FMCC Content-Type: text/x-tex; charset="iso-8859-1"; name="t-pararef.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="t-pararef.tex" \startmodule[pararef] \unprotect % variable and functions % % paragraphNumber running number starts at every heading with 1 % % paragraphMark[] Marks the paragraph to make references to it % tmpparagraphMark{}[] replaces temporary paragraphMark until % presentheadnumber is working % getParagraphNumber Writes paragraphNumber (for itmize-enviorement % startParagraph Starts and stops a paragraph % stopParagraph % paragraphHeading{} Defines the margin-heading of that paragraph % crossref{}[] common command for internal references \definenumber[paragraphNumber] \setuphead[chapter,section,subsection,subsubsection][after={\resetnumber[paragraphNumber]}] \def\presentheadnumber {\doifelse{\headnumber[section]}{0}% {\headnumber[chapter]}% {\headnumber[section]}% } \def\paragraphMark[#1] {\expanded{\textreference[#1]{\presentheadnumber/\getnumber[paragraphNumber]}}} \define\getParagraphNumber {\incrementnumber[paragraphNumber]% \inothermargin{\color[grey]% {\tfx\getnumber[paragraphNumber]~}} } \definestartstop[paragraph] [before= {\blank[medium]\incrementnumber[paragraphNumber]% \inothermargin{\color[grey]% {\tfx\getnumber[paragraphNumber]~}}}, after={\blank[medium]}] \def\paragraphHeading#1% {\inmargin{#1}% } \def\crossref#1[#2]% {\color[grey]{#1 \in[#2]}% } \protect \stopmodule \endinput --Boundary-00=_KN+EHArdiW6FMCC Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --Boundary-00=_KN+EHArdiW6FMCC--