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 #178561 is a reply to message #178559] Mon, 02 July 2012 08:44 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
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
--
[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: Sat Nov 23 02:48:26 GMT 2024

Total time taken to generate the page: 0.04363 seconds