Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way to get time and date stamps, or other standard counters, to appear in Chinese? I am using xeCJK.

Package babel (with \selectlanguage{french} etc. in context) makes it simple for the major European languages.

share|improve this question
2  
Can you explain, what you want to do and how the output should look like? A minimal working example (MWE) would be helpful. Have you seen Use of Chinese numers similar to \Roman and \Arabic. \zhdate{\year/\month/\day} (or \zhtoday) produces “2013 年 2 月 1 日” with the zhnumber package. –  Qrrbrbirlbel Feb 1 '13 at 21:58
    
@Qrrbrbirlbel: The various commands in the zhnumber package solve all of my problems — thank you! Why don't you submit this as the answer and I'll approve it. –  brannerchinese Feb 1 '13 at 22:56
add comment

1 Answer

up vote 6 down vote accepted

The package zhnumber provides many macros to convert numbers, counters, dates and times into their Chinese representation.

Unfortunately, I can only understand the macro and option names in the manual.

In Use of Chinese numers similar to \Roman and \Arabic you can find another example that uses LaTeX counters.

Code

\documentclass{article}
\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\usepackage{zhnumber}
\begin{document}
Date: \zhtoday

Time: \zhcurrtime

\zhnumsetup{time=Chinese}
Date: \zhtoday

Time: \zhcurrtime

\zhnumsetup{time=Arabic}
1586/08/17: \zhdate{1586/08/17}
\end{document}

Output

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.