Questions tagged [luamplib]
package to typeset MetaPost code into a `LuaTeX` document, using LuaTeX’s built-in MetaPost Library(`lua` `mplib`)
19
questions
1
vote
1
answer
40
views
MetaPost textual does not operate with luamplib
The code
picture tex_pct;
tex_pct:=btex Too baffled etex scaled 3;
for tkn within tex_pct:
if textual tkn:
show "textual";
fi
endfor
end.
compiled with mptopdf shows 4 "...
1
vote
2
answers
74
views
filling an area between curves using metapost
How could I fill the area between p2 and p3 ? I tried using the buildcycle macro but it didn't work.
path p[];
p1 = fullcircle xscaled 1.2in yscaled 0.6in;
p2 = (-1cm, 0)..(0cm, -0.2cm)..(1cm, 0) ...
0
votes
1
answer
38
views
How to use minted inside metapost
When I try to use minted with metapost (using luamplib)
\begin{mplibcode}
beginfig(3);
picture P;
P = thelabel(btex \vbox{\begin{minted}{c++}
int main() { return 0; }
\end{minted}}...
1
vote
1
answer
154
views
Drawing 2d and 3d vectors using lua or luamplib in LaTeX
Here is the tikz code using which vectors can be drawn.
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{amsmath}
\begin{document}
\tdplotsetmaincoords{60}{120}
\begin{...
1
vote
0
answers
79
views
How can I get a complete circle with labels around the circle
I got this semi-circle for illustration and I need the two mouths to touch each other like exactly a circle still with metric label like what I have in the MWE
% !TeX program = lualatex
\documentclass[...
0
votes
1
answer
143
views
luamesh+luamplib not working in all cases
A bug report
Is it fixable?
I've installed the latest version of gmsh v4.5.6 (http://gmsh.info/) and I'm trying MWE from the luamesh package. I'm using the maillage.geo and maillage.msh files from ...
5
votes
0
answers
148
views
luamplib with animate: drawing glyphs stepwise
I'm trying to combine two ideas and have the Metapost code inside TeX via the luampcode package:
working animation inside TeX (Part 1 below): https://melusine.eu.org/syracuse/luatex/luamplibAnimate/
...
0
votes
3
answers
141
views
Help drawing a circular tikz image on overleaf
Can anyone help to draw this please?
1
vote
0
answers
282
views
Absolute page coordinates of metapost figures using luamplib/lualatex
How can one draw/place metapost figure elements (using luamplib in lualatex) as if the pdf page were a graph paper? So there is origin: (xorigin, yorigin), and all the elements are placed relative to ...
2
votes
1
answer
584
views
How to draw graphs of standard functions using mpgraph?
Is it possible to draw graph of standard functions using mpgraph (probably using lua, mplib)? For example something like gdraw(sin(x)+cos(x)), gdraw(2x+3) and in general gdraw(f(x)) where f(x) is ...
4
votes
1
answer
258
views
Using Lua functions with mplib and mpgraph
This question has reference to the question Error with Lua, Luamplib and Mpgraph
I am trying to use lua functions inside mplib. The detailed code is here.
\documentclass{article}
\usepackage{luacode}...
4
votes
1
answer
163
views
Error with Lua, Luamplib and Mpgraph
The following code works fine.
\documentclass{article}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
input graph ;
beginfig(0) ;
draw begingraph(5cm,3cm)
gdraw (0,0) for x = 1 ...
2
votes
1
answer
317
views
Metapost bounding box and penwidth
When clipping a picture to a bounding box in metapost, extra space outside of the drawn area is included. When this extra space is removed with bboxmargin := 0; it appears that the picture is clipped ...
2
votes
1
answer
93
views
Latex command inside metapost label
This is a minimal code example.
\documentclass[12pt]{article}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1)
label(btex A-\textbf{B} etex,origin);
endfig;
\end{mplibcode}
\end{...
1
vote
1
answer
95
views
luamplib: global definitions without inheritance
Is there a way of globally defining metapost macros using luamplib and without enabling inheritance for mplibcode code blocks? It seems possible since it appears that this is what luamplib does when ...
5
votes
2
answers
193
views
background color with \mpcolor
I'm using following code and I would like to make the color of the background correspond to that of the beamer style. I tried the command background:=\mpcolor{block body example.bg}; but it does not ...
2
votes
1
answer
488
views
luamplib Multiple beginfigures
I'd like to include a METAPOST file that contains multiple beginfig blocks in my LuaLaTeX document. I'm including the file using input filename ; within a mplibcode environment, but this just places ...
3
votes
1
answer
277
views
OpenType MPlib labels with luatex-plain
I am trying to get the luamplib to work with the luatex-plain -format.
I installed BasicTeX2014, and then did tlmgr install context. Then I did luatex --ini /usr/local/texlive/2014basic/texmf-dist/...
7
votes
2
answers
414
views
Is it possible to pass options to mpost.exe using luamplib?
I would like to use the development version of metapost with luamplib. I've switched over the executable mpost.exe which is presumable called by luamplib somewhere along the line. Now, I would like ...