Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Unicode character error building Japanese PDF documents#145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

atsuoishimoto
Copy link
Contributor

Fix Unicode character error building Japanese PDF documents.

Seepython/python-docs-ja#31,python/python-docs-ja#35

  • Use LuaTex instead of pLatex.
  • use ltjsbook and ltjsarticle as document class.

@atsuoishimotoatsuoishimoto changed the title[WIP] Fix Unicode character error building Japanese PDF documentsFix Unicode character error building Japanese PDF documentsJan 17, 2023
build_docs.py Outdated
@@ -226,9 +226,11 @@ class Language:
)

PLATEX_DEFAULT = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
PLATEX_DEFAULT= (
LUALATEX_DEFAULT= (

Should the variable name be updated too?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks, I updated in#149.

build_docs.py Outdated
@@ -257,7 +259,7 @@ class Language:
Language("fr", "fr", "French", True, XELATEX_WITH_FONTSPEC),
Language("id", "id", "Indonesian", False, XELATEX_DEFAULT),
Language("it", "it", "Italian", False, XELATEX_DEFAULT),
Language("ja", "ja", "Japanese", True, PLATEX_DEFAULT, html_only=True), # See https://github.com/python/python-docs-ja/issues/35
Language("ja", "ja", "Japanese", True, PLATEX_DEFAULT, html_only=True),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
Language("ja","ja","Japanese",True,PLATEX_DEFAULT,html_only=True),
Language("ja","ja","Japanese",True,LUALATEX_DEFAULT,html_only=True),

Also later in the file there's a piece of code that prints the platex version, that should be updated to print the lualatex version instead if platex is no longer used anywhere.

@JulienPalard
Copy link
Member

If I undertand correctly this PR is stuck with the newlines in the preamble?

@JulienPalard
Copy link
Member

As a「 « "temporary" » 」fix, would running:

sed -i $'s/\xef\xbf\xbd/\xef\xa3\xbd/g' Doc/**/*.rst

help? It could be easily added to docsbuild script inside anif language.tag == "ja" and with a big comment explaining why.

@atsuoishimoto
Copy link
ContributorAuthor

Sorry, I had to start over with a new branch. Please take a look at#149.

@atsuoishimoto
Copy link
ContributorAuthor

sed -i $'s/\xef\xbf\xbd/\xef\xa3\xbd/g' Doc/**/*.rst

With this change, the pdf is fine. But unfortunately, the HTML document will be messed up. I gave up to support U+FFFD with luatex(for now). Please refer#149.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ezio-melottiezio-melottiezio-melotti left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@atsuoishimoto@JulienPalard@ezio-melotti

[8]ページ先頭

©2009-2025 Movatter.jp