Discussion:
Processed: Re: Bug#1002501: release-notes: Quotes (" and ') in commands in PDF release notes are "smart" (”*” / ’hold$’) so don't copy/paste
(too old to reply)
Debian Bug Tracking System
2022-12-15 13:10:01 UTC
Permalink
tag -1 help
Bug #1002501 [release-notes] release-notes: Quotes (" and ') in commands in PDF release notes are "smart" (”*” / ’hold$’) so don't copy/paste
Added tag(s) help.
--
1002501: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002501
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Paul Gevers
2022-12-15 13:10:01 UTC
Permalink
Control: tag -1 help

Hi Alan,

Thanks for your report.
As the subject says really. Quotes (" and ') in commands in the PDF Release
Notes are "smart"/slanted (e.g. ”*” / ’hold$’) so when commands are copied from
the pdf and pasted into a shell, they don't work. It's necessary to edit the
command to put "straight" quotes into the command instead.
(Annoying and unnecessary!)
PDF I used: "Release Notes for Debian 11 (bullseye), 64-bit PC | December 14, 2021"
The release notes are generated with docbook. I spend about an hour to
find out how to prevent conversion of straight quotes to curly quotes,
but I failed. I don't know how to fix this bug. The html version get it
right, so I expect the issue to be in how LaTeX is called. If anybody
knows how docbook and LaTeX work together and how to fix it, much
appreciated.

Paul

I tried replacing " with " and " but both were still converted
to curly quotes.

Paul
Hendrik Boom
2022-12-15 22:40:02 UTC
Permalink
Post by Paul Gevers
Control: tag -1 help
Hi Alan,
Thanks for your report.
As the subject says really. Quotes (" and ') in commands in the PDF Release
Notes are "smart"/slanted (e.g. ”*” / ’hold$’) so when commands are copied from
the pdf and pasted into a shell, they don't work. It's necessary to edit the
command to put "straight" quotes into the command instead.
(Annoying and unnecessary!)
PDF I used: "Release Notes for Debian 11 (bullseye), 64-bit PC | December 14, 2021"
It's quit a trick to get straight quotes in TeX even if you hand-code the TeX file.
There's a TeX module calles ascii.something (I forget the file type). It defines coding for the ascii characters.

I don't know how this relates to Docbook, though.

-- hendrik
Post by Paul Gevers
The release notes are generated with docbook. I spend about an hour to find
out how to prevent conversion of straight quotes to curly quotes, but I
failed. I don't know how to fix this bug. The html version get it right, so
I expect the issue to be in how LaTeX is called. If anybody knows how
docbook and LaTeX work together and how to fix it, much appreciated.
Paul
I tried replacing " with " and " but both were still converted to
curly quotes.
Paul
James Addison
2023-02-16 02:20:01 UTC
Permalink
Package: release-notes
Followup-For: Bug #1002501
Post by Paul Gevers
The release notes are generated with docbook. I spend about an hour to
find out how to prevent conversion of straight quotes to curly quotes
Funny how it's sometimes the seemingly-simple fixes that prove the most
infuriating to fix, isn't it? :)

I spent a significantly longer amount of time on this one; I learned fairly
early on that the 'upquote' LaTeX package was a potential fix (thanks to
aerostitch[1] and postgis[2]), but in practice getting that to work with
the PDF documentation generation involved various failed attempts.

However..

In addition to including the 'upquote' package, it seems that a combination of
two additional changes[3] produces the desired result:

* Using single straight quotes instead of double quotes

* Placing the relevant text within a 'screen' docbook element

Fortunately single-quotes is probably a safer and better recommendation anyway
since it's generally less prone to globbing, at least in bash.

(note: I also had to temporarily rename some font filenames[4] locally in order
for the build to succeed when using 'make pdf LINGUA=en architecture=arm64')

[1] - https://aerostitch.github.io/misc/asciidoc/asciidoc-pdf_keep_quotes.html

[2] - https://github.com/postgis/postgis/pull/128

[3] - https://salsa.debian.org/jayaddison/release-notes/-/commit/4922a80e12db746de8bf8cad45d4fe63d43d9f90

[4] - https://salsa.debian.org/jayaddison/release-notes/-/blob/4922a80e12db746de8bf8cad45d4fe63d43d9f90/Makefile#L82-85
Holger Wansing
2023-02-18 12:10:02 UTC
Permalink
Hi,
Post by James Addison
In addition to including the 'upquote' package, it seems that a combination of
* Using single straight quotes instead of double quotes
* Placing the relevant text within a 'screen' docbook element
I have tested James' proposal, and it seems fine to implement.
I compared two versions of r-n (with and without the use of upquote) site-by-site,
and that showed no site effects, but it does the desired change of keeping
single quotes unchanged.

So I would vote for merging it.
Post by James Addison
[3] - https://salsa.debian.org/jayaddison/release-notes/-/commit/4922a80e12db746de8bf8cad45d4fe63d43d9f90
[4] - https://salsa.debian.org/jayaddison/release-notes/-/blob/4922a80e12db746de8bf8cad45d4fe63d43d9f90/Makefile#L82-85
Holger
--
Holger Wansing <***@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076
Debian Bug Tracking System
2023-03-04 18:30:01 UTC
Permalink
Your message dated Sat, 4 Mar 2023 19:22:57 +0100
with message-id <10bb4ff6-0b31-0e70-9801-***@debian.org>
and subject line Re: Bug#1002501: release-notes: Quotes (" and ') in commands in PDF release notes are "smart" (”*” / ’hold$’) so don't copy/paste
has caused the Debian Bug report #1002501,
regarding release-notes: Quotes (" and ') in commands in PDF release notes are "smart" (”*” / ’hold$’) so don't copy/paste
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
1002501: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002501
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...