Tag Info

New answers tagged

1

I only discovered this topic today. So here is a very late attempt with MetaPost, probably very clumsy, but it seems to work nicely. I've not read the other contributions carefully yet, I may come back to catch some nice ideas and include them :-) Any remark is welcome. Basically, the main program prime_tree calls a recursive macro, prime_factorization on ...


3

Here is a version which works with LuaTeX only. The factorization is done using trial division and the help of deterministic Miller-Rabin Algorithm (so should be the quickest). Because of old Lua version and not using a third party BigNum module the code cannot handle (most) big number but will succeed on some. The code was tested for all numbers up to ...


1

I hope not coming too late… About your second question, I use two solutions regularly to integrate MetaPost code directly into a LaTeX document. The first method is using the gmp package already mentioned by dgoodmaniii. \documentclass{article} \usepackage[shellescape]{gmp} \begin{document} \begin{mpost*} beginfig(1); $ := 1; for i = -.3cm step .6cm until ...


3

The problem with using solutions like $ := 1; for i = -.3cm step .6cm until 3.6cm: label.bot(decimal $,(i,-3.7cm)); $ := incr($); endfor; is that the infont operator is called to typeset the labels. infont has very few typesetting abilities, particularly with mathematical expressions, to the contrary of the btex … etex flags which allows the use of ...



Top 50 recent answers are included