* [PATCH] Provide papersize for refcard.dvi @ 2025-08-06 14:53 Vincent Lefevre 2025-08-06 15:33 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Vincent Lefevre @ 2025-08-06 14:53 UTC (permalink / raw) To: gdb-patches This patch provides papersize information for "refcard.dvi". Without this, xdvi uses the default papersize configured on the machine to display the dvi file; this may yield truncated output: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=461815;filename=refcard-dvi.png;msg=15 This patch fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461815 Other explanations are given at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461613 diff --git a/gdb/doc/refcard.tex b/gdb/doc/refcard.tex index 8a402620bcc..9628c1d20fe 100644 --- a/gdb/doc/refcard.tex +++ b/gdb/doc/refcard.tex @@ -100,6 +100,7 @@ \pdfpagewidth=\totalwidth % width of paper in pdf output \pdfpageheight=\totalheight % height of paper in pdf output \fi +\special{papersize=11in,8.5in} % for dvi output %------- end papersize params %% %% change according to personal taste, not papersize dependent ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 14:53 [PATCH] Provide papersize for refcard.dvi Vincent Lefevre @ 2025-08-06 15:33 ` Eli Zaretskii 2025-08-06 16:00 ` Vincent Lefevre 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2025-08-06 15:33 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gdb-patches > Date: Wed, 6 Aug 2025 16:53:04 +0200 > From: Vincent Lefevre <vincent@vinc17.net> > > This patch provides papersize information for "refcard.dvi". > Without this, xdvi uses the default papersize configured on > the machine to display the dvi file; this may yield truncated > output: > https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=461815;filename=refcard-dvi.png;msg=15 > > This patch fixes > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461815 > > Other explanations are given at > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461613 > > diff --git a/gdb/doc/refcard.tex b/gdb/doc/refcard.tex > index 8a402620bcc..9628c1d20fe 100644 > --- a/gdb/doc/refcard.tex > +++ b/gdb/doc/refcard.tex > @@ -100,6 +100,7 @@ > \pdfpagewidth=\totalwidth % width of paper in pdf output > \pdfpageheight=\totalheight % height of paper in pdf output > \fi > +\special{papersize=11in,8.5in} % for dvi output > %------- end papersize params > %% > %% change according to personal taste, not papersize dependent Thanks, but we need to bring some TeX and DVI expert on board. I wonder why GDB needs this whereas, for example, Emacs doesn't. Is there something fundamentally wrong with the GDB refcard? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 15:33 ` Eli Zaretskii @ 2025-08-06 16:00 ` Vincent Lefevre 2025-08-06 16:30 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Vincent Lefevre @ 2025-08-06 16:00 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches On 2025-08-06 18:33:13 +0300, Eli Zaretskii wrote: > Thanks, but we need to bring some TeX and DVI expert on board. I > wonder why GDB needs this whereas, for example, Emacs doesn't. Is > there something fundamentally wrong with the GDB refcard? That's strange, because I get exactly the same issue with Emacs. -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 16:00 ` Vincent Lefevre @ 2025-08-06 16:30 ` Eli Zaretskii 2025-08-06 16:47 ` Vincent Lefevre 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2025-08-06 16:30 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gdb-patches > Date: Wed, 6 Aug 2025 18:00:24 +0200 > From: Vincent Lefevre <vincent@vinc17.net> > Cc: gdb-patches@sourceware.org > > On 2025-08-06 18:33:13 +0300, Eli Zaretskii wrote: > > Thanks, but we need to bring some TeX and DVI expert on board. I > > wonder why GDB needs this whereas, for example, Emacs doesn't. Is > > there something fundamentally wrong with the GDB refcard? > > That's strange, because I get exactly the same issue with Emacs. How come? I regularly produce refcard.pdf for Emacs, and never saw any such problems. Do you perhaps have some unusual default definition of paper size? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 16:30 ` Eli Zaretskii @ 2025-08-06 16:47 ` Vincent Lefevre 2025-08-06 19:02 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Vincent Lefevre @ 2025-08-06 16:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches On 2025-08-06 19:30:52 +0300, Eli Zaretskii wrote: > > Date: Wed, 6 Aug 2025 18:00:24 +0200 > > From: Vincent Lefevre <vincent@vinc17.net> > > Cc: gdb-patches@sourceware.org > > > > On 2025-08-06 18:33:13 +0300, Eli Zaretskii wrote: > > > Thanks, but we need to bring some TeX and DVI expert on board. I > > > wonder why GDB needs this whereas, for example, Emacs doesn't. Is > > > there something fundamentally wrong with the GDB refcard? > > > > That's strange, because I get exactly the same issue with Emacs. > > How come? I regularly produce refcard.pdf for Emacs, and never saw > any such problems. Do you perhaps have some unusual default > definition of paper size? PDF is different from DVI. -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 16:47 ` Vincent Lefevre @ 2025-08-06 19:02 ` Eli Zaretskii 2025-08-06 22:28 ` Vincent Lefevre 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2025-08-06 19:02 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gdb-patches > Date: Wed, 6 Aug 2025 18:47:48 +0200 > From: Vincent Lefevre <vincent@vinc17.net> > Cc: gdb-patches@sourceware.org > > On 2025-08-06 19:30:52 +0300, Eli Zaretskii wrote: > > > Date: Wed, 6 Aug 2025 18:00:24 +0200 > > > From: Vincent Lefevre <vincent@vinc17.net> > > > Cc: gdb-patches@sourceware.org > > > > > > On 2025-08-06 18:33:13 +0300, Eli Zaretskii wrote: > > > > Thanks, but we need to bring some TeX and DVI expert on board. I > > > > wonder why GDB needs this whereas, for example, Emacs doesn't. Is > > > > there something fundamentally wrong with the GDB refcard? > > > > > > That's strange, because I get exactly the same issue with Emacs. > > > > How come? I regularly produce refcard.pdf for Emacs, and never saw > > any such problems. Do you perhaps have some unusual default > > definition of paper size? > > PDF is different from DVI. Doesn't PDF generation go through DVI? And if it doesn't, then why should we care about DVI nowadays? Anyway, I feel we should take this discussion to the Texinfo list, where we will find people who know about TeX and DVI much more than I do, and could give some useful advice. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 19:02 ` Eli Zaretskii @ 2025-08-06 22:28 ` Vincent Lefevre 2025-08-07 5:50 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Vincent Lefevre @ 2025-08-06 22:28 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches On 2025-08-06 22:02:27 +0300, Eli Zaretskii wrote: > Doesn't PDF generation go through DVI? No, nowadays, PDF is generated directly with pdfTeX. Only PostScript is generated through DVI. > And if it doesn't, then why should we care about DVI nowadays? Because the file is generated and installed. In the Makefile file: all-doc: info man dvi ps pdf html > Anyway, I feel we should take this discussion to the Texinfo list, > where we will find people who know about TeX and DVI much more than I > do, and could give some useful advice. I think that the Texinfo list is mainly about the Texinfo format and generation from this format. refcard.tex is in plain TeX. -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-06 22:28 ` Vincent Lefevre @ 2025-08-07 5:50 ` Eli Zaretskii 2025-08-07 9:05 ` Vincent Lefevre 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2025-08-07 5:50 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gdb-patches > Date: Thu, 7 Aug 2025 00:28:47 +0200 > From: Vincent Lefevre <vincent@vinc17.net> > Cc: gdb-patches@sourceware.org > > > Anyway, I feel we should take this discussion to the Texinfo list, > > where we will find people who know about TeX and DVI much more than I > > do, and could give some useful advice. > > I think that the Texinfo list is mainly about the Texinfo format > and generation from this format. refcard.tex is in plain TeX. That's true, but there are TeX experts there. If you know of a better place, we could discuss this there. I unfortunately don't know enough about this to make a decision about the right solution. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-07 5:50 ` Eli Zaretskii @ 2025-08-07 9:05 ` Vincent Lefevre 2025-08-07 9:55 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Vincent Lefevre @ 2025-08-07 9:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches On 2025-08-07 08:50:14 +0300, Eli Zaretskii wrote: > That's true, but there are TeX experts there. If you know of a better > place, we could discuss this there. I unfortunately don't know enough > about this to make a decision about the right solution. FYI, the TeX Users Group has mailing-lists: https://tug.org/mailman/listinfo texhax seems to be the one for general TeX questions. -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-07 9:05 ` Vincent Lefevre @ 2025-08-07 9:55 ` Eli Zaretskii 2025-08-08 16:15 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2025-08-07 9:55 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gdb-patches > Date: Thu, 7 Aug 2025 11:05:24 +0200 > From: Vincent Lefevre <vincent@vinc17.net> > Cc: gdb-patches@sourceware.org > > On 2025-08-07 08:50:14 +0300, Eli Zaretskii wrote: > > That's true, but there are TeX experts there. If you know of a better > > place, we could discuss this there. I unfortunately don't know enough > > about this to make a decision about the right solution. > > FYI, the TeX Users Group has mailing-lists: > > https://tug.org/mailman/listinfo > > texhax seems to be the one for general TeX questions. Thanks, posted a question there. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-07 9:55 ` Eli Zaretskii @ 2025-08-08 16:15 ` Eli Zaretskii 2025-08-08 17:25 ` Vincent Lefevre 0 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2025-08-08 16:15 UTC (permalink / raw) To: vincent; +Cc: gdb-patches > Date: Thu, 07 Aug 2025 12:55:20 +0300 > From: Eli Zaretskii <eliz@gnu.org> > Cc: gdb-patches@sourceware.org > > > Date: Thu, 7 Aug 2025 11:05:24 +0200 > > From: Vincent Lefevre <vincent@vinc17.net> > > Cc: gdb-patches@sourceware.org > > > > On 2025-08-07 08:50:14 +0300, Eli Zaretskii wrote: > > > That's true, but there are TeX experts there. If you know of a better > > > place, we could discuss this there. I unfortunately don't know enough > > > about this to make a decision about the right solution. > > > > FYI, the TeX Users Group has mailing-lists: > > > > https://tug.org/mailman/listinfo > > > > texhax seems to be the one for general TeX questions. > > Thanks, posted a question there. Given the responses there, can you post (and hopefully test) an improved patch? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-08 16:15 ` Eli Zaretskii @ 2025-08-08 17:25 ` Vincent Lefevre 2025-08-08 17:48 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Vincent Lefevre @ 2025-08-08 17:25 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1849 bytes --] On 2025-08-08 19:15:07 +0300, Eli Zaretskii wrote: > > Date: Thu, 07 Aug 2025 12:55:20 +0300 > > From: Eli Zaretskii <eliz@gnu.org> > > Cc: gdb-patches@sourceware.org > > > > > Date: Thu, 7 Aug 2025 11:05:24 +0200 > > > From: Vincent Lefevre <vincent@vinc17.net> > > > Cc: gdb-patches@sourceware.org > > > > > > On 2025-08-07 08:50:14 +0300, Eli Zaretskii wrote: > > > > That's true, but there are TeX experts there. If you know of a better > > > > place, we could discuss this there. I unfortunately don't know enough > > > > about this to make a decision about the right solution. > > > > > > FYI, the TeX Users Group has mailing-lists: > > > > > > https://tug.org/mailman/listinfo > > > > > > texhax seems to be the one for general TeX questions. > > > > Thanks, posted a question there. > > Given the responses there, can you post (and hopefully test) an > improved patch? Note: my old patch was based on what was done in PARI. I've attached a new patch. It still uses \ifx\pdfoutput\undefined because the suggested \ifnum\pdfoutput<1 gives an error. For dvi and pdf, I could not see any issue. For ps, I get with "make refcard.ps": DVIPS refcard.ps dvips: both landscape and papersize specified: ignoring landscape The dvips message is due to the "-t landscape" in the Makefile (from Makefile.in): refcard.ps : refcard.dvi $(ECHO_DVIPS) $(DVIPS) $(SILENT_Q_FLAG) -t landscape -o $@ $? It is just redundant and could possibly be useful in case the \special isn't recognized in some settings, but you may choose to remove this option. In both cases, there are no issues with "gv refcard.ps". -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon) [-- Attachment #2: gdb-refcard-dvi.patch --] [-- Type: text/plain, Size: 639 bytes --] diff --git a/gdb/doc/refcard.tex b/gdb/doc/refcard.tex index 8a402620bcc..8c0ae2f6951 100644 --- a/gdb/doc/refcard.tex +++ b/gdb/doc/refcard.tex @@ -96,7 +96,9 @@ \vmargin=.25in % vertical margin width \secskip=1pc % space between refcard secs \lskip=2pt % extra skip between \sec entries -\ifx\pdfoutput\undefined\else % check if we are using pdfTeX +\ifx\pdfoutput\undefined + \special{papersize=\the\totalwidth,\the\totalheight}% for dvi output +\else % pdfTeX \pdfpagewidth=\totalwidth % width of paper in pdf output \pdfpageheight=\totalheight % height of paper in pdf output \fi ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Provide papersize for refcard.dvi 2025-08-08 17:25 ` Vincent Lefevre @ 2025-08-08 17:48 ` Eli Zaretskii 0 siblings, 0 replies; 13+ messages in thread From: Eli Zaretskii @ 2025-08-08 17:48 UTC (permalink / raw) To: Vincent Lefevre; +Cc: gdb-patches > Date: Fri, 8 Aug 2025 19:25:03 +0200 > From: Vincent Lefevre <vincent@vinc17.net> > Cc: gdb-patches@sourceware.org > > On 2025-08-08 19:15:07 +0300, Eli Zaretskii wrote: > > > Date: Thu, 07 Aug 2025 12:55:20 +0300 > > > From: Eli Zaretskii <eliz@gnu.org> > > > Cc: gdb-patches@sourceware.org > > > > > > > Date: Thu, 7 Aug 2025 11:05:24 +0200 > > > > From: Vincent Lefevre <vincent@vinc17.net> > > > > Cc: gdb-patches@sourceware.org > > > > > > > > On 2025-08-07 08:50:14 +0300, Eli Zaretskii wrote: > > > > > That's true, but there are TeX experts there. If you know of a better > > > > > place, we could discuss this there. I unfortunately don't know enough > > > > > about this to make a decision about the right solution. > > > > > > > > FYI, the TeX Users Group has mailing-lists: > > > > > > > > https://tug.org/mailman/listinfo > > > > > > > > texhax seems to be the one for general TeX questions. > > > > > > Thanks, posted a question there. > > > > Given the responses there, can you post (and hopefully test) an > > improved patch? > > Note: my old patch was based on what was done in PARI. > > I've attached a new patch. It still uses \ifx\pdfoutput\undefined > because the suggested \ifnum\pdfoutput<1 gives an error. Shouldn't this error be discussed with the TeX gurus that recommended it, before we roll out our own solution? ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-08-08 17:49 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-08-06 14:53 [PATCH] Provide papersize for refcard.dvi Vincent Lefevre 2025-08-06 15:33 ` Eli Zaretskii 2025-08-06 16:00 ` Vincent Lefevre 2025-08-06 16:30 ` Eli Zaretskii 2025-08-06 16:47 ` Vincent Lefevre 2025-08-06 19:02 ` Eli Zaretskii 2025-08-06 22:28 ` Vincent Lefevre 2025-08-07 5:50 ` Eli Zaretskii 2025-08-07 9:05 ` Vincent Lefevre 2025-08-07 9:55 ` Eli Zaretskii 2025-08-08 16:15 ` Eli Zaretskii 2025-08-08 17:25 ` Vincent Lefevre 2025-08-08 17:48 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox