TeXtoGIF - How do I install it?

  • Thread starter Thread starter DivGradCurl
  • Start date Start date
  • Tags Tags
    install
Click For Summary
The discussion revolves around the challenge of converting equations from a ".tex" file to ".gif" or ".png" formats on a Windows XP system, using a program called Textogif, which is designed for UNIX. The user has encountered compatibility issues since their Perl installation is not in the expected UNIX directory. Suggestions include using Cygwin to run UNIX programs on Windows, although the user has limited disk space for installation. Alternatives like dvipng are mentioned, but the user reports that MikTeX does not include it. The user is also considering latex2html for conversion but faces errors related to a specific line in the script. A suggestion is made to update MikTeX, as it is regularly expanded and updated, which may resolve some issues.
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.
 
I am having a hell of a time finding a good all-in-one inkjet printer. I must have gone through 5 Canon, 2 HP, one Brother, one Epson and two 4 X 6 photo printers in the last 7 yrs. all have all sort of problems. I don't even know where to start anymore. my price range is $180-$400, not exactly the cheapest ones. Mainly it's for my wife which is not exactly good in tech. most of the problem is the printers kept changing the way it operate. Must be from auto update. I cannot turn off the...

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
2K
  • · Replies 4 ·
Replies
4
Views
2K