Here's my setup :
- Two PCs (one desktop and one laptop)
- Two installations of Texmaker and MikTex (exactly the same versions)
i've created my own package (.sty file) and this package uses external files (that are located in the same directory as the pacakge. the files are added via the \input{...} command
I've used the package for quite a while on both PCs flawlessly and now the laptop throws an error at compilation (of the document which uses the package)
LaTeX Error: File 'basic_packages.tex' not found. Type X...
I've managed to understand what's going on :
- The desktop interprets "\input{...}" as "go look for the file at the package's directory
- the laptop looks for the file at the document's directory. Of course i want the included file to stay with the package.
Here are my codes (simplified)
package
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{sdlibV1}[14/03/2019 custom package]
\newif\if@all\@allfalse
\DeclareOption{all}{\@alltrue}
\ProcessOptions\relax
\input{basic_packages} %<-- this input
%\input{basic_macros} also not useful for the question
\if@all
%stuff, not useful here
\fi
\endinput
basic_packages.tex
\RequirePackage[table,dvipsnames,named]{xcolor}
\RequirePackage{tikz}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{siunitx}
\RequirePackage{enumitem}
\RequirePackage{multicol}
\RequirePackage{tabu}
\RequirePackage{makecell}
\RequirePackage{array}
Document
\documentclass{report}
\usepackage{sdlibV1}% <-- package loaded here
\usepackage[margin=1.5cm]{geometry}
\begin{document}
\subfile{calcul_integral}% I've tried removing those, and only using "hello world"
\subfile{algebre_lineaire}
\subfile{equations_differentielles}
\end{document}
Paths of files :
Document : \HEIG-VD\Cours\Math2\Notes
sdlibV1.sty and basic_packages.text : \HEIG-VD\Notes\LaTex\packages\tex\latex\sdlibV1
(The packages folderhas been configured correctly as a package "source") What i've also tried :
- Checking pdflatex's command
- Using a temp document (standalone, without anything in it, just a "hello world")
- using \include command (did not work at all)
- putting all my included files (16 elements) inside the .sty file, it worked but it's absolutely disgusting
initexmf -u
on the command line.)