vlasakm / optex-minim Goto Github PK
View Code? Open in Web Editor NEWOpTeX support for minim
License: BSD Zero Clause License
OpTeX support for minim
License: BSD Zero Clause License
Hi, thanks for creating optex-minim - I am doing my first baby steps with optex + minim (your optex-minim i.e.) + metapost (while also looking at the context docs) etc. - having some experience with latex/context, but less so with plain tex - i.e. I am learning all these at the same time - so bear with me, please.
I can (partly) set the background of some pages in optex with metapost in color, like so:
\pgbackground={
\directmetapost{
beginfig(1);
numeric w ; w := 210mm ;
numeric h ; h := 297mm ;
fill unitsquare xscaled .3w yscaled .122h withcolor (0.655, 0.741, 0.690);
fill unitsquare xscaled .3w yscaled .878h yshifted .122h withcolor (0.745, 0.855, 0.690) ;
% and so on
endfig;
}
}
i.e. I want to use slightly more complicated colors - than the usual red/green/blue...
Now, ideally I would use my optex color definitions - there are various ways to do them:
(with \setrgbcolor
, \setHEXcolor
etc. - you know the optex docs)
\def \CornerDarkGreen {\setrgbcolor{0.655 0.741 0.690}}
\def \SideGreen {\setHEXColor{bedab0}}
etc. - now, I am having a hard time accessing / using such definitions in metapost
(and I am not sure: do I need to write a macro to do so? Can I directly access
optex definitions within minim - the minim docs seem to suggest so:
there is a mention of \mpcolor
- well for latex, not optex - and then: a (very general)
section "running tex from within metapost" - but there are not really any examples given.
note that this works (but sets only a certain red level):
\def\mycolor{.625red}
\pgbackground={
\directmetapost{
beginfig(1);
numeric w ; w := 210mm ;
numeric h ; h := 297mm ;
fill unitsquare xscaled .7w yscaled .122h xshifted .3w withcolor \mycolor ;
endfig;
}
}
I don't really know: maybe this is general TeX knowledge - but I am not aware: where does this syntax come from:
{.625red}
- and more importantly: how to use it a little more generally:
this does not work
% not working!!
\def \myothercolor{.625red .8blue}
maybe I need a comma in between red and blue, maybe +
- I think I have tried everything.
maybe I can just use \mpcolor{\CornerDarkGreen}
in the metapost above - I think I have tried this, without success!
Maybe you could provide some hints - or ideally even add an example (to your examples directory)? Thanks!
Hi! I've tried compiling a copy of optex-minim-mp-test.tex
using this package and MMTeX, but it complains about \newcount
being undefined. The log is quite long, but these are the first lines, being the next ones similar:
! Undefined control sequence.
<recently read> \newcount
<to be read again>
\e@alloc@attribute@count
\alloc:makenew ... \newcount \csname #3\endcsname
\csname #3\endcsname 0\fi ...
l.141 ... \attributedef {e@alloc@attribute@count}
! Undefined control sequence.
<recently read> \newcount
<to be read again>
\e@alloc@whatsit@count
\alloc:makenew ... \newcount \csname #3\endcsname
\csname #3\endcsname 0\fi ...
l.142 ... \chardef {e@alloc@whatsit@count}
! Undefined control sequence.
<recently read> \newcount
<to be read again>
\e@alloc@bytecode@count
\alloc:makenew ... \newcount \csname #3\endcsname
\csname #3\endcsname 0\fi ...
I've added files from minim
, as well as ltluatex.lua
, ltluatex.lua
, and etex.src
, to ls-R
, so files seem to be found. What could be happening? IMHO a self-contained optex-minim
would be easier to handle with.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.