Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luamplib does not recognize dependency #108

Open
Reissner opened this issue Apr 7, 2023 · 2 comments
Open

luamplib does not recognize dependency #108

Reissner opened this issue Apr 7, 2023 · 2 comments

Comments

@Reissner
Copy link

Reissner commented Apr 7, 2023

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
Copy link
Author

Reissner commented Apr 7, 2023

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:

  • if i include my mp code directly via mplicode environment, all is ok, metauml.mp is recognized in the FLS file.
  • if i inlcude my mp file which in turn inputs metauml.mp, then in the FLS file only my mp file occurs.

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

@dohyunkim
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants