Bug 838345 - Latex2RTF needs a correct GS_FONTPATH environment variable to convert .tex files with pslatex package
Summary: Latex2RTF needs a correct GS_FONTPATH environment variable to convert .tex fi...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: latex2rtf
Version: 17
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-08 15:18 UTC by Ronan Arraes Jardim Chagas
Modified: 2012-08-01 23:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-01 23:38:24 UTC
Type: Bug
Embargoed:


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

Description Ronan Arraes Jardim Chagas 2012-07-08 15:18:33 UTC
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 15:19:13 UTC
Created attachment 596895 [details]
Error output when GS_FONTPATH is not set

Comment 2 Ronan Arraes Jardim Chagas 2012-07-08 15:20:03 UTC
Created attachment 596896 [details]
.rtf file generated when GS_FONTPATH is not set

Comment 3 Ronan Arraes Jardim Chagas 2012-07-08 15:20:23 UTC
Created attachment 596897 [details]
.rtf file generated when GS_FONTPATH is set

Comment 4 Ronan Arraes Jardim Chagas 2012-08-01 23:38:24 UTC
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.