On Fri, Mar 29, 2013 at 11:10:00PM +0700, Pruet Boonma wrote:
> แก้ไขตามคำแนะนำของคุณเทพครับ
มี comment เพิ่มเติมครับ:
> Index: babel/thai.dtx
> ===================================================================
> --- babel/thai.dtx (revision 459)
> +++ babel/thai.dtx (working copy)
> @@ -621,6 +621,46 @@
> % \end{macrocode}
> % \end{macro}
> %
> +% \subsubsection{\Lopt{thaiindentfirst} option}
> +% As suggested by English writting guideline, the first paragraph in each
"writing guideline" (ตัว t เกินมา)
> +% section shall not be indented. However, for Thai language, indenting the
> +% first paragraph is more popular and widely suggested.
> +% If \Lopt{thaiindentfirst} is supplied in the |\usepackage| command, the
> +% first Thai paragraph in each section will be indented. The other
> +% paragraphs will behave as default.
> +%
> +% \begin{macrocode}
> +\DeclareOption{thaiindentfirst} {%
> +% \end{macrocode}
> +%
> +% We need to save original \@afterindentfalse, so create a pointer to point
> +% to it.
คำสั่ง \let ไม่ใช่การกำหนด pointer แต่เป็นการ assign ค่าปัจจุบัน น่าจะปรับเป็นทำนองว่า
"create variable to store its original value"
> +%
> +% \begin{macrocode}
> + \let\th@afterindentfalse\@afterindentfalse
> +% \end{macrocode}
ผมคิดว่าโค้ดส่วนนี้น่าจะไปอยู่ใน \extrasthai นะครับ คือไม่ใช่ว่าเก็บค่าครั้งเดียวตอนโหลด
babel แต่น่าจะเก็บค่าตอนที่ switch เข้าภาษาไทย เผื่อว่ามีภาษาอื่นกำหนด \@afterindentfalse
เอาไว้ (เช่น ภาษาสเปน) ตอน switch ออกจะได้คืนค่าก่อนเข้า ไม่ใช่ค่าเริ่มแรก
> +%
> +% When switching to Thai language, point \@afterindentfalse to
> +% \@afterindentrue, so when latex will be unable to indent the first
> +% paragraph,
- point -> set
- latex -> \LaTeX\
- so when -> so that
- will be unable to -> will never (?)
> +%
> +% \begin{macrocode}
> + \addto\extrasthai{%
> + \let\@afterindentfalse\@afterindenttrue
> + \@afterindenttrue
> + }
> +% \end{macrocode}
> +%
> +% When switching out of Thai language, point \@afterindentfalse
> +% back to its original function.
- point -> set/restore
- original function -> original value
> +%
> +% \begin{macrocode}
> + \addto\noextrasthai{%
> + \let\@afterindentfalse\th@afterindentfalse
> + }
> +}
> +% \end{macrocode}
> +%
> % \subsubsection{\Lopt{thainumber} option}
> %
> % Not all Thai documents use Thai digits. So, we support this as an