View Full Version : Latex, PDF and the PRS-600 Dictionary


s3ntient
11-05-2009, 01:18 PM
Hello,

Up until recently, I have been creating my ebooks with Microsoft Word and exporting to PDF for reading on my PRS-600.

This worked fine, however I wanted more control over my fonts, justification, etc. so I recently started using XeLaTeX to create my PDFs.

Since switching to XeLaTeX, I notice that I can no longer use the dictionary feature of the PRS-600. The reason is that now, when I double-tap a word, it selects everything from the previous punctuation mark to the next instead of just the word.

Does anyone know why this happens with a PDF output from XeLaTeX and not with a PDF output from Word? How can I correct this behaviour?

:help:

frabjous
11-05-2009, 02:18 PM
Interesting. I have noticed that XeLaTeX does sometimes do strange things with how it encodes characters and embeds fonts. Just as a point of comparison, do you have the same problem if you generate using plain LaTeX 2e with type 1 fonts?

WillAdams
11-05-2009, 02:57 PM
The problem is likely caused by the spaces being omitted when the .pdf is built --- instead they're encoded in as positional information which the .pdf renderer is ignoring.

If memory serves, you can get it to insert the spaces by adding:

\XeTeXinterchartokenstate=1

to your document preamble.

William

s3ntient
11-05-2009, 04:47 PM
Interesting. I have noticed that XeLaTeX does sometimes do strange things with how it encodes characters and embeds fonts. Just as a point of comparison, do you have the same problem if you generate using plain LaTeX 2e with type 1 fonts?

I tried a few things, here are the results:

Using LaTeX 2e with type 1 fonts, the same behaviour: double-tapping selects from previous punctuation mark to next.
Using LaTeX 2e with type 1 fonts, I tried enclosing a single word between two punctuation marks, double-tapping recognizes the word and brings up the definition.
As mentioned, using XeLaTeX double-tapping selects from previous punctuation mark to next.
Using XeLaTeX with OTF fonts embedded as type 1, double-tapping a word enclosed between two punctuation marks selects the word but does not recognize it as a word or bring up the definition.


The problem is likely caused by the spaces being omitted when the .pdf is built --- instead they're encoded in as positional information which the .pdf renderer is ignoring.

If memory serves, you can get it to insert the spaces by adding:

\XeTeXinterchartokenstate=1

to your document preamble.

William

I would agree with you 100%, the problem is the handling of spacing between characters/words.

I looked up the command you mentioned, it enables you to insert tokens between different characters. However I'm not quite sure how to use it to solve my problem, or even if these interchartokens can solve my problem.


Thank you both for you replies :)

WillAdams
11-06-2009, 10:35 AM
OIC. In that case, for xelatex, it's likely an issue of the pdf viewer failing to understand how the font is encoded.

I would try sending a sample file to Sony and seeing if they'd look into it.

William