Re: Metapost dashed evenly option affects lines in TeX labels -- possibly a bug?

"Daniel H. Luecking" <[email protected]> Fri, 7 Jun 2024 17:23:05 +0000
Newsgroups gmane.comp.tex.metapost
Message-ID <BY5PR04MB6344F40BA646FFFAEEC6F98CB9FB2@BY5PR04MB6344.namprd04.prod.outlook.com>
--===============1161545538457406770==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_BY5PR04MB6344F40BA646FFFAEEC6F98CB9FB2BY5PR04MB6344namp_"

--_000_BY5PR04MB6344F40BA646FFFAEEC6F98CB9FB2BY5PR04MB6344namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I first encountered this some years ago. The solution is to turn off unwant=
ed draw options when including a TeX formula that has rules in it (this inc=
ludes fraction bars).

The explanation: the btex...etex group creates a picture which, in your exa=
mple, contains a path that needs to be drawn (the fraction bar). When that =
occurs, the current draw options are used.

I seem to recall that some TeX rules are rendered in PostScript as filled r=
ectangles, but many are stoked paths with a particular pen size.

Cheers,

Daniel H. Luecking [[email protected]]
Department of Mathematical Sciences
1 University of Arkansas
Fayetteville, AR, USA 72701-1201
________________________________
From: metapost <[email protected]> on behalf of =
Vadim Radionov <[email protected]>
Sent: Friday, June 7, 2024 11:43 AM
To: [email protected] <[email protected]>
Subject: [metapost] Metapost dashed evenly option affects lines in TeX labe=
ls -- possibly a bug?

You don't often get email from [email protected]. Learn why this is =
important<https://aka.ms/LearnAboutSenderIdentification>
In texlive2023 this code results in dashed lines in the formula.

beginfig(1)
drawoptions(dashed evenly);
draw btex $\sqrt{22222} \displaystyle {1 \over 22222}$ etex;
endfig;
end

Best regards,
Vadim


--_000_BY5PR04MB6344F40BA646FFFAEEC6F98CB9FB2BY5PR04MB6344namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
I first encountered this some years ago. The solution is to turn off unwant=
ed draw options when including a TeX formula that has rules in it (this inc=
ludes fraction bars).</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
The explanation: the btex...etex group creates a picture which, in your exa=
mple, contains a path that needs to be drawn (the fraction bar). When that =
occurs, the current draw options are used.</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
I seem to recall that some TeX rules are rendered in PostScript as filled r=
ectangles, but many are stoked paths with a particular pen size.</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div class=3D"elementToProof" style=3D"font-family: &quot;Courier New&quot;=
, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id=3D"Signature">
<div style=3D"margin-right: 0px; margin-left: 0px; font-family: Tahoma; fon=
t-size: 13px;">
<span style=3D"font-family: Courier New; font-size: 16px;">Daniel H. Luecki=
ng [[email protected]]
<br>
Department of Mathematical Sciences<br>
1 University of Arkansas<br>
Fayetteville, AR, USA 72701-1201</span><br>
</div>
</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> metapost &lt;metapost=
[email protected]&gt; on behalf of Vadim Radionov &lt;va=
[email protected]&gt;<br>
<b>Sent:</b> Friday, June 7, 2024 11:43 AM<br>
<b>To:</b> [email protected] &lt;[email protected]&gt;<br>
<b>Subject:</b> [metapost] Metapost dashed evenly option affects lines in T=
eX labels -- possibly a bug?</font>
<div>&nbsp;</div>
</div>
<div>
<table border=3D"0" cellspacing=3D"0" cellpadding=3D"0" width=3D"100%" alig=
n=3D"left" style=3D"border:0; display:table; width:100%; table-layout:fixed=
; border-collapse:seperate; float:none">
<tbody style=3D"display:block">
<tr>
<td valign=3D"middle" width=3D"1px" bgcolor=3D"#A6A6A6" cellpadding=3D"7px =
2px 7px 2px" style=3D"padding:7px 2px 7px 2px; background-color:#A6A6A6">
</td>
<td valign=3D"middle" width=3D"100%" bgcolor=3D"#EAEAEA" cellpadding=3D"7px=
 5px 7px 15px" color=3D"#212121" style=3D"width:100%; background-color:#EAE=
AEA; padding:7px 5px 7px 15px; font-family:wf_segoe-ui_normal,Segoe UI,Sego=
e WP,Tahoma,Arial,sans-serif; font-size:12px; font-weight:normal; color:#21=
2121; text-align:left; word-wrap:break-word">
<div>You don't often get email from [email protected]. <a href=3D"ht=
tps://aka.ms/LearnAboutSenderIdentification">
Learn why this is important</a></div>
</td>
<td valign=3D"middle" align=3D"left" width=3D"75px" bgcolor=3D"#EAEAEA" cel=
lpadding=3D"7px 5px 7px 5px" color=3D"#212121" style=3D"width:75px; backgro=
und-color:#EAEAEA; padding:7px 5px 7px 5px; font-family:wf_segoe-ui_normal,=
Segoe UI,Segoe WP,Tahoma,Arial,sans-serif; font-size:12px; font-weight:norm=
al; color:#212121; text-align:left; word-wrap:break-word">
</td>
</tr>
</tbody>
</table>
<div>
<div dir=3D"ltr">
<div>In texlive2023 this code results in dashed lines in the formula.&nbsp;=
<br>
</div>
<div><br>
</div>
<div>beginfig(1)<br>
drawoptions(dashed evenly);<br>
draw btex $\sqrt{22222} \displaystyle {1 \over 22222}$ etex;<br>
endfig;<br>
end</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Vadim</div>
<div><br>
</div>
</div>
</div>
</div>
</body>
</html>

--_000_BY5PR04MB6344F40BA646FFFAEEC6F98CB9FB2BY5PR04MB6344namp_--

--===============1161545538457406770==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
http://tug.org/metapost/

--===============1161545538457406770==--