Here is my MWE:
\documentclass[ngerman,german,14pt,twoside,openany]{scrbook}
\usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{currfile}
\begin{document}
\ifcurrfiledir{folder1/folder2/Jungs}{Lieber}{Liebe}
\end{document}
I am struggling with the following problem: In german language you talk to boy with the word "Lieber..." and you talk to a girl with the word "Liebe..." (for our english speaking friends: this means "Dear...". Now I would like to automate these words in a way that if the document is in the folder "folder1/folder2/Jungs" (Jungs means boy) then the word "Lieber" should be inserted and for the rest (i.e. the girls) the word "Liebe" should be used. For this purpose I tried the "currfile" package by Martin Scharrer with the code detailed above. But this doesn´t work since in both cases Lualatex returns "Liebe". Can anyone help me please?
\usepackage[utf8x]{inputenc}(utf8xhas not been recommended for years, and in current releases it is defined to do nothing other than give a warning that it should not be used) – David Carlisle Nov 27 '23 at 11:25folder1/folder2/Jungs, so there is no relative folder. – Joseph Wright Nov 27 '23 at 11:3214ptforscrbookis obsolete. You should usefontsize=14ptinstead as reported in thelogfile and shown in my answer. And if you have several options in the option list of\documentclassbut only the main language as option forbabel, it is recommended to usemain=…when loading babel to avoid warnings. See again the warning in thelogfile of your example. – cabohah Nov 27 '23 at 12:07