From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67657 Path: news.gmane.org!not-for-mail From: Daniel Schopper Newsgroups: gmane.comp.tex.context Subject: dashed underbar Date: Tue, 05 Apr 2011 22:07:15 +0200 Message-ID: <4D9B7673.1090608@aon.at> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1302034058 8762 80.91.229.12 (5 Apr 2011 20:07:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2011 20:07:38 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 05 22:07:33 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 1Q7CXF-0003q6-9p for gctc-ntg-context-518@m.gmane.org; Tue, 05 Apr 2011 22:07:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A61AECABE8; Tue, 5 Apr 2011 22:07:32 +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 tDF+5HUYTlo8; Tue, 5 Apr 2011 22:07:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F1032CABDF; Tue, 5 Apr 2011 22:07:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2A20CCABDF for ; Tue, 5 Apr 2011 22:07: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 FYI5Mumr2BkW for ; Tue, 5 Apr 2011 22:07:16 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id C2C22CABD4 for ; Tue, 5 Apr 2011 22:07:16 +0200 (CEST) Original-Received: from email.aon.at (smtpout02.highway.telekom.at [195.3.96.113]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p35K7F9B001348 for ; Tue, 5 Apr 2011 22:07:16 +0200 Original-Received: (qmail 26687 invoked from network); 5 Apr 2011 20:07:15 -0000 Original-Received: from 178-190-46-218.adsl.highway.telekom.at (HELO Daniel-Schoppers-iMac.local) ([178.190.46.218]) (envelope-sender ) by smarthub93.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 5 Apr 2011 20:07:15 -0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=195.3.96.113; 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: 03ErU7fru - 74ecc1d24c9c - 20110405 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:67657 Archived-At: Dear all, I'm looking for a solution for dashed underlining. Hacking around I've come quite close, with the only problem that when the underlining begins at the start of a paragraph there gets an empty (grid) line inserted before it. See: \defineoverlay [backgraphics] [\positionoverlay{backgraphics}] \setupbackgrounds [page] [background={backgraphics}] \setupMPvariables[mpos:par][gridtype=1,gridshift=-0.5ex,gridwidth=0.1ex, gridcolor=black,fillcolor=white,linecolor=white] \newcount\dashulinecounter \dashulinecounter=1 \definestartstop[dashuline][before={\dostartdashuline},after={\dostopdashuline}] \def\dostartdashuline{% \startpositionoverlay{backgraphics}% \setMPpositiongraphic{b:uline:\the\dashulinecounter}{mpos:par}{self=uline:\the\dashulinecounter}% \stoppositionoverlay \fpos{uline:\the\dashulinecounter}% } \def\dostopdashuline{% \tpos{uline:\the\dashulinecounter}% \advance\dashulinecounter by 1% } \starttext No Line \startdashuline \dorecurse{20}{This is just a test. }\stopdashuline \par \startdashuline \dorecurse{20}{This is just a test. }\stopdashuline \stoptext I'm sure some of you know a simpler and more elegant solution that maybe allows even dotted underlining?! Or does anyone have a hint how to get rid of the empty line? Cheers, Daniel ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________