Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

competing packages pinyin and inputenc

12 views
Skip to first unread message

Haines Brown

unread,
Jan 9, 2012, 10:04:11 PM1/9/12
to
I'm using TL2011 with debian squeeze. In the body of the text I have
latinized pinyin with accents followed by the chinese characters.

To display the accended latin pinyin I need package pinyin. But it
breaks inputenc needed to support non-ascii characters in the text such
as ø. By commenting preamble lines I can get either the latin pinyin or
the non-ascii characters, but not both at once.

In the preamble I have:

\documentclass[12pt,titlepage]{article}
\usepackage{CJKutf8,pinyin}
\usepackage[utf8]{inputenc}
\usepackage{ctex}
...
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}

In the body I have

... wúwéi
(\begin{CJK*}{UTF8}{}
\CJKfamily{gbsn}\small{\textbf{无为}}
\end{CJK*})
...

Haines Brown




Werner Lemberg

unread,
Feb 12, 2012, 11:29:25 AM2/12/12
to
Haines Brown <hai...@historicalmaterialism.info> wrote:

> To display the accended latin pinyin I need package pinyin. But it
> breaks inputenc needed to support non-ascii characters in the text such
> as ø. By commenting preamble lines I can get either the latin pinyin or
> the non-ascii characters, but not both at once.

Sorry for the late answer; I rarely read comp.text.tex.

> In the preamble I have:

> \documentclass[12pt,titlepage]{article}
> \usepackage{CJKutf8,pinyin}
> \usepackage[utf8]{inputenc}
> \usepackage{ctex}
> ...
> \newenvironment{SChinese}{%
> \CJKfamily{gbsn}%
> \CJKtilde
> \CJKnospace}{}

> In the body I have

> ... wúwéi
> (\begin{CJK*}{UTF8}{}
> \CJKfamily{gbsn}\small{\textbf{??}}
> \end{CJK*})
> ...

If you put everything into a CJK environment, it works just fine.
Additionally, you should use the T1 input encoding. I assume that you've
written `wú wéi' (instead of `\wu2\wei2') just for demonstration purposes,
right?


Werner

==========================================================================

\documentclass[12pt,titlepage]{article}

\usepackage{CJKutf8}
\usepackage{pinyin}
\usepackage[T1]{fontenc}
\usepackage{ctex}

\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}

\begin{document}
\begin{CJK}{UTF8}{}

Iñ ðe bødy I häve

... \wu2\wei2
\begin{SChinese}\small{\textbf{??}}\end{SChinese}
...
\end{CJK}
\end{document}
0 new messages