3
votes
1answer
56 views

adjust uniformdeviate values

I need to insert in the rectangle all my 10 molecules in random way (angle and x,y position). I don't know what is wrong with my code. \startMPinclusions vardef spring (expr a, b, w, h, n) = pair ...
4
votes
1answer
65 views

lost linear_shade output

What is wrong with my code? The second call of SoundEnergy lost the black/white gradient. \startMPinclusions def SoundEnergy = path pr ; pr := unitsquare xscaled .3cm yscaled 2cm ; ...
3
votes
2answers
111 views

metapost, metaobj and labels

I found this trick posted by Aditya some time ago that allowed to use metaobj in context. Currently this code no longer works. Currently, are there any way to use metaobj in context? The main problem ...
4
votes
1answer
179 views

Electron distribution box diagram

Just for sharing. Improvements are welcome. \starttext Electron distribution box diagram \startMPcode picture finalpicture ; finalpicture := nullpicture ; numeric n ; n := 0 ; bboxmargin := 0pt ; ...
2
votes
0answers
43 views

Context mptopdf problem [closed]

I've a problem with the following file input graph u=0.5cm; beginfig(0); draw dashpattern(on 5bp); picture pa; pa=currentpicture; currentpicture:=nullpicture; draw dashpattern(on 5bp off ...
8
votes
2answers
178 views

LuaLaTeX and MetaPost

Is there a LuaLaTeX equivalent of \startMPinclusions input mpfile; \stopMPincusions in ConTeXt? That is, if I have \documentclass{article} \usepackage{luamplib} \begin{document} ...
3
votes
1answer
105 views

Metapost and ConTeX

I am completely new to ConTeXt and have just started to experiment with writing metapost directly within ConTeXt. My problem is that some of my existing metapost files call other metapost files which ...
7
votes
1answer
151 views

ConTeXt+MetaPost: Non-conflicting random background and foreground colours

Overview Looking to create a page that has a random (and non-consecutively repeating) background colour with titles that are also random. Problem The code has two problems. First, generating a ...
5
votes
1answer
183 views

MetaPost: Randomly variably thick curves

Overview Looking to emulate the following sinusoidal wave having random variations in both its filled and outline thickness: The wave has two parts: a variably thick filling and a variably thick ...
6
votes
1answer
169 views

MetaPost: Non-uniform periodic tessellations

Overview Looking to create backgrounds that have regular polygons aligned to a grid. Problem The space between the polygons varies, even though the radius for the polygons has been calculated in ...
8
votes
1answer
175 views

MetaPost: Adjust colour value (brightness/luminosity)

Background In MetaPost, colours can be lightened or darkened by calling the transparency function. However, this allows other colours to show through, which isn't necessarily desirable all the time. ...
5
votes
1answer
96 views

ConTeXt: Randomly lighten or darken a colour within a threshold

Overview Looking to randomize the colours of squares of a checkerboard so that some are slightly lighter and some are slightly darker, relative to another colour. Problem The following sets a base ...
4
votes
0answers
278 views

Is fine-grained grid control possible? [closed]

I want to make a variety of checklists which are essentially based on a grid layout. I care about having fine-grained control over the exact placement of labels and boxes. I do not care about ...
8
votes
1answer
352 views

How to fix this fancy heading in ConTeXT

I don't know if this is a duplicate or not but we can close it if it is. I have been trying to learn ConTeXt. I specially love the heading and page number formattings that I see in the documentations ...
6
votes
1answer
378 views

Type phase symbol in ConTeXt, like LaTeX steinmetz package

I am trying to create an electrical phase symbol in ConTeXt like that produced by the \phase{} command from LaTeX's steinmetz package. Here is what the symbol looks like: Is there something out ...
3
votes
1answer
164 views

Picture and Paragraph in Metapost

How to insert a paragraph in Metapost and a drawing below that? This has to be done within a single Metapost block, (i.e) within a single \startMPcode and \stopMPcode block Sample image :
10
votes
1answer
201 views

How to debug METAPOST inlined in ConTeXt? (Or “message” primitive and “loggingall;” in inlined METAPOST)

I have a METAPOST program that works fine with mpost, but fails when I try to run it inline in ConTeXt. In order to debug it, I would like to see the usual METAPOST logging and/or to use the METAPOST ...
5
votes
1answer
186 views

Metapost - Boundary box

I want to make a series of images with Metapost and Context. I want the height and width of the images to be fixed ( like a frame ) and center the picture drawn with Metapost inside that frame. So, is ...
5
votes
1answer
105 views

Context - Error creating boxes in loop

The following code creates an array of boxes to represent an array. \startMPinclusions input boxes ; \stopMPinclusions \starttext \startluacode function createGraphic(k,c,indH) local i=1 ...
10
votes
2answers
297 views

How to let text flow around irregular-shaped graphics in ConTeXt?

I have some illustrations which I need to scan and place within a document. The illustrations come in various shapes, with no straight edges, and are bound by lots empty white space, e.g.: ...
4
votes
1answer
141 views

How to fine-tune the vertical placement of characters in ConTeXt?

I need to insert a dot symbol, such as “•” or a METAPOST circle into my document, at different heights between the baseline and top of characters, like this example: _____ _____ ...
6
votes
1answer
235 views

ConTeXt MarkIV: Pagenumber in layer not working

I want to put pagenumber and navigation into a layer, but the counter for pagenumber is not working. Here's a minimal example: \usemodule[graph] \usesymbols[nav] \setupsymbolset[navigation 1] ...
6
votes
2answers
173 views

Errors Mpgraph in ConTeXt

I need to put some bar charts in a ConTeXt document. I'm using mkiv from TeX Live 2011, under Gentoo GNU/Linux. I tried using Gnuplot but I found mpgraph suits better my needs. I'm using this TeX ...
5
votes
1answer
320 views

Creating a grid which fills available text area on a page in ConTeXt?

I have some pages containing only a small paragraph at the top and a large empty area where readers can add notes or draw, e.g.: _______________ | | | This is some | | text in a pa- | ...
86
votes
8answers
8k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
38
votes
8answers
5k views

Is anybody using TeX for business reporting?

Would TeX (LaTeX, ConTeXt, etc) be a good solution for PDF business reports that require dynamically generated graphs and tables? I need to create financial reports that must look top-notch in their ...