[groff] 01/01: ChangeLog: Fix typos and oversights.
gbranden pushed a commit to branch master in repository groff. commit 28110d085f0478b423e80356d90f425c94e3aa83 Author: G. Branden Robinson AuthorDate: Tue Apr 16 12:10:48 2024 -0500 ChangeLog: Fix typos and oversights. --- ChangeLog | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd58b607d..e56b92eb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,7 @@ [gropdf] Problem with '(' and '\' (\[rs]) - Bpth these tokens have meaning for roff AND pdf strings. In + Both these tokens have meaning for roff AND pdf strings. In pdfs unbalanced parentheses have to be escaped (with '\') and a single '\' has to be similarly escaped, '\\'. It is gropdf's responsibility to ensure pdf strings are valid, no matter what @@ -12,8 +12,8 @@ If '\[rs](ul' is passed (i.e. '\(ul' is intended to become the UTF-16 string) \[rs] becomes '\' leaving '\(ul', which becomes '_', not what is intended. If the unbalanced '(' is - eascaped first, '\[rs]\(ul' which could become '\\_' when the - '\' is escaped, yielding '\_'. The code which escapes parenthesis + escaped first, '\[rs]\(ul' which could become '\\_' when the '\' + is escaped, yielding '\_'. The code which escapes parenthesis checks it is not already preceded by '\' since adding another would give you '\\(' which is not what you want. The correct output should be '\\\(ul' to achieve the correct pdf string. @@ -167,6 +167,10 @@ * font/devps/BMBI: * font/devps/BMI: * font/devps/BMR: + * font/devps/CB: + * font/devps/CBI: + * font/devps/CI: + * font/devps/CR: * font/devps/HB: * font/devps/HBI: * font/devps/HI: @@ -183,6 +187,7 @@ * font/devps/PBI: * font/devps/PI: * font/devps/PR: + * font/devps/S: * font/devps/TB: * font/devps/TBI: * font/devps/TI: @@ -277,7 +282,7 @@ 2024-03-23 G. Branden Robinson - [mdoc]: Add support for `MF` rendering option. in parallel with + [mdoc]: Add support for `MF` rendering option in parallel with groff man(7), and working much like the `HF` string. * tmac/doc.tmac (initialization): If the user specifies no `MF` @@ -593,8 +598,8 @@ more carefully. (main): Insist on an argument value of at least 2, since a hash table of size 1 is pointless. - (check_integer_arg): Try to be more robust in the fact of - C/C++'s notorious lax integer sizing practices. We might + (check_integer_arg): Try to be more robust in the face of + C/C++'s notoriously lax integer sizing practices. We might consider gnulib's "xstrtol" module. Promote `-h` argument validation errors to `fatal()`. Only perform a comparison against INT_MAX if LONG_MAX is larger than INT_MAX in the first ___ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit
[groff] 02/03: Problem with '(' and '\' (\[rs])
deri pushed a commit to branch master in repository groff. commit f336f8244b09191b16722984c33fc5addcc4a284 Author: Deri James AuthorDate: Tue Apr 16 17:34:59 2024 +0100 Problem with '(' and '\' (\[rs]) Bpth these tokens have meaning for roff AND pdf strings. In pdfs unbalanced parentheses have to be escaped (with '\') and a single '\' has to be similarly escaped, '\\'. It is gropdf's responsibility to ensure pdf strings are valid, no matter what the input. If '\(ul' is passed then the UTF-16 character becomes '_'. If '\[rs](ul' is passed (i.e. '\(ul' is intended to become the UTF-16 string) \[rs] becomes '\' leaving '\(ul', which if becomes '_', not what is intended. If the unbalanced '(' is eascaped first, '\[rs]\(ul' which could become '\\_' when the '\' is escaped, yielding '\_'. The code which escpes parenthesis checks it is not already preceded by '\' since adding another would give you '\\(' which is not what you want. The correct output should be '\\\(ul' to achieve the correct pdf string. This fixes the above issue (I hope). * src/devices/gropdf/gropdf.pl: Change pattern matches --- src/devices/gropdf/gropdf.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index 3ca187f69..5543b0f1f 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -1981,7 +1981,6 @@ sub Clean my $p=shift; $p=~s/\\c?$//g; -$p=~s/\\[eE]/\\/g; $p=~s/\\[ 0~t]/ /g; $p=~s/\\[,!"#\$%&’.0:?{}ˆ_‘|^prud]//g; $p=~s/\\'/\\[aa]/g; @@ -2004,6 +2003,7 @@ sub utf16 my $p=Clean(shift); my $label=shift; +$p=~s/\\\(rs|\\\[rs\]/\\E/g; $p=~s/\\\[(.*?)\]/FindChr($1,0)/eg; $p=~s/\\C($parcln)/FindChr($1,1)/eg; #$p=~s/\\\((..)/FindChr($1)/eg; @@ -2019,6 +2019,7 @@ sub utf16 $p=~s/(?https://lists.gnu.org/mailman/listinfo/groff-commit
[groff] 01/03: Another font with UTF-16 added to comment
deri pushed a commit to branch master in repository groff. commit 3cb502448b1de76036af7c143230ac11f7410bee Author: Deri James AuthorDate: Tue Apr 16 15:28:41 2024 +0100 Another font with UTF-16 added to comment * font/devps/S --- font/devps/S | 316 +-- 1 file changed, 158 insertions(+), 158 deletions(-) diff --git a/font/devps/S b/font/devps/S index ae8b3a902..e76b7bae2 100644 --- a/font/devps/S +++ b/font/devps/S @@ -19,189 +19,189 @@ spacewidth 250 charset space 250 0 32 space -! 333,672,17 3 33 exclam -fa 713,705 3 34 universal -# 500,673,16 3 35 numbersign +! 333,672,17 3 33 exclam -- 0021 +fa 713,705 3 34 universal -- 2200 +# 500,673,16 3 35 numbersign -- 0023 sh " -te 549,707 3 36 existential -% 833,655,36 3 37 percent -& 778,661,18 3 38 ampersand -st 439,500,17 3 39 suchthat -( 333,673,191 3 40 parenleft -) 333,673,191 3 41 parenright -** 500,551 3 42 asteriskmath -+ 549,533 3 43 plus +te 549,707 3 36 existential -- 2203 +% 833,655,36 3 37 percent -- 0025 +& 778,661,18 3 38 ampersand -- 0026 +st 439,500,17 3 39 suchthat-- 220B +( 333,673,191 3 40 parenleft -- 0028 +) 333,673,191 3 41 parenright -- 0029 +** 500,551 3 42 asteriskmath-- 2217 ++ 549,533 3 43 plus-- 002B pl " -, 250,104,152 3 44 comma -\- 549,288 3 45 minus +, 250,104,152 3 44 comma -- 002C +\- 549,288 3 45 minus -- 2212 mi " -. 250,95,17 3 46 period -/ 278,646,18 3 47 slash +. 250,95,17 3 46 period -- 002E +/ 278,646,18 3 47 slash -- 002F sl " -0 500,685,14 3 48 zero -1 500,673 3 49 one -2 500,685 3 50 two -3 500,685,14 3 51 three -4 500,685 3 52 four -5 500,690,14 3 53 five -6 500,685,14 3 54 six -7 500,673,16 3 55 seven -8 500,685,14 3 56 eight -9 500,685,18 3 57 nine -: 278,460,17 3 58 colon -; 278,460,152 3 59 semicolon -< 549,522 3 60 less -= 549,390 3 61 equal +0 500,685,14 3 48 zero-- 0030 +1 500,673 3 49 one -- 0031 +2 500,685 3 50 two -- 0032 +3 500,685,14 3 51 three -- 0033 +4 500,685 3 52 four-- 0034 +5 500,690,14 3 53 five-- 0035 +6 500,685,14 3 54 six -- 0036 +7 500,673,16 3 55 seven -- 0037 +8 500,685,14 3 56 eight -- 0038 +9 500,685,18 3 57 nine-- 0039 +: 278,460,17 3 58 colon -- 003A +; 278,460,152 3 59 semicolon -- 003B +< 549,522 3 60 less-- 003C += 549,390 3 61 equal -- 003D eq " -> 549,522 3 62 greater -? 444,686,17 3 63 question -=~ 549,475 3 64 congruent -*A 722,673 3 65 Alpha -*B 667,673 3 66 Beta -*X 722,673,0,0,9 3 67 Chi -*D 612,688 3 68 Delta -*E 611,673,0,6 3 69 Epsilon -*F 763,673 3 70 Phi -*G 603,673,0,6 3 71 Gamma -*Y 722,673,0,7 3 72 Eta -*I 333,673 3 73 Iota -+h 631,689,18 3 74 theta1 -*K 722,673 3 75 Kappa -*L 686,688 3 76 Lambda -*M 889,673 3 77 Mu -*N 722,673,8 3 78 Nu -*O 722,685,17 3 79 Omicron -*P 768,673 3 80 Pi -*H 741,685,17 3 81 Theta -*R 556,673,0,7 3 82 Rho -*S 592,673 3 83 Sigma -*T 611,673 3 84 Tau -ts 439,500,233 3 86 sigma1 -*W 768,688 3 87 Omega -*C 645,673 3 88 Xi -*Q 795,684 3 89 Psi -*Z 611,673,0,253 90 Zeta -[ 333,674,155 3 91 bracketleft +> 549,522 3 62 greater -- 003E +? 444,686,17 3 63 question--
[groff] 03/03: ... and the ChangeLog
deri pushed a commit to branch master in repository groff. commit 1cd6ed080ff026f0df1e213f4f93523120d54e94 Author: Deri James AuthorDate: Tue Apr 16 17:46:15 2024 +0100 ... and the ChangeLog --- ChangeLog | 24 1 file changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4ec2ff55a..fd58b607d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2024-04-16 Deri James + + [gropdf] Problem with '(' and '\' (\[rs]) + + Bpth these tokens have meaning for roff AND pdf strings. In + pdfs unbalanced parentheses have to be escaped (with '\') and + a single '\' has to be similarly escaped, '\\'. It is gropdf's + responsibility to ensure pdf strings are valid, no matter what + the input. + + If '\(ul' is passed then the UTF-16 character becomes '_'. + If '\[rs](ul' is passed (i.e. '\(ul' is intended to become the + UTF-16 string) \[rs] becomes '\' leaving '\(ul', which + becomes '_', not what is intended. If the unbalanced '(' is + eascaped first, '\[rs]\(ul' which could become '\\_' when the + '\' is escaped, yielding '\_'. The code which escapes parenthesis + checks it is not already preceded by '\' since adding another + would give you '\\(' which is not what you want. The correct + output should be '\\\(ul' to achieve the correct pdf string. + + This fixes the above issue (I hope). + + * src/devices/gropdf/gropdf.pl: Change pattern matches + 2024-04-15 G. Branden Robinson * tmac/an-ext.tmac : Trivially refactor. Rename string ___ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit
[groff] 01/03: tmac/an.tmac: Fix computation of bookmark level.
gbranden pushed a commit to branch master in repository groff. commit 29f5a0f6aa71ced1fa30ff373367d8ffe1cd3fb4 Author: Deri AuthorDate: Tue Apr 16 01:14:12 2024 +0100 tmac/an.tmac: Fix computation of bookmark level. [If this register's value is specified on the command line, don't clobber it. Adjust logic for assigning tag to the bookmark to the (possibly adjusted) base level accordingly. --GBR] --- tmac/an.tmac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tmac/an.tmac b/tmac/an.tmac index d9e8232f8..46934fd62 100644 --- a/tmac/an.tmac +++ b/tmac/an.tmac @@ -212,7 +212,7 @@ . .\" Customize this at the command line to, for example, group multiple .\" man pages within a collection or containing document. -.nr an*bookmark-base-level 0 +.nr an*bookmark-base-level \n[an*bookmark-base-level]+0 . .\" Write a bookmark/anchor/link target $2 at hierarchical depth $1. .de an*bookmark @@ -230,7 +230,8 @@ .ds an*bookmark*utf8 \" empty . .de an*bookmark*pdf -. ie (\\$1 = 1) \ +.nr an:lev \\n[an*bookmark-base-level]+1 +. ie (\\$1 = \\n[an:lev]) \ .pdfbookmark -T "\\$2" \\$1 \\$2 . el \ .pdfbookmark \\$1 \\$2 ___ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit
[groff] 03/03: tmac/an-ext.tmac : Trivially refactor.
gbranden pushed a commit to branch master in repository groff. commit 7ef1307ebdd06493cdec799ec26a3f4b4625f13a Author: G. Branden Robinson AuthorDate: Tue Apr 16 08:34:14 2024 -0500 tmac/an-ext.tmac : Trivially refactor. * tmac/an-ext.tmac : Rename string used to store URI hyperlink from `m1` to `mU`. --- ChangeLog| 5 + tmac/an-ext.tmac | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d5553bfc..4ec2ff55a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-04-15 G. Branden Robinson + + * tmac/an-ext.tmac : Trivially refactor. Rename string + used to store URI hyperlink from `m1` to `mU`. + 2024-04-15 G. Branden Robinson * tmac/an.tmac: Fix computation of bookmark level. If this diff --git a/tmac/an-ext.tmac b/tmac/an-ext.tmac index c8afeb53d..012f1a4f6 100644 --- a/tmac/an-ext.tmac +++ b/tmac/an-ext.tmac @@ -89,7 +89,7 @@ . .\" Prepare link text for mail/web hyperlinks. `MT` and `UR` call this. .de mV -. ds m1 \\$1\" +. ds mU \\$1\" .. . . @@ -98,7 +98,7 @@ .de mQ . mY . nh -<\\*(m1>\\$1 +<\\*(mU>\\$1 . hy \\n(mH .. . ___ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit
[groff] 02/03: tmac/an.tmac: Use more idiomatic *roff logic.
gbranden pushed a commit to branch master in repository groff. commit d92181a4244007a773517df3459be208db6ca1fa Author: G. Branden Robinson AuthorDate: Mon Apr 15 20:39:50 2024 -0500 tmac/an.tmac: Use more idiomatic *roff logic. Also don't introduce an unnecessary register. Annotate a future direction. --- ChangeLog| 8 tmac/an.tmac | 8 +--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index acbb91812..2d5553bfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-15 G. Branden Robinson + + * tmac/an.tmac: Fix computation of bookmark level. If this + register's value is specified on the command line, don't clobber + it. Adjust logic for assigning tag to the bookmark to the + {possibly adjusted} base level accordingly. Based on a patch by + Deri James. + 2024-04-05 G. Branden Robinson [troff]: Retire "el" warning category. diff --git a/tmac/an.tmac b/tmac/an.tmac index 46934fd62..3f6a295e9 100644 --- a/tmac/an.tmac +++ b/tmac/an.tmac @@ -212,7 +212,7 @@ . .\" Customize this at the command line to, for example, group multiple .\" man pages within a collection or containing document. -.nr an*bookmark-base-level \n[an*bookmark-base-level]+0 +.nr an*bookmark-base-level +0 . .\" Write a bookmark/anchor/link target $2 at hierarchical depth $1. .de an*bookmark @@ -229,9 +229,11 @@ .ds an*bookmark*ps \" empty .ds an*bookmark*utf8 \" empty . +.\" TODO: Construct a hierarchical tag name for (sub)section headings +.\" based on the page identifier (and for subsections, the parent +.\" section). .de an*bookmark*pdf -.nr an:lev \\n[an*bookmark-base-level]+1 -. ie (\\$1 = \\n[an:lev]) \ +. ie ((\\$1 - \\n[an*bookmark-base-level]) = 1) \ .pdfbookmark -T "\\$2" \\$1 \\$2 . el \ .pdfbookmark \\$1 \\$2 ___ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit