2

(This question is followed by Installing Latex on Android)

I installed texlive package using Termux Android. Using VerbTex I created test.tex file locally. But when I called it using.

pdflatex ./test.tex

I didn't get the result. Is there any way to compile LaTex using Termux?

Terminal Transcript:

Welcome to Termux!

Wiki:            https://wiki.termux.com
Community forum: https://termux.com/community
Gitter chat:     https://gitter.im/termux/termux
IRC channel:     #termux on freenode

Working with packages:

 * Search packages:   pkg search <query>
 * Install a package: pkg install <package>
 * Upgrade packages:  pkg upgrade

Subscribing to additional repositories:

 * Root:     pkg install root-repo
 * Unstable: pkg install unstable-repo
 * X11:      pkg install x11-repo

Report issues at https://termux.com/issues

$ pdflatex \storage\Download\test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX L
ive 2019/Termux) (preloaded format=pdflatex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt pdflatex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf
 files (in precedence order):
mktexfmt:   /data/data/com.termux/files/usr/share/tex
live/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf
 file for writing changes:
mktexfmt:   /data/data/com.termux/files/home/.texlive
2019/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /data/data/com
.termux/files/home/.texlive2019/texmf-var/web2c
mktexfmt [INFO]: --- remaking pdflatex with pdftex
mktexfmt: running `pdftex -ini   -jobname=pdflatex -p
rogname=pdflatex -translate-file=cp227.tcx *pdflatex.
ini' ...
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX L
ive 2019/Termux) (INITEX)
 restricted \write18 enabled.
 (/data/data/com.termux/files/usr/share/texlive/texmf
-dist/web2c/cp227.tcx)
entering extended mode

(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/latexconfig/pdflatex.ini
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/generic/tex-ini-files/pdftexconfig.tex)

(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/latex.ltx
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/texsys.cfg)
./texsys.aux found


\@currdir set to: ./.


Assuming \openin and \input
have the same search path.


Defining UNIX/DOS style filename parser.

catcodes, registers, parameters, LaTeX2e <2018-12-01>
hacks, control, par, spacing, files, font encodings, 
lengths,
====================================

Local config file fonttext.cfg used

====================================

(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/fonttext.cfg
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead =
==


(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/omlenc.def)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/t1enc.def)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/ot1enc.def)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/omsenc.def)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/t1cmr.fd)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/ot1cmr.fd)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/ot1cmss.fd)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/ot1cmtt.fd)))
====================================

Local config file fontmath.cfg used

====================================

(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/fontmath.cfg
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead =
==


(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/omlcmm.fd)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/omscmsy.fd)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/omxcmex.fd)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/ucmr.fd)))
====================================

Local config file preload.cfg used

=====================================

(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/preload.cfg
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions,
boxes, title, sectioning, contents, floats, footnotes
, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================

(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/generic/babel/hyphen.cfg
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/generic/babel/switch.def)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/generic/hyphen/hyphen.tex)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/generic/hyphen/dumyhyph.tex)
(/data/data/com.termux/files/usr/share/texlive/texmf-
dist/tex/generic/hyphen/zerohyph.tex)
! I can't find file `dehypht-x-2019-04-04.tex'.
<to be read again>
                   \relax
l.172   \repeat

(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
                   \relax
l.172   \repeat

!  ==> Fatal error occurred, no output PDF file produ
ced!
Transcript written on pdflatex.log.
mktexfmt [ERROR]: running `pdftex -ini   -jobname=pdf
latex -progname=pdflatex -translate-file=cp227.tcx *p
dflatex.ini >&2 </dev/null' return status 1
mktexfmt [ERROR]: return error due to options --strict
mktexfmt [INFO]: Disabled formats: 17
mktexfmt [INFO]: Not selected formats: 33
mktexfmt [INFO]: Failed to build: 1 (pdftex/pdflatex)
mktexfmt [INFO]: Total formats: 51
mktexfmt [INFO]: exiting with status 1
I can't find the format file `pdflatex.fmt'!
$
  • 2
    The first error (which is always the most relevant with LaTeX, other errors encountered later may be caused by the first error that occurs) is I can't find file 'dehypht-x-2019-04-04.tex' (about 25 lines from the end of the transcript). This is a known issue which has a solution, see github.com/termux/termux-packages/issues/3830. – Marijn Jan 2 at 19:54
  • @Marijn I tried the solution mentioned there. I removed my texlive basic insulation and installed texlive-full package. Updated terminal script is here. simp.ly/publish/46BnN9 – ACA Jan 3 at 16:55
  • @Marijin , Please help – ACA Jan 3 at 16:57
  • 1
    Based on my learnings I have created a video to illustrate all the procedures. Someone who is interested may check this youtu.be/kGz1MGwwcE0 – ACA Jan 4 at 10:40
  • 1
    If you want you can also post an answer to your own question here on the site (in the Answer box at the bottom) and then accept that answer as correct (for self-answers you need to wait one day before the system allows you to accept I think). That could also help future visitors. – Marijn Jan 4 at 11:30
1

After some studies as suggested in comments of this question, I was able to compile .tex file using Termux on Android. So I think I can answer my own question so that future visitors won't feel any trouble.

I can't find file 'dehypht-x-2019-04-04.tex'

This problem is due to the missing of a texlive package langgerman. So run the command,

apt install texlive-langgerman

to install this package. But what I personally suggest you is to install ’texlive-full' so that there will be no issue related to packages. You can do this by running the following command in termux.

pkg install texlive-full

Now lets look at compiling document. First run ’pdflatex’ . This give following output.

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Termux) (preloaded format=pdflatex) restricted \write18 enabled.**

After ** you have to specify the file location and file name. Suppose your file.tex is saved at Internal Storage>Download then you run following command in Termux

/storage/emulated/0/download/file.tex

Then your compiling is successful. To open compiled document you may read this: Opening compiled document in Android

Based on my understandings I have created two videos to illustrate using LaTex on Android. You can check them here.

https://youtu.be/kGz1MGwwcE0 https://youtu.be/tMb_XcinN8U

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.