|
Document 344
Exporting cross-references in HTML
Version: 4.x & 5.x - Scientific WorkPlace, Scientific Word
Because beautiful typesetting is more appropriate in print than on the web,
the HTML filter in Versions 4.x and 5.x ignores most document elements that are
generated automatically by LaTeX. These elements include cross-references,
index entries, citations, bibliographies, and TeX fields.
Therefore, when you use the Export Document feature to create an .htm version
of your .tex document, cross-references to numbered elements don't appear as
you might expect. For example, a sentence with cross-references that appears
in your SWP/SW document as
Section
discusses Eqn.
(
)
and....
where
is a cross-reference to section 4 of the document and
is a cross-reference to the first equation, will typeset as
Section 4 discusses Eqn. (1) and....
But it appears in the HTML file created by Version 5 with the referenced keys
used to complete the cross-references, like
this
Section discussion discusses Eqn. (basic) and....
In the HTML file created by Version 4.x the sentence appears as
Section discusses Eqn. ( ) and....
with no automatically generated section or equation number and no links from
which jumping is possible.
Publishing considerations
Knowing how you want to publish your document is important:
-
If you expect to publish primarily on the web, using the HTML export filter,
create hypertext links instead of cross-references and otherwise avoid
automatically generated document elements.
-
If you expect to publish primarily in print, using LaTeX to typeset your
document, leave your document unchanged so that you can take advantage of all
the typesetting capabilities that LaTeX has to offer.
-
If, however, you want the .htm version of your document to reflect at least
the cross-references created by LaTeX, you can change the htmlout.dat file so
that the filter recognizes them.
Keep in mind, though, that even with the
change, the HTML filter ignores section numbers, equation numbers, and other
generated elements, so while you may be able to use a cross-reference in
HTML to refer to, say, Section 4, the number 4 won't appear next to the
section title in the .htm version of the document unless you place it there
manually. Further, the change to the htmlout.dat file supports using
cross-references to jump to most markers, but not to
equation numbers.
Changing the htmlout.dat file
Here's how to change the htmlout.dat file:
-
With an ASCII editor, open the htmlout.dat file in the main directory of your
SWP or SW installation.
-
In Version 4.x:
-
Find this line in the file:
\QTSN#1#2modeless""
-
Place the insertion point at the end of the line and press Enter.
-
On the new line, enter
\QTSN{ref}#2 modeless textarg "<span
class=""ref""><a href=""##2"">#2</a></span>"
-
In Version 5.x:
-
FInd this line in the file:
\QTSN{ref}#2 modeless textarg "<span
class=""ref"">#2</span>"
-
Replace the line with this line:
\QTSN{ref}#2 modeless textarg "<span
class=""ref""><a href=""##2"">#2</a></span>"
-
Save and close the file.
The cross-references that appear in your SWP/SW document as
Section
discusses Eqn.
(
)
and ....
now appear in the .htm version as
Section discussion discusses Eqn. (basic) and....
Last revised 04/24/06
The information in this frame was created with Scientific WorkPlace.
|