The font “latinmodern-math.otf” cannot be found.
Sample error:
[root@tutorialspots pdf]# pandoc -f epub --pdf-engine=xelatex "file.epub" -o "file.pdf" kpathsea:make_tex: Invalid fontname `[latinmodern-math.otf]/ICU', contains '[' Error producing PDF. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! fontspec error: "font-not-found" ! ! The font "latinmodern-math.otf" cannot be found. ! ! See the fontspec documentation for further information. ! ! For immediate help type H <return>. !............................................... l.72 \begin{document}
Step 1: find package
[root@tutorialspots pdf]# yum whatprovides '*/latinmodern-math.otf' --disablerepo=mariadb Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.fra1.de.leaseweb.net * epel: mirror.23m.com * extras: centosmirror.netcup.net * remi-php72: mirror.dogado.de * remi-safe: mirror.dogado.de * updates: centosmirror.netcup.net 2:texlive-lm-math-svn29044.1.958-45.el7.noarch : OpenType maths fonts for Latin Modern Repo : base Matched from: Filename : /usr/share/texlive/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf
Step 2: install texlive-lm-math
yum install texlive-lm-math
[root@tutorialspots pdf]# yum install texlive-lm-math Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.fra1.de.leaseweb.net * epel: mirror.23m.com * extras: centosmirror.netcup.net * remi-php72: mirror.dogado.de * remi-safe: mirror.dogado.de * updates: centosmirror.netcup.net http://yum.mariadb.org/10.3/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. Resolving Dependencies --> Running transaction check ---> Package texlive-lm-math.noarch 2:svn29044.1.958-45.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================================================ Installing: texlive-lm-math noarch 2:svn29044.1.958-45.el7 base 427 k Transaction Summary ============================================================================================================================================================================ Install 1 Package Total download size: 427 k Installed size: 716 k Is this ok [y/d/N]: y Downloading packages: texlive-lm-math-svn29044.1.958-45.el7.noarch.rpm | 427 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 2:texlive-lm-math-svn29044.1.958-45.el7.noarch 1/1 Verifying : 2:texlive-lm-math-svn29044.1.958-45.el7.noarch 1/1 Installed: texlive-lm-math.noarch 2:svn29044.1.958-45.el7 Complete!