At the moment I don't get the Thai text breaking across lines without manually inserting "\wbr" commands. (Because Thai apparently doesn't use spaces to separate words the symbols appear in long strings.)
I think this may have something to do with the warning that there were no hyphenation patterns loaded for Thai.
The MiKTeX maintenance panel shows "thailatex" installed but "thai" doesn't show under languages, so I don't know how to get hyphenation patterns for Thai loaded (if that's an option).
Here is a small sample. The main Thai text just disappears off the right hand side in a single line when I compile it.
Code: Select all
\documentclass[a4paper,11pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[thai,thainumber]{babel}
\usepackage{fonts-tlwg}
\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\date{}
\usepackage{enumerate}
\setlength{\parindent}{0pt}
\begin{document}
\title{How to split the Thai text into lines?}
\maketitle
\thispagestyle{fancy}
\fancyfoot[C]{หน้า \thepage\ จาก \pageref{LastPage}}
นี่คือข้อความบางส่วนในไทยที่จะไม่พอดีกับหนึ่งบรรทัดฉันต้องการที่จะแทรกคำสั่งการแบ่งคำระหว่างคำเพื่อที่จะสามารถแยกระหว่างบรรทัด
\end{document}
Code: Select all
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2013.2.28) 12 APR 2013 02:14
entering extended mode
**example.tex
(C:\Users\martin\Desktop\latex\example\example.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size11.clo"
File: size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"
Package: inputenc 2008/03/30 v1.1d Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\utf8x.def"
File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8
))
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\ucs.sty"
Package: ucs 2004/10/17 UCS: Unicode input support
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\data\uni-global.def"
File: uni-global.def 2012/04/20 UCS: Unicode global data
)
\uc@secondtry=\count87
\uc@combtoks=\toks16
\uc@combtoksb=\toks17
\uc@temptokena=\toks18
)
("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.sty"
Package: babel 2008/07/08 v3.8m The Babel package
*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\bblopts.cfg"
File: bblopts.cfg 2006/07/31 v1.0 MiKTeX 'babel' configuration
)
("C:\Program Files\MiKTeX 2.9\tex\generic\thailatex\thai.ldf"
Language: thai 2011/12/19 v1.4c Thai support from the babel system
("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def"
File: babel.def 2008/07/08 v3.8m Babel common definitions
\babel@savecnt=\count88
\U@D=\dimen103
)
Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `thai'
(babel) I will use the patterns loaded for \language=0 instead.
\l@thai = a dialect from \language0
Loading the definitions for the Thai font encoding
("C:\Program Files\MiKTeX 2.9\tex\generic\thailatex\lthenc.def"
File: LTHenc.def 2011/12/26 v1.2 Thai Encoding
)
\th@year=\count89
))
("C:\Program Files\MiKTeX 2.9\tex\latex\fonts-tlwg\fonts-tlwg.sty"
Package: fonts-tlwg 2011/10/18 v1.0 Thai TLWG Fonts
LaTeX Info: Redefining \thaitext on input line 30.
LaTeX Info: Redefining \latintext on input line 37.
)
("C:\Program Files\MiKTeX 2.9\tex\latex\fancyhdr\fancyhdr.sty"
\fancy@headwidth=\skip43
\f@ncyO@elh=\skip44
\f@ncyO@erh=\skip45
\f@ncyO@olh=\skip46
\f@ncyO@orh=\skip47
\f@ncyO@elf=\skip48
\f@ncyO@erf=\skip49
\f@ncyO@olf=\skip50
\f@ncyO@orf=\skip51
)
("C:\Program Files\MiKTeX 2.9\tex\latex\lastpage\lastpage.sty"
Package: lastpage 2011/09/01 v1.2k Refers to last page's name (HMM; JPG)
)
("C:\Program Files\MiKTeX 2.9\tex\latex\tools\enumerate.sty"
Package: enumerate 1999/03/05 v3.00 enumerate extensions (DPC)
\@enLab=\toks19
)
(C:\Users\martin\Desktop\latex\example\example.aux
LaTeX Font Info: Try loading font information for LTH+norasi on input line 2
.
("C:\Program Files\MiKTeX 2.9\tex\latex\fonts-tlwg\lthnorasi.fd"
File: lthnorasi.fd 2000/05/09 v1.0 Thai font definitions
)
! Undefined control sequence.
l.7 \xdef\lastpage@lastpage{\LTH
\thaione }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 15.
LaTeX Font Info: ... okay on input line 15.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 15.
LaTeX Font Info: ... okay on input line 15.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 15.
LaTeX Font Info: ... okay on input line 15.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 15.
LaTeX Font Info: ... okay on input line 15.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 15.
LaTeX Font Info: ... okay on input line 15.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 15.
LaTeX Font Info: ... okay on input line 15.
LaTeX Font Info: Checking defaults for LTH/norasi/m/n on input line 15.
LaTeX Font Info: ... okay on input line 15.
Package utf8x.def Warning: Character(s)244 etc.gotredefinedsomewhere.
(utf8x.def) Restoringtoitsutf8x-meaning on input line 15.
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\ucsencs.def"
File: ucsencs.def 2011/01/21 Fixes to fontencodings LGR, T3
)
Package lastpage Info: Please have a look at the pageslts package at
(lastpage) http://www.ctan.org/tex-archive/
(lastpage) macros/latex/contrib/pageslts/
(lastpage) or
(lastpage) http://www.ctan.org/tex-archive/
(lastpage) install/macros/latex/contrib/pageslts.tds.zip
(lastpage) ! on input line 15.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 17.
LaTeX Warning: No \author given.
("C:\Program Files\MiKTeX 2.9\tex\latex\ucs\data\uni-14.def"
File: uni-14.def 2012/04/20 UCS: Unicode data U+0E00..U+0EFF
)
Overfull \hbox (210.02324pt too wide) in paragraph at lines 21--22
[]\LTH/norasi/m/n/10.95 ¹Õè¤×Í¢éͤÇÒÁºÒ§Êèǹã¹ä·Â·Õè¨ÐäÁè¾Í´Õ¡ÑºË¹Ö觺Ã÷Ѵ©Ñ¹µ
éͧ¡Ò÷Õè¨Ðá·Ã¡¤ÓÊÑè§¡ÒÃáºè§¤ÓÃÐËÇèÒ§¤Óà¾×èÍ·Õè¨ÐÊÒÁÒöá¡ÃÐËÇèÒ§ºÃ÷Ѵ
[]
AED: lastpage setting LastPage
! Undefined control sequence.
<argument> \LTH
\thaione
l.23 \end{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[1
{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}]
(C:\Users\martin\Desktop\latex\example\example.aux
! Undefined control sequence.
l.7 \xdef\lastpage@lastpage{\LTH
\thaione }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
) )
Here is how much of TeX's memory you used:
1546 strings out of 494045
20820 string characters out of 3148384
76960 words of memory out of 3000000
4858 multiletter control sequences out of 15000+200000
9682 words of font info for 30 fonts, out of 3000000 for 9000
715 hyphenation exceptions out of 8191
27i,10n,43p,485b,270s stack positions out of 5000i,500n,10000p,200000b,50000s
{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/fonts-tlwg/lthtlwg.enc}<C:/Prog
ram Files/MiKTeX 2.9/fonts/type1/public/fonts-tlwg/norasi.pfb>
Output written on example.pdf (1 page, 28031 bytes).
PDF statistics:
11 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)