[XeTeX] xelatex to doc?

Zdenek Wagner zdenek.wagner at gmail.com
Wed Jan 31 11:18:32 CET 2018


No, neither make4ht nor Acrobat Pro helps. The reason is that generated PDF
contains glyphs but both copy&paste, save as text, save as word, or sace as
whatever requires characters and this information is lost. Moreover, the
order of glyphs does not follow the order of characters in the word. It can
only be solved by asking XeTeX to add /ActualText as a Unicode string to
each word and, of course, use a PDF viewer that does not ignore it. Adobe
Reader is sufficient. The extracted string then contains Unicode characters
and conversion to glyphs is then done by MS Word shaping engine (Uniscribe).

Note: see the well known name Siddhartha where dependent vowel (matra) I is
visually at the very beginning and R is visually at the very end.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

2018-01-31 1:49 GMT+01:00 Ross Moore <ross.moore at mq.edu.au>:

> Hi Robert and Michal,
>
> On Jan 31, 2018, at 8:29 AM, Michal Hoftich <michal.h21 at gmail.com> wrote:
>
> Hi Bob,
>
> On Tue, Jan 30, 2018 at 6:57 PM, Hueckstedt, Robert A. (rah2k)
> <rah2k at virginia.edu> wrote:
>
> With a publisher’s permission I used xelatex to provide them copy, not
> camera-ready copy, for a long book that has Sanskrit in Devanagari  and an
> English translation. Of course, the files I provided the publisher are
> pdfs.
> Now, the publisher wants them in doc. When they try to cut and paste from
> the pdf to doc, none of the conjunct consonants are recognized in the doc
> file. I used the velthuis-sanskrit mapping, and I am wondering if using the
> RomDev mapping would make a difference. I somehow doubt it. Suggestions?
>
>
> You can try to compile your TeX file to HTML using tex4ht. The HTML
> code can be then pasted to Word. Basic command to compile XeTeX file
> to HTML is
>
>   make4ht -ux filename.tex
>
>
> This might work, but first I’d try using Acrobat Pro to save the PDF
> directly into a Word document.
>
> This *can* work really well, especially when the PDF is enriched with
> some tagging and the correct ToUnicode CMap resources for the fonts.
> Try it and see if the result is reasonable.
>
> Alternatively, you can Export to HTML from Acrobat Pro; though I’d
> expect that if the .doc export is no good, then the HTML export would
> suffer from similar issues.
>
> It may even be that Adobe Reader can do these exports now,
> as it is the same code-base.
>
>
> Development version of make4ht can compile also to the ODT format,
> which can be opened directly in Word:
>
>   make4ht -ux -f odt filename.tex
>
> It is possible that you will need some additional configurations for
> the correct compilation. It depends on used packages or custom macros
> in the document.
>
> Best regards,
> Michal
>
>
>
> Hope this helps.
>
> Ross
>
>
> PS. if you don’t have access to Acrobat Pro to try this,
> can you send me a few pages. I’ll then try it for you.
> If the result is good, that may be sufficient reason for you
> to consider investing in a license.
>
>
> Dr Ross Moore
> Mathematics Dept | 12 Wally’s Walk, 734
> Macquarie University, NSW 2109, Australia
> T: +61 2 9850 8955 <+61%202%209850%208955>  |  F: +61 2 9850 8114
> <+61%202%209850%208114>
> M:+61 407 288 255 <+61%20407%20288%20255>  |  E: ross.moore at mq.edu.au
>
> http://www.maths.mq.edu.au
>
>
> <http://mq.edu.au/>
>
>
> CRICOS Provider Number 00002J. Think before you print.
> Please consider the environment before printing this email.
>
> This message is intended for the addressee named and may
> contain confidential information. If you are not the intended
> recipient, please delete it and notify the sender. Views expressed
> in this message are those of the individual sender, and are not
> necessarily the views of Macquarie University.
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20180131/c66562e2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20180131/c66562e2/attachment-0001.png>


More information about the XeTeX mailing list