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

dvipdf error when compiling Japanese #210

Open
musan6363 opened this issue Dec 26, 2023 · 1 comment
Open

dvipdf error when compiling Japanese #210

musan6363 opened this issue Dec 26, 2023 · 1 comment

Comments

@musan6363
Copy link

I want to write a paper in Japanese, but it does not output PDF.

The following is written in output.stdout.

Rc files read:
  latexmkrc
Latexmk: This is Latexmk, John Collins, 4 Apr. 2023. Version 4.80.
Latexmk: Changing directory to '/var/lib/sharelatex/data/compiles/658ad21af00a731a9bf9f3a0-658ac4897887df29af839477/'
Latexmk: applying rule 'latex'...
Rule 'latex':  Reasons for rerun
Changed files or newly in use/created:
  main.tex
Category 'changed_user':
  main.tex

------------
Run number 1 of rule 'latex'
------------
------------
Running 'platex  -synctex=1 -interaction=batchmode -recorder --jobname="output"  "main.tex"'
------------
Latexmk: Getting log file 'output.log'
Latexmk: applying rule 'dvipdf'...
Rule 'dvipdf':  Reasons for rerun
Category 'changed_source_rules':
  latex
Category 'disappeared_gen_other':
  output.dvi

------------
Run number 1 of rule 'dvipdf'
------------
------------
Running 'dvipdfmx  -o "output.pdf" "output.dvi"'
------------
Latexmk: Errors, in force_mode: so I tried finishing targets
Collected error summary (may duplicate other messages):
  dvipdf: Command for 'dvipdf' gave return code 256
  latex: Run of rule 'latex' gave a non-zero error code
Latexmk: Undoing directory change

I have already tried the following

  • Run tlmgr install scheme-full in the container to bring TeXLive up to date.
  • Created a new commit of the container and updated config/version.
  • Run bin/doctor to make sure there are no problems.

The result of bin/doctor is as follows.

====== Overleaf Doctor ======
- Host Information
    - Linux
    - Output of 'lsb_release -a':
            No LSB modules are available.
            Distributor ID:	Ubuntu
            Description:	Ubuntu 22.04.3 LTS
            Release:	22.04
            Codename:	jammy
- Dependencies
    - bash
        - status: present
        - version info: 5.1.16(1)-release
    - docker
        - status: present
        - version info: Docker version 24.0.6, build ed223bc
    - realpath
        - status: present
        - version info: realpath (GNU coreutils) 8.32
    - perl
        - status: present
        - version info: 5.034000
    - awk
        - status: present
        - version info: mawk 1.3.4 20200120
    - openssl
        - status: present
        - version info: OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
    - docker compose
        - status: present
        - version info: Docker Compose version v2.16.0
- Docker Daemon
    - status: up
====== Configuration ======
- config/version
    - status: present
    - version: 4.2.0-with-texlive-full
- config/overleaf.rc
    - status: present
    - values
        - SHARELATEX_DATA_PATH: data/sharelatex
        - SERVER_PRO: false
        - SHARELATEX_LISTEN_IP: 127.0.0.1
        - SHARELATEX_PORT: 80
        - MONGO_ENABLED: true
        - MONGO_IMAGE: mongo:4.4
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_IMAGE: redis:6.2
        - REDIS_DATA_PATH: data/redis
        - NGINX_ENABLED: false
        - NGINX_CONFIG_PATH: config/nginx/nginx.conf
        - TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
        - TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
        - NGINX_HTTP_LISTEN_IP: 127.0.1.1
        - NGINX_HTTP_PORT: 80
        - NGINX_TLS_LISTEN_IP: 127.0.1.1
        - TLS_PORT: 443
        - GIT_BRIDGE_ENABLED: false
- config/variables.env
    - status: present
    - values
        - SHARELATEX_FILESTORE_BACKEND: fs
        - SHARELATEX_HISTORY_BACKEND: fs
====== Warnings ======
- None, all good
====== End ======

In the web version of Overleaf, we need to add latexmkrc to use Japanese, so the following file is added.

$latex = 'platex %O %S';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$pdf_mode = 3; # generates pdf via dvipdfmx

The compiler in the GUI settings is "LaTeX". (It will not compile even if I change to another compiler.)
The web version of Overleaf can compile with exactly the same settings.

How can I compile a Japanese manuscript in the same way as the web version of Overleaf?
Please help me.

@hibiki-kato
Copy link

hibiki-kato commented Jan 8, 2024

I had the same problem(not solved). Thanks to many contributions, the architecture changed a lot.
In my case, the docker image that had full TeXLive was not used at first.

The name of it is share latex/sharelatex:with-texlive-full and I set SHARELATEX_IMAGE_NAME=sharelatex/sharelatex:with-texlive-full in config/overleaf.rc, line 7.

lib/docker-compose.base.yml references $IMAGE as the image name.
$IMAGE was defined in bin/docker compose by "$image_name:$IMAGE_VERSION".
The value of IMAGE_VERSION was written in config/version, which was 4.2.0 in my case.

That is, the docker image was designated as "share latex/sharelatex:with-texlive-full:4.2.0" even though it was expected to be "share latex/sharelatex:with-texlive-full".

So I modified bin/docker compose, line 67 from
export IMAGE="$image_name:$IMAGE_VERSION"
to
export IMAGE="$image_name".
Then latex/sharelatex:with-texlive-full successfully worked.

However, even though there was full version of TexLive, the compile of my japanse article failed that succeeds in overleaf.com.

Environment
M2 Mac
Rosetta2(Docker image was AMD64)
macOS 14 Sonoma
pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023)
kpathsea version 6.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants