Tuesday, October 16, 2012

Make XeTeX show quotation marks properly

Because of some annoying CJK font problems, I've switched from traditional LaTeX to Unicode-capable XeTeX.

After several trials, I finally made it worked on my computer and got the result which fitted almost my expectation. I said ``almost'' because there was a little problem of the quotation marks. In stead of showing expected curly marks, XeTeX outputted the marks in original text mode.

The solution I found is to add a bit of setting as follows.

or simply
Actually I have no idea about the difference between the two implements listed above. My own guess is: the first one provides global effect while the second one affects only on the main font?


Monday, October 15, 2012

CThruView Transparent Image Viewer -- test in Ubuntu 12.04

In addition to qiv mentioned in the previous post, I found another image viewer which could do some amazing things when viewing transparent images. It is CThruView written in Java.

However, my trial got some problems. The transparent background was replaced by a gray one, and its visibility can only be reduced along with the foreground image by setting the opacity of overall image. The following screenshot shows my test.

At the first trial, I though the fails might be due to the OpenJDK which is the default installation in Ubuntu. So I found the method to install Sun Java 6 but got the same result.

Another failed test was the option ``Click-Thru'' which had no function. Except for these, other options worked properly.

Sunday, October 14, 2012

qiv -- Viewing image with transparent background

In Ubuntu, there is a image viewer named qiv which can show image files with transparent backgrounds.

For installation, just type
$ sudo apt-get install qiv

Invoke qiv in command line, and there are many many options to meet most requirements.

To show the image with its transparent background, the argument -p has to be used:
$ qiv -p IMAGE_FILE.png

Below is a screenshot of my own test. Note that the original image was save as png file with transparent background.

Use qiv to show image with transparent background.

Thursday, October 04, 2012

Visual Studio 2005: the symbol xxx is not defined

I've encountered the problem several times. Every time I have to use Ctrl+F to go through all the source code and it's somewhat annoying.

The only solution I could think of is to delete the *.ncb file or rebuild the project. And it's what I found on internet when I launched the search.

Unfortunately, it didn't work for me.

Fortunately, I finally got a solution which save my live.

Here is the method to solve the ``symbol xxx is not defined'' error:

Edit -> Intellisense -> List Members

XeTeX -- using the system fonts for CJK tex files

After using LaTeX for several years, I found XeTeX might be the best choice for Unicode files and therefore for the production of CJK documents.

When producing the CJK documents, it will be convenient to make the system fonts available for XeTeX. Here is a simple method to make it work.

To install system fonts, put *.ttc or *.ttf  files to the following folder:

Then build the font information cache files:
$ sudo fc-cache -f -v 

Mac下的Latex中文解決方案: XeTeX