#35754: PDF documentation renders curly quotes as full-width
-----------------------------------------+-------------------------------
               Reporter:  A. Rafey Khan  |          Owner:  A. Rafey Khan
                   Type:  Bug            |         Status:  assigned
              Component:  Documentation  |        Version:
               Severity:  Normal         |       Keywords:  sphinx, latex
           Triage Stage:  Unreviewed     |      Has patch:  1
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  1
                  UI/UX:  1              |
-----------------------------------------+-------------------------------
 Hi,

 In the pdf documentation builds, there is a noticeable amount of
 unnecessary gap after quote marks especially the apostrophes.
 I'll be referring to Django 5.1.x
 (https://media.readthedocs.org/pdf/django/5.1.x/django.pdf) at the time of
 writing.
 For example on page 26, there are near a dozen occurrences where the
 contractions such as `isn't` are rendered like `isn' t`.

 The issue has been presumably since this PR was merged:
 https://github.com/django/django/pull/15079. It is inherently due to the
 combination of smart quote feature of `Sphinx` and `ctex` latex package
 which we use to enable support for Chinese character set in the pdf
 documentation which appears to be rendering curly/smart quotes as full-
 width. The issue was previously raised and discussed in the `ctex` source
 repository: https://github.com/CTeX-org/ctex-kit/issues/389,  However, the
 maintainers do not appear interested in merging any related changes into
 the package, the main reason being that the package is specifically
 tailored for Chinese typesetting and additionally using `ctex`, the
 recommended method for producing smart quotes in latex (e.g., `quoted
 text") still functions as expected.

 I can propose two solutions:

 1. We can add the rules in the preamble to convert from full-width quotes
 back to half-width as suggested in the mentioned thread.

 2. As it appears that our documentation text is mainly in English and
 Chinese is used just once merely as an example to demonstrate Unicode-
 related functionality (Page 2061). So alternatively, it is also possible
 to use Unicode characters other than Chinese and get rid of the `ctex`
 dependency. Note that this change won't affect any pdf builds where
 language is defined as Chinese as `xeCJK/ctex` would  be implicitly
 imported in that case.

 If we agree on either of the change, I can submit the PR accordingly.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35754>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070191e3f74241-3a065d57-31e4-431f-a9fd-d23c49e39a62-000000%40eu-central-1.amazonses.com.

Reply via email to