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.

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

3 Answers 3

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
add comment

Hope this is the appropriate place to put this. When I began to use multiple scripts in my documents, I longed to find an MWE for each script. I have compiled what I hope is an MWE in XeTeX for as many languages as I could. I hope this is useful to others. If you don't have Arial Unicode MS, just choose another Unicode font (like Lucida Sans). It should compile regardless. (Credit to omniglot.com for the phrase & translations.)

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt]{article}

% PACKAGES

\usepackage{fontspec}
\usepackage{longtable}

% OPEN DOCUMENT

\begin{document}

% SPECIFY UNICODE FONT

\setmainfont{Arial Unicode MS}

% SPECIFY ADDITIONAL FONTS FOR GLYPHS NOT INCLUDED IN UNICODE FONT

\newfontfamily{\Inuktitut}{Euphemia UCAS}
\newfontfamily{\Khmer}{Khmer MN}
\newfontfamily{\Sinhala}{Sinhala MN}

% BODY

\begin{longtable}{ll}
Afrikaans & My skeertuig is vol palings.\\
Albanian & Automjeti im është plot me ngjala.\\
Arabic (MSA) & حَوّامتي مُمْتِلئة بِأَنْقَلَيْسون\\
Armenian (E) & Իմ օդաթիռը լի է օձաձկերով\\
Armenian (W) & Իմ սաւառնակս օձաձկներով լեցուն է\\
Aromanian & Pãmporea-a mea-i ãmplinã di uhelji.\\
Azeri    & Hoverkraftimin içi ilan balıǧı ilə doludur.\\
Basque & Nire aerolabangailua aingirez beteta dago.\\
Belarusian & Маё судна на паветранай падушцы поўна вуграмі.\\
Bengali & আমার হভারক্রাফ্ট ইল-এ ভর্তি হয়ে গেছে\\
Bhojpuri & हमार मँडराये वाली जहाज सर्पमीनन से भरल ह\\
Breton & Leun gant sili eo ma dourruzer.\\
Bulgarian   & Корабът ми на въздушна възглавница е пълен със змиорки.\\
Catalan & El meu aerolliscador està ple d'anguiles.\\
Cebuano & Puno ug kasili ang akong hoberkrap.\\
Chamorro    & Bula håsuli/åsuli iyo-ku hovercraft.\\
Chinese (Cantonese) & 我隻氣墊船裝滿晒鱔\\
Chinese (Mandarin, Traditional) & 我的氣墊船充滿了鱔魚\\
Chinese (Mandarin, Simplified) & 我的气垫船充满了鳝鱼\\
Chinese (Taiwanese) & 我的氣墊船充滿了鱔魚\\
Cornish & Leun a sylli yw ow skath bargesi.\\
Corsican & U me battellu hè carcu d'anguili.\\
Croatian & Moja je lebdjelica puna jegulja.\\
Czech & Moje vznášedlo je plné úhořů.\\
Danish & Mit luftpudefartøj er fyldt med ål.\\
Dutch & Mijn luchtkussenboot zit vol paling.\\
Estonian & Mu hõljuk on angerjaid täis.\\
Faroese & Luftpútufar mítt er (skít)fult í álli!\\
Finnish & Ilmatyynyalukseni on täynnä ankeriaita.\\
French & Mon aéroglisseur est plein d'anguilles.\\
Frisian (N) & Min luftdümpetbüüdj as ful ma äil.\\
Frisian (W) & Myn hoverkreaft is fol fan Eels.\\
Friulian & Il gno hovercraft al è plen di bisats.\\
Galician & O meu aerodeslizador esta cheo de anguías.\\
Georgian & ჩემი ხომალდი საჰაერო ბალიშზე სავსეა გველთევზებით\\
German & Mein Luftkissenfahrzeug ist voller Aale.\\
Greek (Ancient)  & Τὸ πλοῖόν μου τὸ μετεωριζόμενον ἐστι πλῆρες ἐγχελέων\\
Greek (Modern) & Το Χόβερκράφτ μου είναι γεμάτο χέλια\\
Greenlandic & Umiatsiaasara pullattagaq nimerussanik ulikkaarpoq.\\
Hebrew & הרחפת שלי מלאה בצלופחים\\
Hindi    & मेरी मँडराने वाली नाव सर्पमीनों से भरी हैं\\
Hungarian & A légpárnás hajóm tele van angolnákkal.\\
Icelandic & Svifnökkvinn minn er fullur af álum.\\
Indonesian & Hovercraft saya penuh dengan belut.\\
Inuktitut & \Inuktitut ᐅᒥᐊᕐᔫᑉ ᐳᓪᓕᓕᒫᐸᒐ ᑕᑦᑕᕐᓂᖅ ᐊᒻᒪᔭᖅ\\
Irish (Gaelic) & Tá m'árthach foluaineach lán d'eascanna.\\
Italian & Il mio aeroscivolante è pieno di anguille.\\
Japanese & 私のホバークラフトは鰻でいっぱいです.\\
Khmer & \Khmer សុទ្ធតែឣន្ចងពេញទូកហាះយើង ។\\
Korean & 내 호버크라프트는 장어로 가득 차 있어요\\
Lakota Sioux & Iyéčhiŋkiŋyaŋka čha kiŋyáŋ mitȟáwa kiŋ hoká ožúla (yeló)!\\
Latin & Mea navis volitans anguillis plena est.\\
Latvian & Mans transportlīdzeklis uz gaisa spilvena ir pilns ar zušiem.\\
Lithuanian & Mano laivas su oro pagalve pilnas ungurių.\\
Low German & Mien Lüchtpöukaan ist vull von sük aalen.\\
Luxembourgish & Mäi Loftkësseboot ass voller Éilen.\\
Macedonian & Моето летачко возило е полно со јагули.\\
Manx (Gaelic) & Ta my haagh crowal lane dy astan.\\
Māori & Kī tōnu taku waka topaki i te tuna.\\
Malay & Hoverkraf saya penuh dengan belut.\\
Malayalam & എന്‍റെ പറക്കും-പേടകം നിറയെ വ്ളാങ്കുകളാണ്\\
Maltese & Il-hovercraft tiegħi hu mimli sallur.\\
Marathi & माझी होडी मासळयांनी भरली आहे\\
Mongolian & Миний агаарын даралтыг ашиглан хөвөгч усан онгоцийг дүүрэн могой загас юм.\\
Nahuatl & Noehēcatlapalqui cōāmichtēnqui.\\
Ndebele (N) & Isikepe sami sigcwele umzowa.\\
Norwegian & Luftputebåten min er full av ål.\\
Occitan & Mon aerolisador es plen d'anguilas.\\
Oriya & Mo hovercraft re eel bharti hei jaichi.\\
Persian (Farsi) & هاورکرافت من پر مارماهى است\\
Polish & Mój poduszkowiec jest pełen węgorzy.\\
Portuguese & Meu hovercraft está cheio de enguias.\\
Proto-Indo-European & Dihskolmos-to-h1me hxVnghel plh1nos h1esti.\\
Punjabi & ਮੇਰਾ ਹਵਰਕ੍ਰਾਫ਼ਤ ਨਾਂਗਾਂ ਨਾਲ਼ ਭਰਿਆ ਪਿਆ।\\
Quenya & Venenya vilyanirwanen ná quanta as angolingwi.\\
Romanian & Vehicolul meu pe pernă de aer e plin cu ţipari.\\
Russian & Моё судно на воздушной подушке полно угрей.\\
Samoan & Ua tumu la'u ato fagota i pusi.\\
Sardinian (Logudorese) & Su hovercraft est penu de ambidas.\\
Scottish Gaelic & Tha mo bhàta-foluaimein loma-làn easgannan.\\
Serbian & Мој ховеркрафт је пун јегуља.\\
Shona & Hovercraft yangu yakazara nemikunga.\\
Sinhala & \Sinhala මාගේ වායු පා යානයේ ආඳන් පිරී ඇත\\
Slovak & Moje vznášadlo je plné úhorov.\\
Slovenian & Moje vozilo na zračni blazini je polno jegulj.\\
Somali & Huufarkarafkayga waxaa ka buuxa eels.\\
Spanish & Mi aerodeslizador está lleno de anguilas.\\
Swahili & Gari langu linaloangama limejaa na mikunga.\\
Swedish & Min svävare är full med ål.\\
Swiss German & Mis Luftchüssiboot isch volle Aal.\\
Tagalog & Puno ng palos ang aking hoberkrap/hovercraft.\\
Tamil    & என் மிதவை நிறைய விலாங்கு மீன்கள்.\\
Telugu & నా హోవర్ఁక్రాఫ్ఠ్ అంతా ఈలు చేపలతో నిండిపోయింది.\\
Thai & โฮเวอร์คราฟท์ของผมเต็มไปด้วยปลาไหล.\\
Tibetan & ངའི་རླུང་འདེགས་གྲུ་གཟིངས་ནི་ཉ་མན་ལི་ཡིས་གང་གི་འདུག །\\
Tok Pisin & Bilong me hangamapim bot stap pulap maleo.\\
Tongan & Hoku vakapuna tētē 'i 'olunga fono 'i he toke.\\
Tsotsil & Li j-xulem tak'ine noj ta conoetik.\\
Turkish & Benim hovercraft yılan balığı dolu.\\
Tuvan & Мээң ховеркрафтым иштинде чылан ышкаш балык долу.\\
Ukrainian & Моє судно на повітряній подушці наповнене вуграми.\\
Uzbek & Mening kayiqim baliq bilan to'lgan.\\
Vietnamese & Tàu cánh ngầm của tôi đầy lươn.\\
Võro & Muq hõl'omismassin om angõrit täüs.\\
Welsh & Mae fy hofrenfad yn llawn llyswennod.\\
Yiddish & מיין פראָם ( שוועבשיף ) איז פֿול מיט ווענערס\\
Yorùbá & Ọkọ afategun-sare mi kun fun ẹja arọ.\\
Zulu & Umkhumbi wami ugcwele ngenyoka zemanzini.
\end{longtable}

% END

\end{document}
share|improve this answer
    
Please note that my focus is primarily placing words or small phrases within an English text. For longer passages in other scripts, polyglossia is suggested, I think. –  commonhare Aug 17 '13 at 5:43
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.