Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF出力 #7

Open
tcppjp opened this issue Feb 25, 2019 · 2 comments
Open

PDF出力 #7

tcppjp opened this issue Feb 25, 2019 · 2 comments

Comments

@tcppjp
Copy link
Collaborator

tcppjp commented Feb 25, 2019

PDF版のドキュメントを自動的に生成したい。

Read the DocsにはPDF出力機能があるが、pdfLaTeXを使用しているため日本語を含むドキュメントは現在ビルドできない。

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

(/home/docs/checkouts/readthedocs.org/user_builds/tecs-docs/checkouts/latest/do
cs/_build/latex/ASP3TECS.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(./sphinxmanual.cls
Document Class: sphinxmanual 2016/10/12 v1.5 Document class (Sphinx manual)
(/usr/share/texlive/texmf-dist/tex/platex/jsclasses/jsbook.cls

! LaTeX Error: This file needs format `pLaTeX2e'
               but this is `LaTeX2e'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

Related issue

@humitos
Copy link

humitos commented Mar 6, 2019

Hi @tcppjp! I'm using your project as example to try to achieve the proper usage of platex under Read the Docs to build it properly.

Do you know what are the proper steps/commands to build the PDF of your documentation? I tried just running xelatex and platex and none of them worked. That may help to understand what's the process that I need to consider under RTD. Thanks!

@tcppjp
Copy link
Collaborator Author

tcppjp commented Mar 6, 2019

@humitos

Here's the build steps that I just tested on a fresh environment (macOS 10.14, MacTeX 2018, Python 3.7, Sphinx 1.5.1):

  1. Remove the large table in docs/tecs/CDLref-type.rst. This table is known to produce invalid LaTeX code.
  2. Run make latexpdfja. This command internally invokes Sphinx's LaTeX builder and then recursively calls make all-pdf-ja using the generated _build/latex/Makefile. The output should look like this.

I hope this helps!

Edit: I just opened a PR #8 that updates Sphinx to 1.8.4. The first step can be skipped in this version.

humitos added a commit to readthedocs/readthedocs.org that referenced this issue Mar 12, 2019
New versions of Sphinx use `latexmk` to build the PDF files. This
command uses a file called `latexmkrc` (or `latexmkjarc` for Japanese)
which contains all the proper commands that needs to be ran depending
on different Sphinx configurations.

`latexmk` will take care by itself on the amount of phases that need
to be ran without us worrying about it.

Currently, this is not considering LATEXMKOPTS and XINDYOPTS
environment variables configured by Sphinx.

This feature is implemented under a Feature flag so we can test it
easily without breaking other working projects.

References:

- #1556
- #4454
- #5405
- toppers/tecs-docs#7
- https://github.com/sphinx-doc/sphinx/blob/master/sphinx/texinputs/Makefile_t
- https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
humitos added a commit to readthedocs/readthedocs.org that referenced this issue Mar 12, 2019
New versions of Sphinx use `latexmk` to build the PDF files. This
command uses a file called `latexmkrc` (or `latexmkjarc` for Japanese)
which contains all the proper commands that needs to be ran depending
on different Sphinx configurations.

`latexmk` will take care by itself on the amount of phases that need
to be ran without us worrying about it.

Currently, this is not considering LATEXMKOPTS and XINDYOPTS
environment variables configured by Sphinx.

This feature is implemented under a Feature flag so we can test it
easily without breaking other working projects.

References:

- #1556
- #4454
- #5405
- toppers/tecs-docs#7
- https://github.com/sphinx-doc/sphinx/blob/master/sphinx/texinputs/Makefile_t
- https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
humitos added a commit to readthedocs/readthedocs.org that referenced this issue Mar 13, 2019
New versions of Sphinx use `latexmk` to build the PDF files. This
command uses a file called `latexmkrc` (or `latexmkjarc` for Japanese)
which contains all the proper commands that needs to be ran depending
on different Sphinx configurations.

`latexmk` will take care by itself on the amount of phases that need
to be ran without us worrying about it.

Currently, this is not considering LATEXMKOPTS and XINDYOPTS
environment variables configured by Sphinx.

This feature is implemented under a Feature flag so we can test it
easily without breaking other working projects.

References:

- #1556
- #4454
- #5405
- toppers/tecs-docs#7
- https://github.com/sphinx-doc/sphinx/blob/master/sphinx/texinputs/Makefile_t
- https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants