FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Reading & Displaying Latex Rendered images
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Reading & Displaying Latex Rendered images [message #178562 is a reply to message #178561] Mon, 02 July 2012 09:54 Go to previous messageGo to previous message
Fastian is currently offline  Fastian
Messages: 20
Registered: June 2012
Karma:
Junior Member
On Monday, July 2, 2012 1:44:28 PM UTC+5, Álvaro G. Vicario wrote:
> El 02/07/2012 9:28, Fastian escribió/wrote:
>> ___________________________________________________________________________ _____I
>> am writing this post to explain my project so that you may give me
>> more relevant suggestions:
>>
>> I have to develop an application that will help us develop a database
>> of questions. These questions will be used for developing tests/
>> exams. Latex is required to enter scientific and mathematical text.
> [...]
>> Guide me which PHP functions will help me in reading and displaying
>> the images as well as merging the images etc. Any suggestion that can
>> help me in this project will highly be appreciated. Thanks!
>
> Alright, I think I finally got what your problem is. Your picture's URL
> is by no means unknown. The URL is always this:
>
> http://www.forkosh.com/mathtex.cgi?formdata=blah
>
> ... where formadata is a GET parameter that contains the raw LaTeX code.
> You can compose the actual URL with rawurlencode(). E.g.:
>
> $latex = '\Large f(x)=\int_{-\infty}^x e^{-t^2}dt';
> $url = 'http://www.forkosh.com/mathtex.cgi?formdata=' .
> rawurlencode($latex);
>
> Once you have the URL, you could download it with many PHP functions,
> including the ones you've been evaluating, but you don't really need to.
> You just have to use the <img> tag in an HTML document and the browser
> will download it for you:
>
> <img src="<?php echo htmlspecialchars($url); ?>">
>
>
> --
> -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web: http://borrame.com
> -- Mi web de humor satinado: http://www.demogracia.com
> --

Done! Thanks for help.
Now I come to the second step of my project that I explained in my second last post in detail that I need to take the question and different options from the user. Then I need to combine/ merge them together in a format of a Multiple Choice Question(MCQ) and display this MCQ on the webpage. As well as I need to store the complete image(MCQ) in the database.
What do you suggest, should I utilize all the input in one go(question + options) and try to bring them in one variable (using some formatting commands/ operators of Latex) and send them for rendering. In this way I hope to get one image for the complete question. (will it be possible and whether Latex help me to format the input to get the desired formatted output)
OR should i take all the inputs as images separately; question separately and all other options separately. Then I merge them to get the desired format of question.
Also mention the appropriate functions or examples if possible.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dreamweaver > can this be done?
Next Topic: Simulating a Form Method=Post submission in PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 17:40:46 GMT 2024

Total time taken to generate the page: 0.04921 seconds