0

I am new to LaTeX and struggling with understanding of userpackages, .sty, .tfm, etc files.

I have a requirement to create PDF with latex equations in Spanish,Chinese and Japanese.

What I have tried till now :

I tried creating document using Spanish using following code

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}

\begin{document}

\tableofcontents

\vspace{2cm} %Add a 2cm space

\begin{abstract}
Este es un breve resumen del contenido del 
documento escrito en español.
\end{abstract}

\section{Sección introductoria}
Esta es la primera sección, podemos agregar 
algunos elementos adicionales y todo será 
escrito correctamente. Más aún, si una palabra 
es demasiado larga y tiene que ser truncada, 
babel tratará de truncarla correctamente 
dependiendo del idioma.

\section{Sección con teoremas}
Esta sección es para ver qué pasa con los comandos 
que definen texto

\end{document}

Using pdflatex.exe spanish.tex in command prompt, it gave an error of .sty missing file. During installation of MiKTeX, I had selected the option to download when needed, but it does not download when required and gives FATAL error in the log file.

So, I searched that file on net and kept it in the same location as pdflatex.exe.

The spanish.pdf was generated.

Similary, I tried for Chinese lang data in the tex file.

But if gave lots of missing files - CJKutf8.sty, CJK.sty, CJK.enc, UTF8.bdg, UTF8.enc, etc.

I downloaded them from net but always some or the other file is missing

Chinese PDF document creation questions:

  1. I want to know, for a specific language where can I find all the packages that are required? so that I can download them once and then create PDFs.

  2. Where should be location of the prerequisit files? Once I download the files where should I keep it so that pdflatex.exe will be able to navigate it for that language?

I found that in C:Program files/Miktex 2.9/ there are folders for Babel-English, Babel-Spanish. But nothing for other languages. So, am not clear of where should I paste language specific pre-requisits

I hope the techies will reply with a layman answer at their earliest.

I could not get document for multi-language support for LaTeX as well... If you have something related, please send me the link.

Thanks in advance...

Stefan Pinnow
  • 29,535
  • 5
    Don't install manually. Use the MiKTeX console if the on-the-fly installation doesn't work. – Ulrike Fischer Jan 09 '19 at 07:45
  • See here. If you installed MiKTeX properly, you will have a MiKTeX Console application. Just search for your necessary packages and click + to install them, and you will get everything you need, not only the .sty files. The picture is when I search for "CJ" only. –  Jan 09 '19 at 08:11
  • I tried installing from the console, but it is giving error -"Couldn't connect to server", Details : Code = 7 – Priyanka Salvi Shelke Jan 09 '19 at 09:43
  • You can setup a local repository and use this in the miktex console. See https://tex.stackexchange.com/questions/462203/how-to-install-a-package-from-a-local-repository/462216#462216 – Ulrike Fischer Jan 09 '19 at 16:22
  • Setting up local repository worked charm for me... Refered the post on https://tex.stackexchange.com/questions/462203/how-to-install-a-package-from-a-local-repository/462216#462216 . I also included the file "zhmetrics.tar.lzma" as it was required for my Chinese text. So, I downloaded from "http://mirror.iopb.res.in/tex-archive/systems/win32/miktex/tm/packages/". Thank you for the pointers – Priyanka Salvi Shelke Jan 10 '19 at 05:40
  • I am trying now with Korian text in tex file. I am getting the error of missing "uwmjc7.tfm". I have downloaded the package uhc and loaded from local repository. But the file is still not found. From where can I find the file "uwmjc7.tfm" – Priyanka Salvi Shelke Jan 10 '19 at 07:43
  • Are you absolutely required to use PDFLaTeX instead of LuaLaTeX or XeLaTeX? – Davislor Sep 26 '21 at 15:27

1 Answers1

0

Setting up local repository worked charm for me... Refered the post on tex.stackexchange.com/questions/462203/… . I also included the file "zhmetrics.tar.lzma" as it was required for my Chinese text. So, I downloaded from "mirror.iopb.res.in/tex-archive/systems/win32/miktex/tm/packages". Thank you for the pointers