Re: [O] fontenc makes pdf non-searchable

2015-08-08 Thread Bastien
Martin Leduc mart...@hotmail.com writes:

 Hi Bastien,  thanks a lot for your response but I finally solved the
 issue by installing the package cm-super.

Thanks for confirming!

-- 
 Bastien



Re: [O] fontenc makes pdf non-searchable

2015-08-07 Thread Martin Leduc
Hi Bastien,  thanks a lot for your response but I finally solved the issue by 
installing the package cm-super.
Cheers,
Martin

 From: b...@gnu.org
 To: mart...@hotmail.com
 CC: emacs-orgmode@gnu.org
 Subject: Re: fontenc makes pdf non-searchable
 Date: Wed, 5 Aug 2015 02:00:52 +0200
 
 Hi Martin,
 
 Martin Leduc mart...@hotmail.com writes:
 
  However, when opening the experted pdf (with evince or okular) and
  searching for a word, the output from the search function is a list
  of words with apparently incorrect character encoding.
 
  I get the same result when compiling directly the exported tex file.
  However, if I remove the line:
 
  \usepackage[T1]{fontenc}
 
  the compiled pdf becomes correctly interpreted by the search
  function. According to the documentation of the org-article latex
  class, There is no facility to disable loading fontenc.
 
  What should I do to make the pdf searchable with the org exporter ?
 
 I would try to remove the relevant entry from
 `org-latex-default-packages-alist'.  Did you try this?
 
 -- 
  Bastien
  

Re: [O] fontenc makes pdf non-searchable

2015-08-04 Thread Bastien Guerry
Hi Martin,

Martin Leduc mart...@hotmail.com writes:

 However, when opening the experted pdf (with evince or okular) and
 searching for a word, the output from the search function is a list
 of words with apparently incorrect character encoding.

 I get the same result when compiling directly the exported tex file.
 However, if I remove the line:

 \usepackage[T1]{fontenc}

 the compiled pdf becomes correctly interpreted by the search
 function. According to the documentation of the org-article latex
 class, There is no facility to disable loading fontenc.

 What should I do to make the pdf searchable with the org exporter ?

I would try to remove the relevant entry from
`org-latex-default-packages-alist'.  Did you try this?

-- 
 Bastien



Re: [O] fontenc makes pdf non-searchable

2015-03-23 Thread J. David Boyd
Stefan Nobis stefan...@snobis.de writes:

 Martin Leduc mart...@hotmail.com writes:

 You can find a minimal example here[1], with the org file, and the
 tex and pdf files generated from it. Firts try to search within the
 pdf. It does not work (at least on my side) To solve the problem,
 remove the line with \usepackage[T1]{fontenc}

 Your PDF is not generated with pdflatex (or a newer engine like
 lualatex), but with dvips and Ghostscript. Thus the fonts are not PS
 Type 1 fonts, but Type 3 fonts (bitmap instead of vector; therefore
 scaling/zooming will result in bad quality).

 I'm not quite sure if this is also the root cause of the inability to
 search. But if i recompile your tex-file (from [1]) with pdflatex, I
 get Type 1 fonts and have no problems with searching.

 Therefore I would suggest to switch the engine to pdflatex.

 Another hint: You should try the Latin Modern font (put a
 \usepackage{lmodern} after loading fontenc) -- it's the
 (technically) modern variant of Computer Modern (the old TeX default
 font). Lati Modern is available as OpenType font and has less problems
 with Unicode and special characters like german umlauts (ä, ü,...) or
 other non-ASCII letters.

 And maybe you should also have a look at biblatex[2] (as a much more
 flexible alternative to natbib).

 [1] https://www.dropbox.com/sh/7s6di4en5ljbkcq/AAAzyQeg6VkMHnC1X9dQTg6ua?dl=0
 [2] http://ctan.org/pkg/biblatex

And how did you determine that please?   And how would it be switched?

Dave




Re: [O] fontenc makes pdf non-searchable

2015-03-23 Thread Stefan Nobis
Martin Leduc mart...@hotmail.com writes:

 You can find a minimal example here[1], with the org file, and the
 tex and pdf files generated from it. Firts try to search within the
 pdf. It does not work (at least on my side) To solve the problem,
 remove the line with \usepackage[T1]{fontenc}

Your PDF is not generated with pdflatex (or a newer engine like
lualatex), but with dvips and Ghostscript. Thus the fonts are not PS
Type 1 fonts, but Type 3 fonts (bitmap instead of vector; therefore
scaling/zooming will result in bad quality).

I'm not quite sure if this is also the root cause of the inability to
search. But if i recompile your tex-file (from [1]) with pdflatex, I
get Type 1 fonts and have no problems with searching.

Therefore I would suggest to switch the engine to pdflatex.

Another hint: You should try the Latin Modern font (put a
\usepackage{lmodern} after loading fontenc) -- it's the
(technically) modern variant of Computer Modern (the old TeX default
font). Lati Modern is available as OpenType font and has less problems
with Unicode and special characters like german umlauts (ä, ü,...) or
other non-ASCII letters.

And maybe you should also have a look at biblatex[2] (as a much more
flexible alternative to natbib).

[1] https://www.dropbox.com/sh/7s6di4en5ljbkcq/AAAzyQeg6VkMHnC1X9dQTg6ua?dl=0
[2] http://ctan.org/pkg/biblatex
-- 
Until the next mail...,
Stefan.



Re: [O] fontenc makes pdf non-searchable

2015-03-23 Thread Stefan Nobis
dbo...@mmm.com (J. David Boyd) writes:

 And how did you determine that please?

I assume you mean how I determined that the PDF has been produced by
dvips and Ghostscript. In this case: I've just looked into the
document information of the PDF file. For example with Acrobat Reader
I just press CMD+D, with Apple Preview its CMD+I (look out in the
menus for document information or properties).

In this document information there is somewhere a line like PDF
creator. If the PDF is created with pdftex or pdflatex, this line
should read something like pdfTeX-1.40.15.

Each PDF viewer shows a different degree of details about the file.
For example with Apple Preview I do not see the used fonts, these are
only shown by Acrobat Reader (or command line tools like pdffonts from
xpdf).

 And how would it be switched?

The default settings of org-mode uses pdflatex. The compilation
process is configurable via the variable org-latex-pdf-process.

I don't know why and how Martin used dvips+gs. Maybe he just generated
the tex file with org and used another tool for generating PDF. Or
maybe he customized org-latex-pdf-process.

-- 
Until the next mail...,
Stefan.



Re: [O] fontenc makes pdf non-searchable

2015-03-23 Thread Martin Leduc
You're right, I customized org-latex-pdf-process, which now call a script that 
basically does latex/dvips/ps2pdf. 
I cannot use pdflatex since my figures are from eps images.

Martin


dboyd2 at mmm.com (J. David Boyd) writes:

 And how did you determine that please?

I assume you mean how I determined that the PDF has been produced by
dvips and Ghostscript. In this case: I've just looked into the
document information of the PDF file. For example with Acrobat Reader
I just press CMD+D, with Apple Preview its CMD+I (look out in the
menus for document information or properties).

In this document information there is somewhere a line like PDF
creator. If the PDF is created with pdftex or pdflatex, this line
should read something like pdfTeX-1.40.15.

Each PDF viewer shows a different degree of details about the file.
For example with Apple Preview I do not see the used fonts, these are
only shown by Acrobat Reader (or command line tools like pdffonts from
xpdf).

 And how would it be switched?

The default settings of org-mode uses pdflatex. The compilation
process is configurable via the variable org-latex-pdf-process.

I don't know why and how Martin used dvips+gs. Maybe he just generated
the tex file with org and used another tool for generating PDF. Or
maybe he customized org-latex-pdf-process.

-- 
Until the next mail...,
Stefan.   

Re: [O] fontenc makes pdf non-searchable

2015-03-22 Thread William Denton

On 21 March 2015, Martin Leduc wrote:


You can find a minimal example here [1], with the org file, and the tex and pdf 
files generated from it. Firts try to search within the pdf. It does not work 
(at least on my side) To solve the problem, remove the line with
\usepackage[T1]{fontenc}

in the tex file, and compile it. It should now search normally.


It works for me is all I can say, which isn't too helpful.  Everything happens 
as it should, and I can search the PDF (in evince).  Maybe it's something with 
your LaTeX setup?  Sorry I can't suggest anything more.


Bill

[1] https://www.dropbox.com/sh/7s6di4en5ljbkcq/AAAzyQeg6VkMHnC1X9dQTg6ua?dl=0

--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/

Re: [O] fontenc makes pdf non-searchable

2015-03-22 Thread Martin Leduc
Hey  finally your response helped me a lot, that is the problem was probably on 
my side.

I solved it by installing the package cm-super, as suggested here. I still 
can't search in the pdf I gave you (and still wondering why YOU can), but 
re-exporting the org file makes a pdf that now works correctly.

Thanks again !
Martin






 Date: Sun, 22 Mar 2015 13:56:45 -0400
 From: w...@pobox.com
 To: mart...@hotmail.com
 CC: emacs-orgmode@gnu.org
 Subject: Re: [O] fontenc makes pdf non-searchable
 
 On 21 March 2015, Martin Leduc wrote:
 
  You can find a minimal example here [1], with the org file, and the tex and 
  pdf files generated from it. Firts try to search within the pdf. It does 
  not work (at least on my side) To solve the problem, remove the line with
  \usepackage[T1]{fontenc}
 
  in the tex file, and compile it. It should now search normally.
 
 It works for me is all I can say, which isn't too helpful.  Everything 
 happens 
 as it should, and I can search the PDF (in evince).  Maybe it's something 
 with 
 your LaTeX setup?  Sorry I can't suggest anything more.
 
 Bill
 
 [1] https://www.dropbox.com/sh/7s6di4en5ljbkcq/AAAzyQeg6VkMHnC1X9dQTg6ua?dl=0
 
 -- 
 William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/
  

Re: [O] fontenc makes pdf non-searchable

2015-03-21 Thread William Denton

On 21 March 2015, Martin Leduc wrote:


I'm using org-mode to write a paper and export it to a pdf. It compiles just 
fine.

However, when opening the experted pdf (with evince or okular) and searching 
for a word, the output from the search function is a list of words with 
apparently incorrect character encoding.

I get the same result when compiling directly the exported tex file. However, 
if I remove the line:

\usepackage[T1]{fontenc}

the compiled pdf becomes correctly interpreted by the search function. According to the 
documentation of the org-article latex class, There is no facility to disable 
loading fontenc.


That seems odd to me.  Can you provide an ECM, a minimal complete example, that 
causes this problem?


Bill
--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/

Re: [O] fontenc makes pdf non-searchable

2015-03-21 Thread Martin Leduc
Thanks for your response Bill.

You can find a minimal example here, with the org file, and the tex and pdf 
files generated from it. Firts try to search within the pdf. It does not work 
(at least on my side) To solve the problem, remove the line with 
\usepackage[T1]{fontenc}

in the tex file, and compile it. It should now search normally.

Martin 


 Date: Sat, 21 Mar 2015 12:24:31 -0400
 From: w...@pobox.com
 To: mart...@hotmail.com
 CC: emacs-orgmode@gnu.org
 Subject: Re: [O] fontenc makes pdf non-searchable
 
 On 21 March 2015, Martin Leduc wrote:
 
  I'm using org-mode to write a paper and export it to a pdf. It compiles 
  just fine.
 
  However, when opening the experted pdf (with evince or okular) and 
  searching for a word, the output from the search function is a list of 
  words with apparently incorrect character encoding.
 
  I get the same result when compiling directly the exported tex file. 
  However, if I remove the line:
 
  \usepackage[T1]{fontenc}
 
  the compiled pdf becomes correctly interpreted by the search function. 
  According to the documentation of the org-article latex class, There is no 
  facility to disable loading fontenc.
 
 That seems odd to me.  Can you provide an ECM, a minimal complete example, 
 that 
 causes this problem?
 
 Bill
 -- 
 William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/
  

[O] fontenc makes pdf non-searchable

2015-03-20 Thread Martin Leduc
Hi all,
  I'm using org-mode to write a paper and export it to a pdf. It compiles just 
fine. 

However, when opening the experted pdf (with evince or okular) and searching 
for a word, the output from the search function is a list of words with 
apparently incorrect character encoding. 

I get the same result when compiling directly the exported tex file. However, 
if I remove the line:

\usepackage[T1]{fontenc}

the compiled pdf becomes correctly interpreted by the search function. 
According to the documentation of the org-article latex class, There
is no facility to disable loading fontenc.

What should I do to make the pdf searchable with the org exporter ?

Thanks,
Martin