Mailing List Archive

PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML mode.
Hello,

I wasn't sure if pushing this patch would be alright or not because of
the UTF-8 character embedded in it and whether it is acceptable or not.


>From 9b378b684a760a27031a05f0ba60fe3a6e8b3b90 Mon Sep 17 00:00:00 2001
From: Ben Kibbey <bjk@luxsci.net>
Date: Sun, 5 Nov 2023 15:53:19 -0800
Subject: [PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML
mode.

* doc/yat2m.c (proc_texi_cmd): Add "dots" to comamnd table and output
"..." in manpages and ellipsis in HTML mode.

Signed-off-by: Ben Kibbey <bjk@luxsci.net>
---
doc/yat2m.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/doc/yat2m.c b/doc/yat2m.c
index b5978e4..103e5ce 100644
--- a/doc/yat2m.c
+++ b/doc/yat2m.c
@@ -1314,6 +1314,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
{ "end", 4 },
{ "quotation",1, ".RS\n\\fB" },
{ "value", 8 },
+ { "dots", 0, "...", NULL, "…" },
{ NULL }
};
size_t n;
--
2.42.0


--
Ben Kibbey

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML mode. [ In reply to ]
Ben Kibbey wrote:
> Hello,
>
> I wasn't sure if pushing this patch would be alright or not because of
> the UTF-8 character embedded in it and whether it is acceptable or not.
>

If you are writing HTML, why not output the &hellip; character entity
instead of writing non-ASCII inline?


-- Jacob

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML mode. [ In reply to ]
On Sun, Nov 05, 2023 at 10:30:33PM -0600, Jacob Bachmeyer wrote:
> Ben Kibbey wrote:
> > Hello,
> >
> > I wasn't sure if pushing this patch would be alright or not because of
> > the UTF-8 character embedded in it and whether it is acceptable or not.
>
> If you are writing HTML, why not output the &hellip; character entity
> instead of writing non-ASCII inline?

Because the docs are generated from the same texinfo source; for manual
pages and HTML and texinfo.

--
Ben Kibbey

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML mode. [ In reply to ]
Ben Kibbey wrote:
> On Sun, Nov 05, 2023 at 10:30:33PM -0600, Jacob Bachmeyer wrote:
>
>> Ben Kibbey wrote:
>>
>>> Hello,
>>>
>>> I wasn't sure if pushing this patch would be alright or not because of
>>> the UTF-8 character embedded in it and whether it is acceptable or not.
>>>
>> If you are writing HTML, why not output the &hellip; character entity
>> instead of writing non-ASCII inline?
>>
>
> Because the docs are generated from the same texinfo source; for manual
> pages and HTML and texinfo.
>

Huh? Your patch as proposed contains an embedded UTF-8 ellipis,
presumably in a location such that it will only be used for
texinfo->HTML translation. Why not replace that string constant with
"&hellip;" for the @dots{} command in HTML output? Presumably plain
text output formats get the other "..." string which is three ASCII dots?


-- Jacob


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML mode. [ In reply to ]
Hello,

Support of @dots command is good.

I think that Jacob Bachmeyer suggests the change:

+ { "dots", 0, "...", NULL, "&hellip;" },

That is, using the character entity reference of &hellip; (defined by
HTML 4.0) for HTML output.

This would be better since it doesn't require output file to be UTF-8 by
the use of @dots. Also, the source code of yat2m.c is not required to
be processed correctly as UTF-8.
--

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: PATCH Libgpg-error] yat2m: Parse @dots{} to show ellipsis in HTML mode. [ In reply to ]
On Mon, Nov 06, 2023 at 08:22:20PM -0600, Jacob Bachmeyer wrote:
> Ben Kibbey wrote:
> > On Sun, Nov 05, 2023 at 10:30:33PM -0600, Jacob Bachmeyer wrote:
> > > Ben Kibbey wrote:
> > > > Hello,
> > > >
> > > > I wasn't sure if pushing this patch would be alright or not because of
> > > > the UTF-8 character embedded in it and whether it is acceptable or not.
> > > If you are writing HTML, why not output the &hellip; character entity
> > > instead of writing non-ASCII inline?
> >
> > Because the docs are generated from the same texinfo source; for manual
> > pages and HTML and texinfo.
>
> Huh? Your patch as proposed contains an embedded UTF-8 ellipis, presumably
> in a location such that it will only be used for texinfo->HTML translation.
> Why not replace that string constant with "&hellip;" for the @dots{} command
> in HTML output? Presumably plain text output formats get the other "..."
> string which is three ASCII dots?

Sorry, I misunderstood what you were saying before. Your right. Using
&hellip; is the way to go.

Thanks,

--
Ben Kibbey

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel