bugGNU Octave - Bugs: bug #49338, Error preventing the creation of...

 
 

bug #49338: Error preventing the creation of valid latex output with non-ascii chars under fltk

Submitted by:  None
Submitted on:  Thu 13 Oct 2016 07:21:36 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: R.S.CarmenesOriginator Email: -unavailable-
Open/Closed: OpenRelease: 4.2.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 14 Oct 2016 04:10:27 PM UTC, comment #3:

Just another idea that may be simpler and cleaner: relying on an external user-configured file jusl like gnuplot does, containing the correct latex heading. If present, gnuplot uses the folowing file:

/usr/share/texmf/tex/latex/gnuplot/gnuplot.cfg

For example, in my setup, this file contains simply:

Maybe octave could use that same file too, so that the right encoding for fltk would be set at the same time as for gnuplot?

Anonymous
Fri 14 Oct 2016 03:49:42 PM UTC, comment #2:

Yes, you are right. I'm using Linux, but have it configured to use latin1 for my convenience, hence, hardcoding \usepackage[T1]{fontenc} was right for me but won't be for others. I did no realise that fact.

In the case of graphics_toolkit gnuplot, it is gnuplot that take care of selecting the right char encoding through a system-wide or user-wide gnulot configuration file. However, with fltk, it is octave which is taking care of creating the latex file itself, so I supose that octave should also take care of creating the right latex headings depending on the encoding being set on the current computer. A naïve implementation could consist in making print.m to check the current LANG environment variable before issuing the latex headings ...

Anonymous
Fri 14 Oct 2016 01:32:57 PM UTC, comment #1:

Hi,

Thanks for your bug report. I can reproduce the bug (whatever the version of gl2ps between 1.3.8 an current dev) and your solution produces a compile ready .tex file but the output pdf is still wrong. One has to specify the encoding through "\usepackage[opt]{inputenc}": "opt" being "utf8" for me on linux but probably "latin1" on some other systems like Windows. Now how to decide what encoding the target system is using?

Pantxo Diribarne <pantxo>
Project Member
Thu 13 Oct 2016 07:21:36 PM UTC, original submission:

Hello, this is a bug report regarding the printing of plots with texts containing non-ascii chars. I am providing what I believe is a valid the solution too.

The latex file created under the graphics_toolkit fltk will not compile when the plot contains non-ascii chars.

testfile:

(the string in the title command contains two latin-1 chars; I believe the same problem would be the same with other encodings).

Executing pdflatex test.tex will fail, complaining at the non-ascii chars.This is due to the absence of the following in the generated latex file:

\usepackage[T1]{fontenc}

together with the inability to pass the non-ascii chars to the latex file.

A third error in the file prevents from getting a valid latex file with recent GL2PS.

Patching print.m with the attached file will solve the problem (first change incorporates the missing heading, the second one makes print.m able to read non-ascii chars, and the third removes the line that seems incompatible with recent versions of GL2PS).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #38721:  latin1-fltk.patch added by None (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 17 Nov 2016 05:52:49 AM UTCmtmillerRelease4.2.0-rc2=>4.2.0
    Fri 14 Oct 2016 01:32:57 PM UTCpantxoStatusNone=>Confirmed
    Thu 13 Oct 2016 07:21:36 PM UTCNoneAttached File-=>Added latin1-fltk.patch, #38721

    Back to the top


    Powered by Savane 3.1-cleanup1