Thread: Latex in C

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    27

    Latex in C

    Hello world!!!

    Well, I have here a problem while building my project. Here's a snapshot of what the program should be in the end:
    http://img710.imageshack.us/img710/3127/mashroo3.png

    So I'm trying now to make the latex form for the input entered by the user in the text box...
    Any hints?

    Thanks in advance...

  2. #2
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    I'm not sure if I understand your problem. But i think you get end program look like that, you can either use any latex form API if avaliable or use Opengl to build your own!

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

  3. #3
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    If you mean you are supposed to write a program that looks like that, then you've got some steps -- one is to turn what the user types in into something your program understands (like an expression tree or similar), and then two is to turn that tree into LaTeX format, and then three is to call LaTeX to get the image. We have no idea where you are along this path.

  4. #4
    Registered User
    Join Date
    Mar 2011
    Posts
    27
    Thanks guys for your responses ...

    @ssharish2005:
    I'm now searching for OpenGL

    @tabstop:
    I've built a console program that is capable of dealing with string entered by the user and recognizes the expression i.e. if the user entered "1+2=" the program prints out 3. If the user enter "(1+2)*3" the program prints out 9 and so on.
    So ... What do you think?

    Thanks in advance....

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    The question is more, "Did you save the user input so that you can recreate it later?" If you consume it as you go, then you're in trouble.

  6. #6
    Registered User
    Join Date
    Mar 2011
    Posts
    27
    @tabstop:

    first of all, sorry for my late response. I had to study some electrical circuits.

    and about saving/consuming the user input.. well, it's kinda complicated to explain the algorithm my team came up with. but for the instance we can say that the user input is somehow saved i.e. I can get what I want any time.

    So, would you please tell me what's in your mind?

    and what do you think about OpenGL?

    Thanks in advance...

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Assuming you have it saved, then just walk through your output and spit it out as LaTeX -- that would be not too much of a change from your current output mechanism I would guess. Then you need to find some way to turn that LaTeX output into an image -- a web search can give you some ideas; I've seen some cgi scripts that emit an image right away so you may be able to adapt, adopt, and improve.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LateX Help
    By anirban in forum Tech Board
    Replies: 4
    Last Post: 06-19-2010, 09:05 AM
  2. LateX help
    By anirban in forum Tech Board
    Replies: 1
    Last Post: 08-05-2009, 10:51 AM
  3. LaTeX
    By master5001 in forum A Brief History of Cprogramming.com
    Replies: 49
    Last Post: 10-29-2008, 05:38 PM
  4. LaTeX help
    By Draco in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-18-2007, 03:59 PM
  5. LaTEX help....need LaTex guru advice
    By jodders in forum Tech Board
    Replies: 2
    Last Post: 03-13-2005, 02:51 PM

Tags for this Thread