From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78440 Path: news.gmane.org!not-for-mail From: Xiao-Yong Jin Newsgroups: gmane.comp.tex.context Subject: Re: metapost dashpattern (on 1) not shown in Mountain Lion Preview Date: Wed, 26 Sep 2012 09:57:14 +0900 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1348621049 19243 80.91.229.3 (26 Sep 2012 00:57:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Sep 2012 00:57:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 26 02:57:34 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TGfwT-000353-V1 for gctc-ntg-context-518@m.gmane.org; Wed, 26 Sep 2012 02:57:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 16D4A101E5; Wed, 26 Sep 2012 02:57: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 L-CDQdqvgw-V; Wed, 26 Sep 2012 02:57:24 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9CE63101EB; Wed, 26 Sep 2012 02:57:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DAE85101EB for ; Wed, 26 Sep 2012 02:57:22 +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 o8rF2-4pCTd5 for ; Wed, 26 Sep 2012 02:57:19 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 26EE7101E5 for ; Wed, 26 Sep 2012 02:57:19 +0200 (CEST) Original-Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8Q0vH7U002293 for ; Wed, 26 Sep 2012 02:57:18 +0200 Original-Received: by padfa10 with SMTP id fa10so33872pad.14 for ; Tue, 25 Sep 2012 17:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=wI9tLlt3s5CJC9y1aC2ejtx4bQQ8oDinkIhsAfK1VlQ=; b=f2yldwau8Oqw3bCsUdOjsJE5+GxuccmryCSlSSf8qMuG0bHBQuTUmUOxGLgbUn9Qeh 83NWE52nbcLIIPUHI4H7wAXSYS4l9DK8Q8ifJHtWrgci3SA2APAaggbepZeWigaYWFB1 Yge+TBRw7qRPT+hAWxZv1xcyciAlFHpkWHtT7nqz/k2vdESGF0UVpCryvo7YLU0ar34n 6nNJ8/X0ocFy7J5UzEdwO9uA2yyrowBqN3mmzVVpWY00Q8P8Zp72zInD9xYYLSIgfZ+j KCVgcXAtnkaTaYfhOG/0oXzPeKBLDxzlujMBcVmqMNGZBrwOZH9ftZkIV89mx+8n2aF3 f2MQ== Original-Received: by 10.68.218.132 with SMTP id pg4mr20536968pbc.100.1348621036423; Tue, 25 Sep 2012 17:57:16 -0700 (PDT) Original-Received: from [172.19.7.75] ([134.160.184.6]) by mx.google.com with ESMTPS id v9sm959889paz.6.2012.09.25.17.57.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 17:57:15 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1498) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NI3AVhcS - f45d52570d1e - 20120926 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78440 Archived-At: On Sep 25, 2012, at 5:45 PM, Mojca Miklavec wrote: > On Tue, Sep 25, 2012 at 7:28 AM, Xiao-Yong Jin wrote: >> >> Dear all, >> >> I just upgrade to Mountain Lion and found out that "dashed dashpattern (on >> 1)" no longer shows any line in Preview. The attached file is a snapshot of >> the Preview window showing the pdf file generated by the following code. >> >> \starttext >> \startMPpage >> >> draw unitsquare scaled 4cm dashed dashpattern (on 1cm off 1cm) ; >> draw unitsquare scaled 4cm shifted (5cm,0) dashed dashpattern (on 1cm) ; >> draw unitsquare scaled 4cm shifted (10cm,0) dashed dashpattern (off 1cm) ; >> >> setbounds currentpicture to boundingbox currentpicture enlarged 0.1cm ; >> \stopMPpage >> \stoptext >> >> You can see, from the attached file, that the unitsquare which was >> supposed to appear in the middle does not show up in the Preview window. >> However the same file is displayed correctly in Acrobat Reader. > > Awesome ;) > > Just curious: what do you get if you try to draw the same plots with > PostScript terminal in gnuplot? The PostScript terminal in gnuplot works fine. However, if I wrap the metapost code in my previous message with begin/endfig and run it with "mpost" to generate postscript, Preview does not show lines with "dashpattern (on 1)" either. >> I am not sure whether it is a context problem, or it is just a bug in >> Mountain Lion. I found out this issue when I saw that all the pdf files I >> previously generated with gnuplot context term are showing up incorrectly >> under the Preview after upgrading to Mountain Lion. I had to change the >> dash pattern in file "metapost/context/third/gnuplot/mp-gnuplot.mp", so the >> pdf generated by gnuplot context term can be viewed correctly with Preview >> under Mountain Lion. > > What modifications did you do exactly? I simply changed "on" to "off" for line type -2 and 0. > > It seems that "(on 1cm)" generates > [28.34645 0 ] 0 setdash > and "(off 1cm)" generates > [] 0 setdash > in PostScript file. > > What I had in mind when I was writing the code was for "(on 1cm)" to generate > [] 0 setdash > meaning a solid line. The other pattern "(off 1cm)" for linetype -3 is > described in gnuplot's README as follows: > An lt of -3 is solid and drawn with xor (for temporary interactive > annotations). > and I actually had no idea what to draw since PostScript cannot draw > XORed lines - I was most probably hoping to get an invisible line ;) > > Thinking again about it, different transparency models in PDF are > actually able to do some weird transformations (color subtraction > etc.), but I'm not sure if I could get what I want. > > Now, according to specification, the pattern > [28.34645 0 ] 0 setdash > should actually draw almost "a solid line", or, to be mathematically > precise, a line composed of 1cm long segments with zero-width gaps. > The difference might be evident when drawing semi-transparent lines > and linecaps might overlap. If you ask me, it's definitely a bug in > Mountain Lion's renderer if it doesn't draw the line. On the other > hand, it probably makes sense to patch MetaPost to generate "[] 0 > setdash" instead of "[ 0 ] 0 setdash" in case when it gets "(on > )" as an argument. But then again, the original code should > probably call dashpattern() without any argument to get solid lines. Simply call dashpattern() works as expected. > > The argument "(off 1cm)" is weird anyway (my "bug") and honestly I'm > not sure what would be the most appropriate behaviour in the eyes of > metapost. Maybe not drawing anything at all? Throwing an error? > Inserting "(on 0pt)" would be wrong as that actually draws dots. When > using "(off 1cm on 0cm)" it works as it should - it draws dots (when > using round linecaps). > > I believe the best course of actions would be: > - Filing a bug to Apple with a minimal EPS example. (I can try to > prepare one.) But that won't help anyway. I've filed several bug > reports and the only time when they replied was with asking if it was > fixed when it wasn't. And 4 years have passed since, nothing happened. > - I will replace "dashpattern(on 1cm)" with "dashpattern()" for > linetype 0 and -2 in mp-gnuplot.mp. Can you please confirm if that > works? > - After ConTeXt Meeting/EuroTeX is over, we could discuss with Taco > what MetaPost should do when it gets "(on 1cm)" or "(off 1cm)" as an > argument. If nothing else, the manual should clearly describe the > behaviour. Are you willing to open a ticket at > http://tracker.luatex.org? I'm not sure what to put in the ticket. I guess it is more appropriate if you can open a ticket, since you know the details of the matter. Best, Xiaoyong > Mojca > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________