Skip to main content

Questions tagged [luamplib]

package to typeset Meta­Post code into a `LuaTeX` doc­u­ment, using LuaTeX’s built-in Meta­Post Li­brary(`lua` `mplib`)

Filter by
Sorted by
Tagged with
-1 votes
2 answers
62 views

How to reproduce this bar chart in LaTeX using either pgfplots or luamplib?

I'm trying to recreate the attached bar chart using LaTeX, but I'm not sure which package would be more suitable, between pgfplots and luamplib. As you can see in the chart, there are multiple ...
Yusef Hamdellah's user avatar
2 votes
1 answer
96 views

using Lua from within MetaPost

Is it possible to run a Lua function from within luamplib environment? This example with runscript does not work, but shows what I like to do: \documentclass{article} \usepackage{iftex,luamplib} \...
user187802's user avatar
  • 17.6k
1 vote
1 answer
60 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 "...
Maxime Chupin's user avatar
1 vote
2 answers
98 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) ...
Mechap's user avatar
  • 125
0 votes
1 answer
45 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}}...
Mechap's user avatar
  • 125
1 vote
1 answer
225 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{...
user61681's user avatar
  • 1,789
1 vote
0 answers
89 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[...
Daniel James's user avatar
0 votes
1 answer
156 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 ...
Malipivo's user avatar
  • 13.3k
5 votes
0 answers
168 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/ ...
Malipivo's user avatar
  • 13.3k
0 votes
3 answers
157 views

Help drawing a circular tikz image on overleaf

Can anyone help to draw this please?
Rivas's user avatar
  • 97
1 vote
0 answers
317 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 ...
codepoet's user avatar
  • 1,316
2 votes
1 answer
604 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 ...
user61681's user avatar
  • 1,789
4 votes
1 answer
280 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}...
user61681's user avatar
  • 1,789
4 votes
1 answer
175 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 ...
user61681's user avatar
  • 1,789
2 votes
1 answer
367 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 ...
Scott H.'s user avatar
  • 11.1k
2 votes
1 answer
95 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{...
MB4E's user avatar
  • 1,116
1 vote
1 answer
112 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 ...
Scott H.'s user avatar
  • 11.1k
5 votes
2 answers
202 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 ...
MB4E's user avatar
  • 1,116
2 votes
1 answer
518 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 ...
Jasper's user avatar
  • 25
3 votes
1 answer
279 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/...
morbusg's user avatar
  • 25.6k
7 votes
2 answers
422 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 ...
Scott H.'s user avatar
  • 11.1k