source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Render the eqn(7) "sqrt" function as U+221A in UTF-8 output.
Date: Tue, 2 Oct 2018 07:19:06 -0500 (EST)	[thread overview]
Message-ID: <381bc5b72d2b0eb7@fantadrom.bsd.lv> (raw)

Log Message:
-----------
Render the eqn(7) "sqrt" function as U+221A in UTF-8 output.
This also agrees with what groff does.
Suggested by an attendee of EuroBSDCon 2018 in Bucuresti.
Written on the plane Bucuresti-Frankfurt returning from EuroBSDCon.

Modified Files:
--------------
    mandoc:
        TODO
        eqn_term.c
    mandoc/regress/eqn/over:
        precedence.out_ascii
    mandoc/regress/eqn/unary:
        sqrt.out_ascii

Revision Data
-------------
Index: TODO
===================================================================
RCS file: /home/cvs/mandoc/mandoc/TODO,v
retrieving revision 1.270
retrieving revision 1.271
diff -LTODO -LTODO -u -p -r1.270 -r1.271
--- TODO
+++ TODO
@@ -209,9 +209,6 @@ are mere guesses, and some may be wrong.
 
 --- missing eqn features -----------------------------------------------
 
-- Use a Unicode character for sqrt() in eqn output?
-  Suggested by an attendee during EuroBSDCon 2018.
-
 - In a matrix, break the output line after each matrix line.
   Found in the discussion at CDBUG 2015.
   Suggested by Avi Weinstock.
@@ -396,7 +393,7 @@ are mere guesses, and some may be wrong.
 - table of content at the top of HTML (and perhaps ps/pdf) pages
   only if there are at least two (or three?) non-standard sections
   only if the new option -O toc is given
-  suggested by an attendee during EuroBSDCon 2018
+  suggested by Adam Kalisz during EuroBSDCon 2018
 
 - support -O man with two arguments, typically using the first for
   a local tree (like the release pages on mandoc.bsd.lv) and the
Index: eqn_term.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn_term.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Leqn_term.c -Leqn_term.c -u -p -r1.17 -r1.18
--- eqn_term.c
+++ eqn_term.c
@@ -106,7 +106,7 @@ eqn_box(struct termp *p, const struct eq
 	/* Special box types. */
 
 	if (bp->pos == EQNPOS_SQRT) {
-		term_word(p, "sqrt");
+		term_word(p, "\\(sr");
 		if (bp->first != NULL) {
 			p->flags |= TERMP_NOSPACE;
 			eqn_box(p, bp->first);
Index: precedence.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/eqn/over/precedence.out_ascii,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lregress/eqn/over/precedence.out_ascii -Lregress/eqn/over/precedence.out_ascii -u -p -r1.6 -r1.7
--- regress/eqn/over/precedence.out_ascii
+++ regress/eqn/over/precedence.out_ascii
@@ -4,7 +4,7 @@ N\bNA\bAM\bME\bE
      o\bov\bve\ber\br-\b-p\bpr\bre\bec\bce\bed\bde\ben\bnc\bce\be - precedence of the fraction operator
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     initial text 1 + _\bx + (_\bx^2)/2 + (_\bx^3)/(2 * 3); _\ba^/_\bc~; a\ba/c\bc; sqrt(_\ba)/sqrt(_\bc)
-     final text
+     initial text 1 + _\bx + (_\bx^2)/2 + (_\bx^3)/(2 * 3); _\ba^/_\bc~; a\ba/c\bc;
+     <sqrt>(_\ba)/<sqrt>(_\bc) final text
 
 OpenBSD                          July 6, 2017                          OpenBSD
Index: sqrt.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/eqn/unary/sqrt.out_ascii,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/eqn/unary/sqrt.out_ascii -Lregress/eqn/unary/sqrt.out_ascii -u -p -r1.5 -r1.6
--- regress/eqn/unary/sqrt.out_ascii
+++ regress/eqn/unary/sqrt.out_ascii
@@ -4,7 +4,7 @@ N\bNA\bAM\bME\bE
      u\bun\bna\bar\bry\by-\b-s\bsq\bqr\brt\bt - square root
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     initial text _\br = sqrt(_\bx^2 + _\by^2) + sqrt(_\ba + _\bb) + sqrt(_\bx^) + sqrt() + sqrt
-     final text
+     initial text _\br = <sqrt>(_\bx^2 + _\by^2) + <sqrt>(_\ba + _\bb) + <sqrt>(_\bx^) +
+     <sqrt>() + <sqrt> final text
 
 OpenBSD                          July 6, 2017                          OpenBSD
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2018-10-02 12:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=381bc5b72d2b0eb7@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).