Bug 838345 - Latex2RTF needs a correct GS_FONTPATH environment variable to convert .tex files with pslatex package
Latex2RTF needs a correct GS_FONTPATH environment variable to convert .tex fi...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: latex2rtf (Show other bugs)
17
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Susi Lehtola
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-08 11:18 EDT by Ronan Arraes Jardim Chagas
Modified: 2012-08-01 19:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-01 19:38:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test file (237 bytes, text/x-tex)
2012-07-08 11:18 EDT, Ronan Arraes Jardim Chagas
no flags Details
Error output when GS_FONTPATH is not set (4.42 KB, text/x-log)
2012-07-08 11:19 EDT, Ronan Arraes Jardim Chagas
no flags Details
.rtf file generated when GS_FONTPATH is not set (4.47 KB, application/rtf)
2012-07-08 11:20 EDT, Ronan Arraes Jardim Chagas
no flags Details
.rtf file generated when GS_FONTPATH is set (9.09 KB, application/rtf)
2012-07-08 11:20 EDT, Ronan Arraes Jardim Chagas
no flags Details

  None (edit)
Description Ronan Arraes Jardim Chagas 2012-07-08 11:18:33 EDT
Created attachment 596894 [details]
Test file

Description of problem:

When you try to convert a .tex file that includes the pslatex package and has equations into a .rtf file using latex2rtf and -M12, you will have errors in the equations conversion because GS_FONTPATH is not set correctly.

pslatex package (http://ctan.org/pkg/pslatex) makes LaTeX use the standard PostScript fonts, like Times. The -M12 in latex2rtf convert inline and displayed equations to .png. Thus, if a .tex file has equations and pslatex packages, then the conversion of such equations into .png file will fail with "invalid font" errors, because the default ghostscript fonts path in Fedora are not set (GS_FONTPATH environment variable).

Version-Release number of selected component (if applicable):

I'm using latex2rtf 2.2.0 (Fedora 17)

How reproducible:

I could reproduce this bug every time I try to convert a .tex that has equations and pslatex package into a .rtf using latex2rtf with -M12.

Steps to Reproduce:
1. Create a .tex file with inline and displayed equations and pslatex package (or download test.tex attached)
2. Compile with pdflatex (everything should work fine)
3. Try to convert to a .rtf file using latex -M12 -D300 <NAME>.tex
  
Actual results:

You will see errors about 'invalid font' (see attached error log for the conversion of test.tex).

Expected results:

The conversion should work correctly.

Additional info:

The problem is gone if you use the command:

GS_FONTPATH=/usr/share/fonts/default/Type1/ latex2rtf -M12 -D300 <NAME>.tex
Comment 1 Ronan Arraes Jardim Chagas 2012-07-08 11:19:13 EDT
Created attachment 596895 [details]
Error output when GS_FONTPATH is not set
Comment 2 Ronan Arraes Jardim Chagas 2012-07-08 11:20:03 EDT
Created attachment 596896 [details]
.rtf file generated when GS_FONTPATH is not set
Comment 3 Ronan Arraes Jardim Chagas 2012-07-08 11:20:23 EDT
Created attachment 596897 [details]
.rtf file generated when GS_FONTPATH is set
Comment 4 Ronan Arraes Jardim Chagas 2012-08-01 19:38:24 EDT
It turns out that the problem was with infinality patches in fontconfig. It was blocking Type1 fonts because it does not render well. When I remove this block, everything works. Thus, it isn't a Fedora issue. Sorry for that.

This bug can be closed.

Note You need to log in before you can comment on or make changes to this bug.