inserting a latex command

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

inserting a latex command

Pierre BASSO
I have recently discovered pngcrush. I have a folder of png images, I'd
wish insert into each image a latex command. My aim is to generate a
pannel of mathematical symbols, each one represented by a png icon;
moreover I want that clicking on  one of these icones displays  the
corresponding latex in the editor window of my text.
I tried  the following commands
pngcrush -text b "title"  "latexcommand" input.png  output.png
pngcrush -text a "title"  "latexcommand" input.png  output.png

These commands generated an output.png file but after integrating this
file into my latex editor,  clicking on the icon does nothing.

I tried the same commands with the options -itxt or -ztxt but pgncrush
failed, I get no output file.
The same bug occurs if I replace the keyword "title" by the keyword
"comment".

Please, do you have an idea for solving this problem?  Is a new chunck
or a new keyword option needed?
Another question: I dont find some option allowing to read all the
contents of a png file, its chuncks and so on ..

I work with MacOSX El Capitan, I installed pngcrush-1.8.1 with Homebrew;
my latex editor is texstudio.

Regards.


Pierre Basso


Reply | Threaded
Open this post in threaded view
|

Re: inserting a latex command

glennrp-2

----- Pierre BASSO <[hidden email]> wrote:

> I have recently discovered pngcrush. I have a folder of png images, I'd
> wish insert into each image a latex command. My aim is to generate a
> pannel of mathematical symbols, each one represented by a png icon;
> moreover I want that clicking on  one of these icones displays  the
> corresponding latex in the editor window of my text.
> I tried  the following commands
> pngcrush -text b "title"  "latexcommand" input.png  output.png
> pngcrush -text a "title"  "latexcommand" input.png  output.png
>
> These commands generated an output.png file but after integrating this
> file into my latex editor,  clicking on the icon does nothing.
>
> I tried the same commands with the options -itxt or -ztxt but pgncrush
> failed, I get no output file.
> The same bug occurs if I replace the keyword "title" by the keyword
> "comment".
>
> Please, do you have an idea for solving this problem?  Is a new chunck
> or a new keyword option needed?
> Another question: I dont find some option allowing to read all the
> contents of a png file, its chuncks and so on ..
>
> I work with MacOSX El Capitan, I installed pngcrush-1.8.1 with Homebrew;
> my latex editor is texstudio.


Hi,

Note that the text chunks (tEXt, iTXt, or zTXt) don't change the PNG
image.  They only contain text that is associated with the image.
You can use some application such as pngcrush to retrieve that text:

    pngcrush -n -v output.png

I don't know of any application that extracts a text chunk from a
PNG and renders it as a TeX image, but it sounds like a useful thing.
I do know that "latex2png" and "TEX2PNG" exist; they take a LaTeX string
as input and create a PNG image with the rendered TeX.


Glenn