Typesetting System - a kind of TeX compiler/equation editor

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Typesetting System - a kind of TeX compiler/equation editor

Post by Arctic Fox »

Heavily inspired by LaTeX and MathType I have created a typesetting system which sets up equations, formulas and the like.

The system itself is possibly crossplatform, but in the example file I use a multi-line stringgadget (#ES_MULTILINE) and thus it will not compile on Mac OS X or Linux (replace it with an EditorGadget). Please notice that I have tested it under Windows Vista 32-bit only (PB 4.41 and PB 4.50 Beta 2).

Big thanks to luis for the image manipulation routines which I have stolen for this project :D :wink:

Download here: http://www.mediafire.com/?zj3jn0iglaq (version 1.01, last update: 07-04-2010)

Run the example file and try it please :)
I have included some sparse help files in RTF format, but I hope the included examples explain how to use the system :wink:
(uncomment the example you want to try in the example file)

Feel free to enhance, modify or optimize this (I am hopeless when it comes to optimizing code) - have fun! :D
Last edited by Arctic Fox on Wed Apr 07, 2010 4:50 pm, edited 1 time in total.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by Trond »

It seems quite feature-rich.

But what if you want to print b^{4}?

Bug: negative overscripts are raised compared to non-negative.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by Arctic Fox »

Trond wrote:But what if you want to print b^{4}?
If you want to print the text string "b^{4}" without formatting, you have to turn off the syntax interpreting or 'cut' the function with \*.

For instance:

Code: Select all

$$b^{4}\$$
or

Code: Select all

b^\*{4}
Trond wrote:Bug: negative overscripts are raised compared to non-negative.
Can you post the TypeSet$ string which is processed? I shall see what I can do then.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by Trond »

Arctic Fox wrote:
Trond wrote:Bug: negative overscripts are raised compared to non-negative.
Can you post the TypeSet$ string which is processed? I shall see what I can do then.
It was one of the examples, with -2.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by Arctic Fox »

Trond wrote:
Arctic Fox wrote:
Trond wrote:Bug: negative overscripts are raised compared to non-negative.
Can you post the TypeSet$ string which is processed? I shall see what I can do then.
It was one of the examples, with -2.
Okay, I'm on it! Thanks for pointing it out :)
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by Arctic Fox »

Problem fixed - new version uploaded (see first post)
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by srod »

This is awesome Arctic, very very impressive.

You could turn this into a commercial library with a few additional features.
I may look like a mule, but I'm not a complete ass.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Typesetting System - a kind of TeX compiler/equation edi

Post by Arctic Fox »

srod wrote:This is awesome Arctic, very very impressive.
Thank you very much, srod! :D

If I am to distribute this it will probably be as freeware (well, a big part of it is already released as open source, right? :wink:).

However, I think it still needs some optimizing in order to be a "distributable" product. Furthermore some of the new features which come with PB 4.50 (e.g. linked lists in structures) can make it even better. :)
srod wrote:... with a few additional features.
I am open to new ideas 8) :D
(but if it is about those blackboard bold characters, you will have to wait until I get a font editor application as RASHAD suggested) :wink:
Post Reply