From: Ingo Schwarze Date: Fri, 17 Feb 2017 19:15:41 +0000 (+0000) Subject: Use typographic quotes rather than '"' for .Rs %T (no change for -Tascii X-Git-Tag: VERSION_1_14_1~7 X-Git-Url: https://git.cameronkatri.com/mandoc.git/commitdiff_plain/3f281dc275671e5aacae67a4e15dab02de264e7b Use typographic quotes rather than '"' for .Rs %T (no change for -Tascii output, of course). Patch from bentley@ in November 2014. This can be committed now because groff merged Anthony's patch yesterday. --- diff --git a/mdoc_man.c b/mdoc_man.c index 253dc7ce..88d39370 100644 --- a/mdoc_man.c +++ b/mdoc_man.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.103 2017/02/16 03:00:23 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.104 2017/02/17 19:15:41 schwarze Exp $ */ /* * Copyright (c) 2011-2017 Ingo Schwarze * @@ -717,8 +717,7 @@ pre__t(DECL_ARGS) if (n->parent && MDOC_Rs == n->parent->tok && n->parent->norm->Rs.quote_T) { - print_word(""); - putchar('\"'); + print_word("\\(lq"); outflags &= ~MMAN_spc; } else font_push('I'); @@ -732,8 +731,7 @@ post__t(DECL_ARGS) if (n->parent && MDOC_Rs == n->parent->tok && n->parent->norm->Rs.quote_T) { outflags &= ~MMAN_spc; - print_word(""); - putchar('\"'); + print_word("\\(rq"); } else font_pop(); post_percent(meta, n); diff --git a/mdoc_term.c b/mdoc_term.c index bc125f29..e9ea455a 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.345 2017/02/16 14:38:12 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.346 2017/02/17 19:15:41 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2017 Ingo Schwarze @@ -1714,6 +1714,8 @@ termp_quote_pre(DECL_ARGS) case MDOC_Bq: term_word(p, "["); break; + case MDOC__T: + /* FALLTHROUGH */ case MDOC_Do: case MDOC_Dq: term_word(p, "\\(Lq"); @@ -1728,7 +1730,6 @@ termp_quote_pre(DECL_ARGS) case MDOC_Pq: term_word(p, "("); break; - case MDOC__T: case MDOC_Qo: case MDOC_Qq: term_word(p, "\""); @@ -1771,6 +1772,8 @@ termp_quote_post(DECL_ARGS) case MDOC_Bq: term_word(p, "]"); break; + case MDOC__T: + /* FALLTHROUGH */ case MDOC_Do: case MDOC_Dq: term_word(p, "\\(Rq"); @@ -1787,7 +1790,6 @@ termp_quote_post(DECL_ARGS) case MDOC_Pq: term_word(p, ")"); break; - case MDOC__T: case MDOC_Qo: case MDOC_Qq: term_word(p, "\""); diff --git a/regress/mdoc/Rs/Makefile b/regress/mdoc/Rs/Makefile index 45fd8cb2..3732dc0a 100644 --- a/regress/mdoc/Rs/Makefile +++ b/regress/mdoc/Rs/Makefile @@ -1,6 +1,7 @@ # $OpenBSD: Makefile,v 1.7 2015/02/04 18:03:28 schwarze Exp $ REGRESS_TARGETS = allch args break empty three_authors +UTF8_TARGETS = allch break empty three_authors LINT_TARGETS = allch args empty # groff-1.22.3 defect: diff --git a/regress/mdoc/Rs/allch.out_utf8 b/regress/mdoc/Rs/allch.out_utf8 new file mode 100644 index 00000000..ddfbd7b0 --- /dev/null +++ b/regress/mdoc/Rs/allch.out_utf8 @@ -0,0 +1,21 @@ +RS-ALLCH(1) General Commands Manual RS-ALLCH(1) + +NNAAMMEE + RRss--aallllcchh – reference block using all supported child macros + +DDEESSCCRRIIPPTTIIOONN + reference on the same line: some _b_o_g_u_s text author name, “title of + article”, _b_o_o_k _t_i_t_l_e, _i_s_s_u_e_r _n_a_m_e, _j_o_u_r_n_a_l _n_a_m_e, report name, number of + journal, volume number, uniform resource locator, page number, + institutional author, city name, date of publication, optional + information. + +SSEEEE AALLSSOO + reference after a blank line: + + some _b_o_g_u_s text author name, “title of article”, _b_o_o_k _t_i_t_l_e, _i_s_s_u_e_r _n_a_m_e, + _j_o_u_r_n_a_l _n_a_m_e, report name, number of journal, volume number, uniform + resource locator, page number, institutional author, city name, date of + publication, optional information. + +OpenBSD July 7, 2014 OpenBSD diff --git a/regress/mdoc/Rs/break.out_utf8 b/regress/mdoc/Rs/break.out_utf8 new file mode 100644 index 00000000..0164c5c0 --- /dev/null +++ b/regress/mdoc/Rs/break.out_utf8 @@ -0,0 +1,19 @@ +RS-BREAK(1) General Commands Manual RS-BREAK(1) + +NNAAMMEE + RRss--bbrreeaakk – line break before reference start + +DDEESSCCRRIIPPTTIIOONN + reference on the same line: author, _j_o_u_r_n_a_l, 42. + +SSEEEE AALLSSOO + reference after a blank line: + + author, _j_o_u_r_n_a_l, 42. + +SSEEEE _A_L_S_O + reference after a blank line: + + author, _j_o_u_r_n_a_l, 42. + +OpenBSD April 15, 2014 OpenBSD diff --git a/regress/mdoc/Rs/empty.out_utf8 b/regress/mdoc/Rs/empty.out_utf8 new file mode 100644 index 00000000..419a5d90 --- /dev/null +++ b/regress/mdoc/Rs/empty.out_utf8 @@ -0,0 +1,14 @@ +RS-EMPTY(1) General Commands Manual RS-EMPTY(1) + +NNAAMMEE + RRss--eemmppttyy – empty reference blocks + +DDEESSCCRRIIPPTTIIOONN + initial text final text + +SSEEEE AALLSSOO + initial text + + final text + +OpenBSD February 4, 2015 OpenBSD diff --git a/regress/mdoc/Rs/three_authors.out_utf8 b/regress/mdoc/Rs/three_authors.out_utf8 new file mode 100644 index 00000000..72c10d6d --- /dev/null +++ b/regress/mdoc/Rs/three_authors.out_utf8 @@ -0,0 +1,9 @@ +RS-THREE_AUTHORS(1) General Commands Manual RS-THREE_AUTHORS(1) + +NNAAMMEE + RRss--tthhrreeee__aauutthhoorrss – listing three authors in a reference block + +AAUUTTHHOORRSS + kristaps, joerg, and ingo, _m_a_n_d_o_c. + +OpenBSD May 1, 2009 OpenBSD