TeXtoGIF - How do I install it?

  • Thread starter Thread starter DivGradCurl
  • Start date Start date
  • Tags Tags
    install
Click For Summary

Discussion Overview

The discussion revolves around the installation and use of the TeXtoGIF program for converting equations from a ".tex" file into image formats like ".gif" or ".png". Participants explore various methods and tools available for Windows XP, particularly in the context of compatibility issues with UNIX-based software.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in using TeXtoGIF on Windows XP due to its UNIX-specific design and seeks assistance with installation.
  • Another participant suggests finding a Windows-compatible version of the software or using Cygwin to run UNIX applications, although this may require additional effort.
  • A different participant mentions that MikTeX includes a program called dvipng for converting dvi files to png, providing a list of options for its usage.
  • One participant indicates that they cannot find dvipng in their MikTeX installation and considers using latex2html instead, but encounters an error related to a variable in a script.
  • Another participant recommends updating MikTeX, suggesting that it is regularly expanded and updated.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method to convert TeX files to image formats, with multiple competing views and approaches being discussed. The discussion remains unresolved regarding the most effective solution for the original poster's problem.

Contextual Notes

Some participants mention limitations related to system compatibility, available software tools, and specific error messages encountered during installation or execution of commands.

DivGradCurl
Messages
364
Reaction score
0
I need to convert equations inside of a ".tex" file into a ".gif" or ".png" file. I've found this program called Textogif that does exactly that (http://www.fourmilab.ch/webtools/textogif/textogif.html). The main problem is that my PC runs Windows XP, while the author of this program made it specifically to UNIX. In fact, he tells that "given the number of Unix-specific dirty tricks employed by Textogif, it is extremely unlikely it will work under other operating systems without modifications."

I'm not used to doing things in UNIX, so I really need some help. I've downloaded and extracted textogif-1.1.gz, and I also have the requirements: Perl, TeX, LaTeX2e, dvips, Ghostscript, and Netpbm. My Perl is not located in the "/usr/bin/perl" directory, but in "C:\Perl\bin" (again, because I'm running Windows). I tried changing that in the perl script, but it doesn't work.

Any help is highly appreciated.
 
Last edited:
Computer science news on Phys.org
TeX (or atleast MikTeX) includes a program to convert dvi -> png:

dvipng.exe -help

Usage: %s [OPTION]... FILENAME[.dvi]
Options are chosen to be similar to dvips' options where possible:
-D # Output resolution
-l # Last page to be output
--mode s MetaFont mode (default 'cx')
-M* Don't make PK fonts
-o f Output file, '%%d' is pagenumber
-O c Image offset
-p # First page to be output
-pp #,#.. Page list to be output
-q* Quiet operation
-r* Reverse order of pages
-T c Image size (also accepts '-T bbox' and '-T tight')
-v* Verbose operation
-x # Override dvi magnification
- Interactive query of options

These do not correspond to dvips options:
-bd # Transparent border width in dots
-bdpi # Set the base (Metafont) resolution
-bg s Background color (TeX-style color)
--depth* Output the image depth on stdout
--dvinum* Use TeX page numbers in output filenames
-fg s Foreground color (TeX-style color)
--follow* Follow mode
--height* Output the image height on stdout
--truecolor* Truecolor output
-Q # Quality (T1lib and PK subsampling)
-z # PNG compression level

# = number f = file s = string * = suffix, '0' to turn off

c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)
 
I don't have much space left in my PC, so it won't be possible to install cygwin. About dvipng, my MikTeX doesn't seem to have it. Whenever I call it, the computer says it cannot be found. Thanks anyway.

I'm now considering using latex2html, since it outputs all the png's (besides the html pages). In theory, it sounds great. However, I'm having a problem. I've installed all the requirements along with latex2html, but an error always occurs while trying to convert the images:

Global symbol "$PNMFILE" requires explicit package name at pstoimg.bat line 1285.

I took a look at that line, but it seems ok. I just don't know what to do now.

Again, thank you very much.

PS: here is line 1285

sub get_image_geometry {
my ($pnmfile) = @_;

my ($type,$width,$height);
my $out = `$PNMFILE $pnmfile`;
if($? || $out =~ /(P[BGP]M)[^0-9]*(\d+)\s*by\s*(\d+)/i) {
$type = $1;
$width = $2;
$height = $3;
print qq{Image "$pnmfile" is $type, ${width}x$height\n} if($opt{debug});
} else {
print "$prompt: Error: Could not determine image size: $out\n";
return undef;
}
($type,$width,$height);
}
 
Last edited:
thiago_j said:
I don't have much space left in my PC, so it won't be possible to install cygwin. About dvipng, my MikTeX doesn't seem to have it. Whenever I call it, the computer says it cannot be found. Thanks anyway.

Why don't you update your MikTeX, its being exspanded and updated reguarly.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
5K
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
8K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K