0

My product has a requirement for latex support. I do not want to install MikTex on the client machine(because if I include it, the setup size is too large). I want to identify the basic set of files required to generate a pdf document (I am using pdfLatex to create PDF from the tex file provided). Is there a way to identify which files will be required by the latex script in picture? Steps done to create PDF from a directory other than installed MikTex directory :

1)I have renamed the installed MikTex folder in Program files. 2) I created a folder C:/Data/ in which I have kept my pdflatex.exe and .tex file for which the pdf is to be generated 3) Using command prompt, create pdf using command for generating PDF file 4) It gives a popup which indicates missing file and the package in which we should get the file. (As now, the installed directory of MikTex is renamed, the missing file is not found) 4) When I search the missing file name in the installed directory of MikTex, it is present. I copied that file and placed it in the directory (C:/Data/) and repeat step 3, still same file missing popup is displayed.

Any pointers are greatly appreciated, for identifying the basic files required and does it require to keep them in a specific folder structure.

  • Why not try the portable edition of MikTeX, or an online LaTeX GUI like Overleaf ?

    P.S. This may not be an answer to your question, but possible solutions to your problem, tried along some different avenues.

    – Partha D. Jan 15 '19 at 06:42
  • @ParthaD, The portable edition is 180MB size. The allowed size for the installer is max 50MB. I dont want MikTex setup to be integrated with my product installable. But a set of files which when placed in my C:/Data folder will execute the .tex file and create PDF file. – Priyanka Salvi Shelke Jan 15 '19 at 07:15
  • 1
    Relevant https://tex.stackexchange.com/q/13649/35864, https://tex.stackexchange.com/q/352138/35864, https://tex.stackexchange.com/q/267765/35864, https://tex.stackexchange.com/q/119759/35864, https://tex.stackexchange.com/q/42234/35864, https://tex.stackexchange.com/q/442383/35864, https://tex.stackexchange.com/q/397174/35864 – moewe Jan 15 '19 at 07:31
  • https://yihui.name/tinytex/ – Fran Jan 15 '19 at 07:58
  • Just for the link: This was originally asked on meta and closed there. My link list from above is copied from there (it had a tiny bit more structure there). https://tex.meta.stackexchange.com/q/8037/35864 – moewe Jan 15 '19 at 09:16
  • Thanks all for your inputs. But I cannot use other tools, previous analysis is done on MikTex so, have to go with MikTex only. Is there any way in which we can find which files are mandatory for an application to execute. Like when we use C# prj we can spot loaded dlls in Debug->Windows-> Module window (visible when prog is in debug mode) – Priyanka Salvi Shelke Jan 15 '19 at 09:52
  • 1
    The needed files (beside some binaries) depends on which class, which styles and which fonts your document uses. Compile your documents on a full system with --recorder and then check the fls-file. – Ulrike Fischer Jan 15 '19 at 16:35
  • Requirements 1) must be MiKTeX 2) Minimal MiKTeX portable is too big = 3) contact MiKTeX for a custom build –  Jan 15 '19 at 18:01
  • 1
    If I understand you correctly, you are looking for a bare TeX installation you can start with - aka "Just enough TeX". So a possible route to success could be: uninstall most of the packages - keeping only essential packages. If you need help, I would recommend that you submit a ticket (enhancement request ) on GitHub. – Christian Schenk Jan 15 '19 at 20:02
  • @KJO : Thanks for the suggesstion.I do not want to install MikTex, just create a directory structure containing the required files (pdflatex,Xelatex and supporting files) and execute the tex file – Priyanka Salvi Shelke Jan 16 '19 at 04:45
  • @Christian Schenk : Thanks for the suggesstion. I do not want to install any depeneding software on client machine, just create a directory structure containing the required files (pdflatex,Xelatex and supporting files) and execute the tex file – Priyanka Salvi Shelke Jan 16 '19 at 04:48
  • @UlrikeFischer : I tried recording the tex file and got an fls-file. It mentioned exactly what I needed. I have created a folder(C:/Data/Required Files) of required files, my tex file and pdflatex.exe are present in C:/Data. When I use command prompt to run the tex file, It gives error of missing file "miktex\config\win\log4cxx.win.xml". I pasted this file in the C:/Data/Required Files and executed. But still same file missing message. How do I inform pdflatex.exe to search the required files in the folder "c:/Data/Required Files". Is there anything that is missing ? – Priyanka Salvi Shelke Jan 16 '19 at 04:55
  • MiKTeX expects a folder hierarchy that is either portable network (admin) and OR user appdata installed. Thus a portable install is a good starting point but you will need to maintain SOME relative folder paths especially if needing a user texmf folder alongside the system one. ~~ Again since the MiKTeX support file paths are controlled by MiKTeX-exes I recommend asking MiKTeX (SEE Christians OFFER) –  Jan 16 '19 at 10:47
  • I could add the required files in a folder and placed all the dependent files in the same location as pdflatex.exe. When I run the command I get a popup : "The required file miktex\config\win\log4cxx.win.xml is missing. It is part of the following package miktex-config-2.9". The pdflatex.exe is present in "PDF\miktex\bin\x64" and log4cxx.win.xml is present in "PDF\miktex\config\win". Also, log4cxx.win.xml is placed in "PDF\miktex\bin\x64" . With this settings also, I am getting package missing popup. What is it that I'll have to do to handle such popup. Even with this popup, pdf is generated – Priyanka Salvi Shelke Jan 17 '19 at 05:51
  • I have identified the dependent files and moved to a folder (C:/Data including pdflatex.exe). I have uninstalled MikTex . Now, when I run using command, it gives : C:/Data>pdflatex.exe "1 untitled-1.tex"

    It seems that this is a fresh TeX installation. Please finish the setup before proceeding. For more information, visit: https://miktex.org/howto/install-miktex-win

    – Priyanka Salvi Shelke Jan 18 '19 at 10:05

0 Answers0