From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 66e948c4 for ; Tue, 2 Oct 2018 07:19:06 -0500 (EST) Date: Tue, 2 Oct 2018 07:19:06 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 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. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-Id: <381bc5b72d2b0eb7@fantadrom.bsd.lv> 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 @@ NNAAMMEE oovveerr--pprreecceeddeennccee - precedence of the fraction operator DDEESSCCRRIIPPTTIIOONN - initial text 1 + _x + (_x^2)/2 + (_x^3)/(2 * 3); _a^/_c~; aa/cc; sqrt(_a)/sqrt(_c) - final text + initial text 1 + _x + (_x^2)/2 + (_x^3)/(2 * 3); _a^/_c~; aa/cc; + (_a)/(_c) 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 @@ NNAAMMEE uunnaarryy--ssqqrrtt - square root DDEESSCCRRIIPPTTIIOONN - initial text _r = sqrt(_x^2 + _y^2) + sqrt(_a + _b) + sqrt(_x^) + sqrt() + sqrt - final text + initial text _r = (_x^2 + _y^2) + (_a + _b) + (_x^) + + () + final text OpenBSD July 6, 2017 OpenBSD -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv