[XeTeX] LaTeX to Xetex conversion query
Peter Dyballa
Peter_Dyballa at Web.DE
Mon Jan 29 22:22:46 CET 2007
Am 29.01.2007 um 17:11 schrieb Rene Borgella:
> Now that I've been hearing about the wonderful world of XeTeX, I am
> wondering how I can convert my previous LaTeX docs (as well as
> write new
> ones) to easily convert to html. Is this something that is
> doable? Are
> there any packages that cannot be used in XeTeX? I have an example of
> my typical preamble with a list of packages I use in my docs listed
> below.
You have to use UTF-8 encoding for the text. You should not set any
input or font encoding. You should not load any typical TeX font
packages (like txfonts, fourier, ...). If some packages fail to work
correctly, you can give them a [dvipdfm] as output driver. There seem
to be restrictions of what a section header is allowed to contain.
Here is an updated version of your example document that produces two
pages, one with the specified header:
%%!TEX TS-program = xelatex
%%!TEX encoding = UTF-8 Unicode
\documentclass[letterpaper,11pt]{article}
\usepackage{amsmath}
% where you place margins, etc.
\usepackage[left=1in,right=1in,top=0.8in,bottom=1in]{geometry}
\usepackage{fancyhdr}
\usepackage[parfill]{parskip}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage{mdwlist}
\usepackage{marvosym}
\usepackage{graphicx}
%\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/
`basename #1 .tif`.png}
\usepackage{fontspec,xltxtra,xunicode}
\setromanfont[Mapping=tex-text, Scale=0.875]{Baskerville}
\setsansfont[Mapping=tex-text]{Optima-Regular}
\setmonofont{Courier}
\setmainfont{Times-Roman}
\newfontinstance\smilefont{AppleSymbols}
\parskip = 0.075 in
% text for headers and footers
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{\textsf{Field Biology --- }Fall 2006}
\fancyfoot[R]{\thepage}
\usepackage{url}
\usepackage[unicode]{hyperref}
%% setup for hyperlinks and pdf-tricks
\hypersetup{%
colorlinks=true,
linkcolor=blue,
anchorcolor=black,
citecolor=black,
filecolor=blue,
menucolor=black,
pagecolor=black,
urlcolor=blue,
bookmarksopen=true,
bookmarksnumbered=false,
pdfpagemode=UseOutlines,
pdfnewwindow=true,
pdftitle={ },
pdfauthor={René Borgella <rborgella at ithaca.edu>},
pdfsubject={ },
pdfkeywords={ },
pdfview={FitH},
pdfstartview={FitH},
pdfstartpage={1}
}
% no section numbers
%\setcounter{secnumdepth}{-2}
\title{Field Biology \\ Field Notebooks}
\date{}
\author{René Borgella}
\begin{document}
\maketitle
\pagebreak
\section{one}
Text One.{\smilefont♂}
\section{two}
\textsf{Text Twotoo.}{\smilefont♀}
\section{three}
{\smilefont{\Huge ☞}{\small ☺}{\Large ☻}{\LARGE ☹}{\huge ☚}
☮}
\section{four}
{\small\Smiley}{\Large\Smiley}{\LARGE\Smiley}{\smilefont☣}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% coding: utf-8-unix
%%% TeX-command-default: "XeLaTeX"
%%% TeX-master: t
%%% End:
I have no idea how htlatex will handle the UTF-8 input ...
--
Greetings
Pete
"It isn't pollution that's harming the environment. It's the
impurities in our air and water that are doing it."
More information about the XeTeX
mailing list