lualatex / luamplib

generic TeX package - including MetaPost code in LuaTeX documents
http://ctan.org/pkg/luamplib
17 stars 11 forks source link

luamplib does not recognize dependency #108

Open Reissner opened 1 year ago

Reissner commented 1 year ago

I have the following file test.tex:

\documentclass{article}
\synctex=1
\usepackage{fontspec}
\usepackage{luamplib}
\newcommand*\inputmpcode[1]{\begin{mplibcode}input #1.mp\end{mplibcode}}

\begin{document}
This works with lualatex only. 
Modified \texttt{/usr/share/texmf/luatex/luamplib/luamplib.cfg} 
to get rid of additional files. 
What I hate on \texttt{luamplib} is that it does not provide the command 
\texttt{\textbackslash{}inputmpcode} which I have to provide myself. 
This command is important to provide standalone metapost files 
and to get access to appropriate code highlighting. 

\newcommand{\mytest}{\texttt{my newest test}}

%\inputmpcode{metapostOnMetaUml}
\begin{mplibcode}
input metauml;
beginfig(1);
draw btex \mytest etex;
  Note.xxx("Hello");
  drawObjects(xxx);
  endfig;
  end
bye
\end{mplibcode}
\end{document}

I compile with lualatex -recorder test and obtain a reasonable pdf. The problem is that the FLS file does not contain a line for metauml.mp. If I extract the metapost code into a separate mp file, this is recognized in the FLS file.

The problem disappears if I remove/comment out from luamplib.cfg the line

\mplibcachedir{~/.cache/texmf/luamplib}

But of course if I do so, then my local folder is messed up.

I am not sure whether my distribution specific installation of texlive (suse tumbleweed) is part of the problem.

Reissner commented 1 year ago

Ok some update. Instead of using luamplib.cfg i just set TEXMFVAR. I hate my texlive installation which is nonstandard here. Ok. Then it works without the workaround you suggested.

Means:

Maybe the new problem is, that nested dependencies are not recognized?

dohyunkim commented 1 year ago

I can't reproduce any of the problems you reported.