source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Render the eqn(7) "sqrt" function as U+221A in UTF-8 output.
@ 2018-10-02 12:19 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-10-02 12:19 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-02 12:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 12:19 mandoc: Render the eqn(7) "sqrt" function as U+221A in UTF-8 output schwarze

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).