I'm working on a Windows environment with Miktex. Most my documents are created with XeLaTeX but I think my problem is not compiler-specific.
I would like to create a template with all my package includes, header setup and graphics path e.g. to include header logos from. In all my documents using the template, I would like to only have document specific setup and document contents. My problem is, that the documents might be in a folder different from the template, but I still would like to include pictures from the template folder. My setup looks like this:
.
├── templates/
│ ├── my_template.tex
│ └── pictures/
│ └── header_logo.pdf
└── documents/
├── my_document.tex
└── pictures/
└── some_picture.png
Minimal examples could be:
my_template.tex:
\documentclass[
11pt,
a4paper,
]{scrarticle}
\usepackage{scrextend}
\usepackage{scrlayer-scrpage}
%%%%% Graphics %%%%%
\usepackage{graphicx}
\graphicspath{{./pictures/}}
%%%% Title Setup %%%%%
\ihead{\includegraphics[width=6cm]{header_logo.pdf}}
\cfoot{}
\setlength{\headheight}{14pt}
my_document.tex:
\input{../templates/my_template.tex}
\graphicspath{{./pictures/}}
\begin{document}
\includegraphics[width=6cm]{some_picture.png}
\end{document}
My question is now, what is the standard way of achieving this working. I found this question very helpfull, but I need a little more detail on the different approaches to figure out which one is appropriate. I don't fully understand the difference between include
and input
in this context or if I should turn my template into a class instead.