Re: Aliasing, xyling, ps2pdf

2016-01-09 Thread Guenter Milde
On 2016-01-08, Georg Baum wrote:

...

> Yes, the detection order in lib/configure.py is wrong.

>> Should I file a bug report?

> You couldd as well fix it directly in configure.py.

Done. [9ff11a7935/lyxgit]

Günter




Re: Aliasing, xyling, ps2pdf

2016-01-08 Thread Georg Baum
Guenter Milde wrote:

> If this is true, LyX configuration should choose "pdftops" if both tools
> are installed.
> 
> However, on my system this seems not to be the case:
> 
> * I have both, pdf2ps and pdftops (via package dependencies)
> 
> * still, the LyX-determined converter for 2.2dev is
>   pdf2ps $$i $$o
>   
> Can someone confirm/refute this finding?

Yes, the detection order in lib/configure.py is wrong.

> Should I file a bug report?

You couldd as well fix it directly in configure.py.


Georg




Re: Aliasing, xyling, ps2pdf

2016-01-07 Thread Maria Gouskova
On Wed, Jan 6, 2016 at 5:14 PM, Georg Baum
 wrote:
> Maria Gouskova wrote:
>
>> This is Mac OS 10.8.5, LyX 2.1.4. I suspect I need to define a
>> converter in Preferences/File handling, but am not having much luck
>> finding the answer anywhere.
>
> Correct. If pdftops is in the path, then LyX should automatically define a
> converter
>
> pdftops -eps -f 1 -l 1 $$i $$o
>
> for conversion from PDF (Graphics) to EPS. This one works fine for me with
> your test file. Which converter do you have configured for PDF (Graphics) to
> EPS conversion?
>

I didn't have one defined by default for PDF(graphics) at all. When I
added a PDF(graphics) to EPS converter, it defaulted to:

python -tt $$s/lyx2lyx/lyx2lyx -c big5 $$i > $$o

Which still produces an aliased PDF.

I tried defining it your way, but it seems that pdftops is not
available on my setup. LyX throws up a non-specific error.


I can't debug this properly since I am away from my other machine,
which has Mac OS 10.9x and (as far as I recall) does not have this
problem. Could be a MacTeX version difference? Or just OS-specific?


Re: Aliasing, xyling, ps2pdf

2016-01-07 Thread Guenter Milde
On 2016-01-07, Georg Baum wrote:
>> On Wed, Jan 6, 2016 at 5:14 PM, Georg Baum

...

> BTW, pdftops is better than pdf2ps according to 
> http://stefaanlippens.net/pdf2ps_vs_pdftops and also my own experience.

To sum this up: 
  
  Problem with pdf2ps: fonts are converted to bitmap fonts 
  
  With pdftops [...], the conversion takes less time, the resulting file
  is smaller, and fonts are better preserved. 


If this is true, LyX configuration should choose "pdftops" if both tools are
installed. 

However, on my system this seems not to be the case:

* I have both, pdf2ps and pdftops (via package dependencies)

* still, the LyX-determined converter for 2.2dev is
  pdf2ps $$i $$o
  
Can someone confirm/refute this finding?  

Should I file a bug report?  


Thanks,

Günter



Re: Aliasing, xyling, ps2pdf

2016-01-07 Thread Georg Baum
Maria Gouskova wrote:

> On Wed, Jan 6, 2016 at 5:14 PM, Georg Baum
>  wrote:
>> Maria Gouskova wrote:
>>
>>> This is Mac OS 10.8.5, LyX 2.1.4. I suspect I need to define a
>>> converter in Preferences/File handling, but am not having much luck
>>> finding the answer anywhere.
>>
>> Correct. If pdftops is in the path, then LyX should automatically define
>> a converter
>>
>> pdftops -eps -f 1 -l 1 $$i $$o
>>
>> for conversion from PDF (Graphics) to EPS. This one works fine for me
>> with your test file. Which converter do you have configured for PDF
>> (Graphics) to EPS conversion?
>>
> 
> I didn't have one defined by default for PDF(graphics) at all. When I
> added a PDF(graphics) to EPS converter, it defaulted to:
> 
> python -tt $$s/lyx2lyx/lyx2lyx -c big5 $$i > $$o
> 
> Which still produces an aliased PDF.
> 
> I tried defining it your way, but it seems that pdftops is not
> available on my setup. LyX throws up a non-specific error.

Then you need to install pdftops and either put the executable in a 
directory which is listed in the PATH environment variable, or define the 
converter using the absolute path to the installed pdftops (e.g. if the 
executable is located in /opt/xpdf/bin/pdftops, the converter would read

/opt/xpdf/bin/pdftops -eps -f 1 -l 1 $$i $$o

). You can download a binary from http://www.foolabs.com/xpdf/download.html, 
but since I am not a Mac expert I do not know if there are better ways to 
install it.

> I can't debug this properly since I am away from my other machine,
> which has Mac OS 10.9x and (as far as I recall) does not have this
> problem. Could be a MacTeX version difference? Or just OS-specific?

Probably not MaCTeX speicfic. My guess would be that on the other machine 
either pdftops or ps2eps (from ghostscript) is installed and found by LyX. 
BTW, pdftops is better than pdf2ps according to 
http://stefaanlippens.net/pdf2ps_vs_pdftops and also my own experience.


Georg



Re: Aliasing, xyling, ps2pdf

2016-01-07 Thread Maria Gouskova
On Thu, Jan 7, 2016 at 3:35 PM, Georg Baum
 wrote:
> Maria Gouskova wrote:
>
>> On Wed, Jan 6, 2016 at 5:14 PM, Georg Baum
>>  wrote:
>>> Maria Gouskova wrote:
>>>
 This is Mac OS 10.8.5, LyX 2.1.4. I suspect I need to define a
 converter in Preferences/File handling, but am not having much luck
 finding the answer anywhere.
>>>
>>> Correct. If pdftops is in the path, then LyX should automatically define
>>> a converter
>>>
>>> pdftops -eps -f 1 -l 1 $$i $$o
>>>
>>> for conversion from PDF (Graphics) to EPS. This one works fine for me
>>> with your test file. Which converter do you have configured for PDF
>>> (Graphics) to EPS conversion?
>>>
>>
>> I didn't have one defined by default for PDF(graphics) at all. When I
>> added a PDF(graphics) to EPS converter, it defaulted to:
>>
>> python -tt $$s/lyx2lyx/lyx2lyx -c big5 $$i > $$o
>>
>> Which still produces an aliased PDF.
>>
>> I tried defining it your way, but it seems that pdftops is not
>> available on my setup. LyX throws up a non-specific error.
>
> Then you need to install pdftops and either put the executable in a
> directory which is listed in the PATH environment variable, or define the
> converter using the absolute path to the installed pdftops (e.g. if the
> executable is located in /opt/xpdf/bin/pdftops, the converter would read
>
> /opt/xpdf/bin/pdftops -eps -f 1 -l 1 $$i $$o
>
> ). You can download a binary from http://www.foolabs.com/xpdf/download.html,
> but since I am not a Mac expert I do not know if there are better ways to
> install it.
>
>> I can't debug this properly since I am away from my other machine,
>> which has Mac OS 10.9x and (as far as I recall) does not have this
>> problem. Could be a MacTeX version difference? Or just OS-specific?
>
> Probably not MaCTeX speicfic. My guess would be that on the other machine
> either pdftops or ps2eps (from ghostscript) is installed and found by LyX.
> BTW, pdftops is better than pdf2ps according to
> http://stefaanlippens.net/pdf2ps_vs_pdftops and also my own experience.
>
>
> Georg
>

Okay, thanks--I probably won't do this since I have found a workaround
for my original problem, and the figures and trees all come out
looking good now. I don't usually use ps2pdf anyway, it was only
because of xyling's peculiarity.

By the way, if anyone stumbles upon this discussion in the future, the
solution was to edit the xyling.sty file as follows:

Original:
\RequirePackage[color,all, dvips]{xy}

Change to:
\RequirePackage[color,all]{xy}

This will take away the ability to create color branches in a tree,
which is probably not a big loss. I can't remember ever seeing colored
branches in a published linguistics paper.


Re: Aliasing, xyling, ps2pdf

2016-01-06 Thread Maria Gouskova
On Wed, Jan 6, 2016 at 11:03 AM, Maria Gouskova  wrote:
> Hi all,
>
> I am having trouble with aliasing graphics in the PDF. I have a vector
> graphics file (in PDF format, generated in R), and I am using the
> ps2pdf preview method because I am using an xypic-based tree package.
> The problem is, ps2pdf renders the graphics with aliasing, which looks
> really awful. But previewing with pdflatex kills the branches in the
> tree, a known issue with xypic/pdflatex. I am attaching a minimal
> example and the two PDFs I am getting.
>
> This is Mac OS 10.8.5, LyX 2.1.4. I suspect I need to define a
> converter in Preferences/File handling, but am not having much luck
> finding the answer anywhere.
>
> Maria


P.S. I was able to find a workaround by modifying xyling.sty by hand,
so I can now use pdflatex with xyling. But I am still curious about
what's causing the aliasing in ps2pdf.


Re: Aliasing, xyling, ps2pdf

2016-01-06 Thread Georg Baum
Maria Gouskova wrote:

> This is Mac OS 10.8.5, LyX 2.1.4. I suspect I need to define a
> converter in Preferences/File handling, but am not having much luck
> finding the answer anywhere.

Correct. If pdftops is in the path, then LyX should automatically define a 
converter

pdftops -eps -f 1 -l 1 $$i $$o

for conversion from PDF (Graphics) to EPS. This one works fine for me with 
your test file. Which converter do you have configured for PDF (Graphics) to 
EPS conversion?


Georg