Whenever words as 'Varicer', 'Lobuli', 'Haptocytter', 'Fibrose' is used in the document after the wordlist, they should be in italic font, is there a way to make a function with starting point in this:
\nomenclature{Varicer}{explanation}
\nomenclature{Lobuli}{explanation}
\nomenclature{Haptocytter}{explanation}
\nomenclature{Fibrose}{explanation}
Which goes through the above list and check for the word throughout the text and makes it italic font?
The stucture of my Project, is in more files and here is a minimal example:
main.tex
\documentclass[10pt,a4paper]{article}
\usepackage[a4paper,top=2cm, bottom=3cm, left=3cm, right=3cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{subfiles}
\usepackage{graphicx}
\graphicspath{{images/}{../images/}}
\usepackage[danish]{babel}
%---Wordlist---%
\usepackage[danish]{nomencl} %package to make wordlist
\usepackage{xpatch}
\patchcmd{\thenomenclature} %makes indent in front of all entries
{\leftmargin\labelwidth}
{\leftmargin\labelwidth\itemindent 1em }
{}{}
\makenomenclature %Makes the word list
\setlength\nomlabelwidth{3cm} %distance to explanation text
\renewcommand{\nomname}{Wordlist} %Title of wordlist
\renewcommand{\nompreamble}{Introduction text}
%---Wordlist---%
\begin{document}
\subfile{01}
\subfile{02}
\end{document}
01.tex
\documentclass[main.tex]{subfiles}
\graphicspath{{./img/}{../img}}
\begin{document}
\nomenclature{Varicer}{explanation}
\nomenclature{Lobuli}{explanation}
\nomenclature{Haptocytter}{explanation}
\nomenclature{Fibrose}{explanation}
\printnomenclature
\section{Test1}
Som text Varicer blabla Lobuli.
\end{document}
02.tex
\documentclass[main.tex]{subfiles}
\graphicspath{{./img/}{../img}}
\begin{document}
\section{Test 2}
blablabla Varicer blabla Lobuli bla.
\end{document}
NB: Compile from main file


\autohighlightStyleAandBto\textit. – Steven B. Segletes Mar 11 '21 at 10:19\newcommand\Varicer{\textit{Varicer}}and use your editor to change all occurrences ofVaricerto\Varicer{}. – Steven B. Segletes Mar 11 '21 at 10:22