﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35754	PDF documentation renders curly quotes as full-width	A. Rafey Khan	A. Rafey Khan	"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."	Bug	closed	Documentation	dev	Normal	fixed	sphinx, latex	A. Rafey Khan Mariusz Felisiak David Smith	Ready for checkin	1	0	0	0	0	1
