From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id a73a2fdf for ; Sun, 18 Jun 2017 19:04:28 -0500 (EST) Received: by mail-it0-f50.google.com with SMTP id m47so57599302iti.1 for ; Sun, 18 Jun 2017 17:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cathet-us.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:mime-version:content-id:date:message-id; bh=C7O1cT5G5TzPxeF6dBW5pwU8vm0f+psY1E+WOJGUdAE=; b=RyF/OAmTL0MfmeABv3IHksfGKEvZCmIZmS3QTu082+fLBV1aFMP5xGsB8HU8pnb7eV 8HnAmsE8YqthYgWFSdfOPEvKLysJcLXPZUXffRfwmaRYdyuxizUDftzjulQv814tAVEs qe/2u5NFH9kYsHkhoSlpDBboHmbZhWAnMScTwQSUVol/to1qFJsDpxgw0hwIgtpFHfFI btUlk/swE+laAWwWcdghh4AR4N+DG7nUjxCg82nBVpF7iJAqsa1hQRSN79NNFnRh1/Cw ss20Z4PmYcs7QtDn945Z8/13t48hw8g8n1GByiD1i2iSo+MKqi41FVQQEQcODBMGSQEl WKbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:mime-version:content-id :date:message-id; bh=C7O1cT5G5TzPxeF6dBW5pwU8vm0f+psY1E+WOJGUdAE=; b=iCpPa6K0up28gtexfsZYV3HH1KjvfnPQ7iQHKNMRrA6GaILZfLRiNY6OfvgVr8V/eH DdrgsaHZVfZ46mB8lKIvmgid3Iu2G3vC5+UMX8GegUf0wC953mEiqmGrrOBqOOOhkyyG Vf2FZ2CYGWmzl9ZcTbWndcW9+unNV6kyl4RY1/QQc1YpmZesudKskkAFdSD4xNCBwxBT LyxT9BHV1GqONedyDJ9CtpmyOvp79RgzI72klkEnfsdeN0W4FNwlqZ2bObXwwKh4DytS B0/3TZCDa2W5GmwuAtexpO2DJ3tcKkkWf/G139tyo3MHwkMRu7rq7/MUGKgFC6zwp8xg saeg== X-Gm-Message-State: AKS2vOwcmpdx/HXltYr8brdDlEvndBaLJbqQE8JN5aL80bTIndYXVOb2 nCKm7oTaXbI8x+/Y8lY= X-Received: by 10.36.139.1 with SMTP id g1mr8893049ite.18.1497830665578; Sun, 18 Jun 2017 17:04:25 -0700 (PDT) Received: from cathet.us. (75-161-15-69.albq.qwest.net. [75.161.15.69]) by smtp.gmail.com with ESMTPSA id z64sm4959332ioe.61.2017.06.18.17.04.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Jun 2017 17:04:24 -0700 (PDT) Sender: "Anthony J. Bentley" Received: from cathet.us (localhost [127.0.0.1]) by cathet.us. (OpenSMTPD) with ESMTP id 2e20a796 for ; Sun, 18 Jun 2017 18:04:23 -0600 (MDT) From: "Anthony J. Bentley" To: tech@mdocml.bsd.lv Subject: Rendering of math symbols in ASCII mode X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18504.1497830663.1@cathet.us> Date: Sun, 18 Jun 2017 18:04:23 -0600 Message-ID: <72240.1497830663@cathet.us> Hi, This beauty shows up in erf(3): .Bd -filled -offset indent .if n \{\ erf(x) = 2/sqrt(pi)*\|integral from 0 to x of exp(\-t*t) dt. \} .if t \{\ erf\|(x) := (2/\(sr pi)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \} .Ed My first instinct was to replace it with eqn(7), a pleasant way to write non-trivial equations: .EQ roman erf ( x ) = 2 over {sqrt pi} int sub 0 sup x e sup {- t sup 2} dt .EN This looks great in groff -Tpdf and mandoc -Thtml, and is serviceable enough in mandoc -Tutf8. Unfortunately, in ASCII it looks like this: erf ( x ) = 2/(sqrt(n)) I_0^x e^(- t^2) dt As per mandoc_char(7), the integral symbol is replaced with I and pi is replaced with n. Awful! While I'm inclined to think that attempting to render equations in pure ASCII is somewhat futile, the human-readable nature of eqn(7) suggests the possibility of simply displaying the symbol name for certain symbols like Greek letters and integrals. erf ( x ) = 2/(sqrt(pi)) int_0^x e^(- t^2) dt I think it compares favorably with the current rendering: erf(x) = 2/sqrt(pi)*integral from 0 to x of exp(-t*t) dt This would make it practical to use eqn(7) in certain libm manuals, which I think could be a nice improvement. Viewing the math-heavy libGL manuals on man.openbsd.org is a real pleasure. Thoughts? -- Anthony J. Bentley -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv