[XeTeX] ZHSPACING - Newbie questions

arnen at shentang.net arnen at shentang.net
Fri Nov 2 23:18:26 CET 2007


Hi all !

I have been using XeTex to reformat some chinese medical texts that I 
had originally done in Framemaker (Mac). These contain a mix of 
english, pinyin and hanzi.
A long time ago I looked at Tex but it was not practical to sort out 
CJK vs Omega vs etc. XeTex rules.

The current setup is TexLive 2007:
	XeTeX 3.141592-2.2-0.997 (Web2C 7.5.6)
	kpathsea version 3.5.6
	Compiled with ICU version 3.6 [with modifications for XeTeX]
	Compiled with zlib version 1.2.3; using 1.2.3
	Compiled with FreeType2 version 2.3.5; using 2.3.5
	Using Mac OS X Carbon, Cocoa & QuickTime frameworks

I have been having a few hassles that I haven't been able to sort out.

(The mail reader I am using (Eudora Mac) doesn't yet support UTF so I 
will also attach examples.)

1. Apostrophes & quotes seem to have too much white space. Initially 
this seemed to be due to using one font eg. STSong, to cover the 
hanzi and diacritics.

Looking through the posts I tried  \lccode"2019="0027 but this made 
no difference.

Using zhspacing made some improvement as I could use other fonts 
however it introduced it's own problem with the apostrophe.

test.tex follows:

%%%%%%%%%%%%%%
%!TEX TS-program = xelatex -output-driver="xdvipdfmx -v"
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt]{book}
\usepackage{fontspec,xltxtra,xunicode}

\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Times New Roman}

% Un/Comment the following:
%\newfontfamily\zhfont{Apple LiSung} % Have to declare as don't have SimHei
%\usepackage{zhspacing}
%\zhspacing

\begin{document}
`It's hard to 'say' if ``it'' doesn't like "fancy quotes".'

\fontspec{STSong}

`It's hard to 'say' if ``it'' doesn't like "fancy quotes".'

\end{document}
%%%%%%%%%%%%%%

I could just replace all right quotes with ' and rely on the Tex 
mapping but part of the exercise has been to get everything into 
Unicode.

2. I also seem to be having difficulties in getting grey text when 
using zhspacing.
Originally I had grey vertical text for chapter titles eg.:

(Extract from test2.tex)

%%%%%%%%%%%%%%
\newcommand{\myvertical}[1]{
	\rotatebox{-90}{
	\fontspec[Renderer=AAT,Vertical=RotatedGlyphs,Color=888888]{Hiragino 
Mincho Pro}#1}
	}

\newcommand{\CJKTitle}[1]{
	\parbox{1cm}{\huge{\myvertical{#1}}}
	}

...........

\chapter[ Eight Principles and Causes of Disease]{
	\CJKTitle{} etc.
%%%%%%%%%%%%%%

If I enable I enable zhspacing  and delete the \rotatebox I get the 
vertical text but lose the grey colour.


-- 
Arnen


Alcohol and calculus don't mix; don't drink and derive.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: application/octet-stream
Size: 562 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20071103/bc3e81ba/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.tex
Type: application/octet-stream
Size: 1238 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20071103/bc3e81ba/attachment-0001.obj 


More information about the XeTeX mailing list