gbranden pushed a commit to branch master
in repository groff.

commit 4bd7f2eedeb830c7bc9116e78ce2ad33a5e97d79
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Oct 24 18:57:02 2021 +1100

    [sboxes]: Only define `pdfbackground` if not PDF.
    
    * contrib/sboxes/sboxes.tmac (pdfbackground): Only define (overriding
      `pdf.tmac`) if GSBOX is false.
---
 contrib/sboxes/ChangeLog   | 2 ++
 contrib/sboxes/sboxes.tmac | 9 ++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
index 7708d7e..2930d1f 100644
--- a/contrib/sboxes/ChangeLog
+++ b/contrib/sboxes/ChangeLog
@@ -4,6 +4,8 @@
        only if the output device is `pdf`.  (This way a document author
        can easily and separately test the presence of the package and
        whether the device-specific feature is likely to work.)
+       (pdfbackground): Only define (overriding `pdf.tmac`) if GSBOX is
+       false.
        * msboxes.ms.in: Document this aspect of the package interface.
 
 2021-10-21  G. Branden Robinson <[email protected]>
diff --git a/contrib/sboxes/sboxes.tmac b/contrib/sboxes/sboxes.tmac
index 569be34..e00d9b4 100644
--- a/contrib/sboxes/sboxes.tmac
+++ b/contrib/sboxes/sboxes.tmac
@@ -52,9 +52,12 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .  tm \*[sboxes*name]:\\n[.F]:\\n[.c]: error: \\$*
 ..
 .
-.de pdfbackground
-.device pdf: background \\$*
-..
+.\" Define dummy macro if we're not formatting for the pdf device.
+.if !\n[GSBOX] \{
+.  de pdfbackground
+.  .
+.\}
+.
 .\" Link into ms macros to trap footnote growth
 .am fn@print-sep
 .nr bx@pb \\n[nl]u-2p

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to