4

How do I disable the creation of hyperlink with tex4ht? They are unnecessary when preparing a paper for publication in one of those ... (insert any attribute you find appropriate) journals that require Word.

I have removed the hyperref package, no luck. It doesn't appear in the logs, I have checked that. My command line is:

htlatex paper.tex "word" 'symbol/!' "-cvalidate"

The tables, figures and bibliography entries are accessible via hyperlinks. How do I get rid of the anchors and of the links?

EDIT: The document in question uses the natbib package. Adding

\Configure{cite}{}{}{}{}
\Configure{bibitem}{}{}

to a custom .cfg file didn't change anything.

2
  • perhaps you removed hyperlink & cite commands but not all the auxiliary files? I'd try again, no hyperref, no autoref & a clean directory ... Commented Mar 22, 2012 at 23:26
  • @prettygully: Nope, no luck here.
    – krlmlr
    Commented Mar 23, 2012 at 0:46

3 Answers 3

3

Generate html that is compatible with word

  1. htlatex 'html,word' 'symbol/!' (note single quotes are needed in Unix shells to prevent ! being expanded)

  2. Open in Microsoft Word. Change to Print Layout

  3. Select all text (or specific regions as you need)

  4. Cmd-shift F9 (Mac) or Ctrl-shift F9 (PC) removes the field codes and replaces them with the text equivalent

  5. Use advanced search for formatting "superscript + underline" and replace with "superscript + no underline"

  6. (Optional) Use advanced search and replace to change colour of superscripts and to increase point size

  7. Save as Word document

I also find that some manual font size corrections are needed for inline (simple) math symbols

2

Write the following in your .cfg file below \Preamble above \begin{document}:

\renewcommand{\Link}[3][]{}
\renewcommand{\EndLink}{}

Crude and effective.

1

There is an option called hidden-ref. This generates an openoffice file (test.odt which you can then export to word) where all the bib entry links are gone:
htlatex test.tex "xhtml,ooffice,hidden-ref" "ooffice/! -cmozhtf" "-coo -cvalidate"

4
  • Doesn't work for me (Ubuntu, current TeXlive). With these options, there is supposed to exist a file hidden-ref.cfg, but locate tells me there is none. I'm just fetching the most recent updates of TeXlive to see if things change. -- How did you work out this solution? Do you have a reference?
    – krlmlr
    Commented Mar 23, 2012 at 8:12
  • Update: I have found this post by Eitan Gurari. I guess I will have to look out for the file on the web somewhere...
    – krlmlr
    Commented Mar 23, 2012 at 8:18
  • @user946850 : I found an older shell script I used previously - as far as I remember, I did follow instructions I found on the web somewhere. I did check a small example this arvo - it did work (I did not go further than openoffice though); I am on ubuntu 10.04, texlive 2011 (up to date) - and can't find such .cfg either. Commented Mar 23, 2012 at 8:34
  • After some digging I found that hidden-ref is supported in ooffice only and only hides the links, not removes them. I need word for my use case. Thanks anyway.
    – krlmlr
    Commented Mar 23, 2012 at 9:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .