Tell me more ×
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.

I m workig on multilingual report. Below code is part of my code (Pls consider it as MWE). In the code below there is package clash error

! LaTeX Error: Option clash for package inputenc.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.33 \usepackage
                [russian]{babel}

Also chinese font cannot be printed. How can i avoid it?

\documentclass[11pt,table,a4paper]{article}
\usepackage{array,ragged2e}
\usepackage{graphicx}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}
\usepackage[top=.5cm, bottom=2cm, left=1cm, right=1cm]{geometry}
\usepackage{wrapfig}
\usepackage{comment}
\usepackage{parskip}
\usepackage{framed}
\usepackage{sidecap}
\usepackage{setspace}
\usepackage[scaled]{uarial}
\usepackage{tikz}
\usepackage{lipsum} 
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{transparent}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{hyphenat}
\usepackage{xstring}
\usepackage{forloop}
\usepackage{collcell}
\usepackage{longtable}
\usepackage{makecell}
\usepackage{varwidth}
\usepackage{CJKutf8}
\usepackage[T2A]{fontenc}
%\usepackage[koi8-r]{inputenc}
%\usepackage[russian]{babel}

\begin{document}
  Это мой первый многоязычный докладе.
\newline
This is my first multilingual report.
\newline
这是我的第一个多语种的报告。
\end{document}

I m in great need. Pls help me out.

share|improve this question
You include inputenc twice. – Martin Schröder Nov 19 '12 at 7:57
I have to include inputec twice since i have russian characters also. How can i use it once? – Manish Nov 19 '12 at 8:00
UTF-8 includes russian characters. – Martin Schröder Nov 19 '12 at 8:01
If i remove it, i get following error ! Package inputenc Error: Unicode char \u8:这 not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. – Manish Nov 19 '12 at 8:06
2  
This is a lot of code. In order to help people who'll help you, could you please remove everything from the code that's not related to your problem and add a little document, a so-called minimal working example (MWE), that people can copy and compile to reproduce your problem? Otherwise, your question might be in danger of being closed as too localized. – doncherry Nov 19 '12 at 8:39
show 1 more comment

2 Answers

up vote 1 down vote accepted
\documentclass[11pt,table,a4paper]{article}
\usepackage[T1,T2A]{fontenc}
\usepackage{lmodern}
\usepackage[koi8-r,utf8]{inputenc}
\usepackage{CJKutf8}
\usepackage[russian]{babel}

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

\begin{document}

  Это мой первый многоязычный докладе.

This is my first multilingual report.

\begin{CJK}{UTF8}{}
\begin{SChinese}
这是我的第一个多语种的报告。

\end{SChinese}
\end{CJK}
\end{document}

and the same with xelatex (Code2000.ttf) is free availble in the net

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Code2000}
\begin{document}

  Это мой первый многоязычный докладе.

This is my first multilingual report.    

这是我的第一个多语种的报告。

\end{document}

enter image description here

share|improve this answer
Pblm with my input is it has multilingual mixed text that i m fetching from database. i am not sue when will get chinese/english/russian text. So i want to generalize it. – Manish Nov 19 '12 at 8:19
then use xeleatex instead of pdflatex then you can mix the languages without any additional environment – Herbert Nov 19 '12 at 8:32
This is my existing code, so i don't want to change my setup and installation. Pls guide me how to generalise my code for multiple language dynamically. – Manish Nov 19 '12 at 8:50
1  
with pdflatex you cannot mix cjk languages with european languages without such additional environments – Herbert Nov 19 '12 at 8:55
To be more specfic, i m fetching data from database which has two combination (1) English & Chineese (2) English & Russian. I want to generate report for it dynamically and generalise it. Is it possible to do that? – Manish Nov 19 '12 at 9:12
show 1 more comment

Your example includes several packages twice. Usually that is not a good idea and will cause problems. Anyway, to address your specific question, you need to use the mechanisms of the CJK package; your system should include a useful example file CJKutf8.tex under the CJK documentation directory. Additionally, you ought to tell latex which language different sections of the document are in, otherwise hyphenation will be inappropriate. Here is a minimal example with your three languages:

\documentclass[11pt,table,a4paper]{article}

\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{CJKutf8}
\usepackage[english,russian]{babel}

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

\begin{document}
\selectlanguage{russian}
  Это мой первый многоязычный докладе.

\selectlanguage{english}
This is my first multilingual report.

\begin{CJK}{UTF8}{}
  \begin{SChinese}
    这是我的第一个多语种的报告。
  \end{SChinese}
\end{CJK}

\end{document}

Sample output

share|improve this answer
When i use Инфантильный гипертрофический стеноз привратника - это серьёзное as russian text, i get following error message. ! Package inputenc Error: Unicode char \u8:  not set up for use with LaTeX. See the inputenc package documentation for explanation. Type H <return> for immediate help. ... l.18 ...�ный гипертрофический  стеноз привра... – Manish Nov 19 '12 at 10:03
1  
Copy and pasting the above code plus your additional line into a new file here works fine with no complaints from inputenc. Have you loaded other packages? Is your distribution up to date? – Andrew Swann Nov 19 '12 at 10:14

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.