From 01c5905c541381e74672a48e4750a6be0b5da8ee Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 23 Feb 2018 22:07:15 +0000 Subject: thaispec (23feb18) git-svn-id: svn://tug.org/texlive/trunk@46722 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/thaispec/README.md | 49 +++ Master/texmf-dist/doc/latex/thaispec/thaispec.pdf | Bin 0 -> 113629 bytes .../texmf-dist/source/latex/thaispec/thaispec.dtx | 396 +++++++++++++++++++++ .../texmf-dist/source/latex/thaispec/thaispec.ins | 31 ++ Master/texmf-dist/tex/latex/thaispec/thaispec.sty | 278 +++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-langother.tlpsrc | 1 + Master/tlpkg/tlpsrc/thaispec.tlpsrc | 0 8 files changed, 756 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/thaispec/README.md create mode 100644 Master/texmf-dist/doc/latex/thaispec/thaispec.pdf create mode 100644 Master/texmf-dist/source/latex/thaispec/thaispec.dtx create mode 100644 Master/texmf-dist/source/latex/thaispec/thaispec.ins create mode 100644 Master/texmf-dist/tex/latex/thaispec/thaispec.sty create mode 100644 Master/tlpkg/tlpsrc/thaispec.tlpsrc diff --git a/Master/texmf-dist/doc/latex/thaispec/README.md b/Master/texmf-dist/doc/latex/thaispec/README.md new file mode 100644 index 00000000000..fe9a56a8e09 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thaispec/README.md @@ -0,0 +1,49 @@ +# thaispec +Thai Language Typesetting in XeLaTeX + +# Version +0.1 [2018-FEB-23] + +# Author +Ratthaprom Promkam + +## Prerequisite +Thai national fonts, i.e., SIPAFonts (See https://github.com/epsilonxe/sipafonts) + +## Recommendation +Install TeX Gyre font family (Possibly included with your TeX distribution) + +## Usage +If you already have TeX Gyre font family, just simply add the preamble +``` +\usepackage{thaispec} +``` +Otherwise +``` +\usepackage[texgyrefont=false]{thaispec} +``` +This package allows you to input Thai characters directly to ```.tex``` file, +and choose any Thai fonts to be used in the document. +In order to choose the font, please make sure that the font is system wide, then use +``` +\usepackage[thaifont = ]{thaispec} +``` +Moreover, the package give you options to choose any system wide fonts for +```mainfont```,```sansfont```, ```monofont``` too + + +## Credit +This package is motivated by a set of LaTex commands for typesetting Thai documents +provided by Dittaya Wanvarie from Chulalongkorn University. +(See http://pioneer.netserv.chula.ac.th/~wdittaya/) + +## License +Copyright 2018 Ratthaprom Promkam + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license of (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. diff --git a/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf b/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf new file mode 100644 index 00000000000..2feeb8beb19 Binary files /dev/null and b/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf differ diff --git a/Master/texmf-dist/source/latex/thaispec/thaispec.dtx b/Master/texmf-dist/source/latex/thaispec/thaispec.dtx new file mode 100644 index 00000000000..8d02ce39235 --- /dev/null +++ b/Master/texmf-dist/source/latex/thaispec/thaispec.dtx @@ -0,0 +1,396 @@ +%\iffalse +% thaispec.dtx generated using makedtx version 0.94b (c) Nicola Talbot +% Command line args: +% -doc "thaispec.tex" +% -src "thaispec\.sty=>thaispec.sty" +% -author "Ratthaprom Promkam" +% thaispec +% Created on 2018/2/23 22:01 +%\fi +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2018 Ratthaprom Promkam, all rights reserved. +% \fi +% \iffalse +%<*driver> +%!TEX engine = xelatex +%!TEX root = thaispec.tex +%!TEX enableSynctex = yes +%!TEX outputDirectory = OutputDir +%!TEX spellcheck = en_US +%!TEX encoding = UTF-8 + +\documentclass[a4paper,10pt]{article} +\usepackage{thaispec} +\usepackage{mathtools,amssymb,amsthm} + +\title{บทความภาษาไทย} +\author{ชื่อผู้แต่ง} + +\begin{document} +\DocInput{thaispec.dtx} +\end{document} +% +%\fi +%\maketitle +%คอนดักเตอร์ซีริลลิกคลอไรด์ ลินุกซ์ออกเทนดอปเพลอร์ไพธอนฮิรางานะ ไอพ็อดแอพพลิเคชัน +%อินทิเกรตออกเทนแพลตฟอร์มดิจิตอล ไลเซนส์เวิร์กสเตชันไฮโดรลิกพาเนล พาร์ทิชันแท็กโมบายล์กูเกิลแล็ปท็อป +%พาราโบลาโพรเซสเซอร์ พร็อกซีอินพุทแท็บ เซ็กเมนต์มัลแวร์ออกเทน เดลไฟไมถิลีทัชแพดชิป +%ซีริลลิกโปรโตคอลเคอราตินแกนีมีด เทอร์โมฮาร์ดดิสก์ เทฟลอน กิกะไบต์สแต็กชิคุนกุนยา +%เมลเอ็กซ์โพเนนเชียลไดออกไซด์ฟีโรโมนไบต์ +% +%เวกเตอร์ดีวีดีอินทิเกรตฮาร์ดแวร์ ธาลัสซีเมียกราฟิกแล็ปท็อปสปายแวร์ลิงก์โน้ตบุ๊ค +%บลูเรย์เทฟลอนลินุกซ์โปรเซสเซอร์ ทรานแซ็กชันเวิร์คสเตชั่นไมถิลี อัปเดตดีบั๊กไอคอนแอนิเมชัน +%พิกเซลอีเมลโพรโทคอลพร็อกซีสแกนเนอร์ กูเกิ้ลลินุกซ์แอพพลิเคชั่นมอดูล +%ไฟล์เดลไฟริงโทนอาร์กิวเมนต์คลิปอาร์ต อูบุนตูโน้ตบุ๊คอัปโหลดแอสเซมเบลอร์ +%ไดเรกทอรีซัพพอร์ทไอโฟน มัลติทัชสล็อตอีเมล์พาเนลเน็ตเวิร์คยูนิโคดเรียลไทม์ +% +%\begin{equation} +% \int_a^b\;f(x)\;\mathrm{d}x = F(b) - F(a) \quad\text{ถ้า}\quad \dfrac{\mathrm{d}}{\mathrm{d}x}F(x) = f(x). +%\end{equation} +%\section{หัวข้อแรก} +%ไลบรารีไอโฟนซีดีรอมเราเตอร์บิทเอนจิน ยูนิโคดบัฟเฟอร์เวิร์กสเตชั่น +%โมบายล์เบราว์เซอร์์แอนะล็อกแพลตฟอร์ม +%เอาต์พุตมัลติทัชแฮ็กเกอร์ไอโฟน เดลไฟแพกเก็ตเวิร์คสเตชั่นเวิร์คสเตชัน +%บลูทูธอินเทอร์เฟซ เวิร์คสเตชัน เบราว์เซอร์บลูเรย์เอาท์พุตเน็ตเวิร์คมัลติ +%ทวีตโค้ดซอฟท์แวร์ดอสโน้ตบุ๊กอีเมล์ บลูทูธพารามิเตอร์โมบายล์เอาต์พุต ชิปฟีเจอร์ทรานแซ็คชัน +%\begin{equation} +% \dfrac{\mathrm{d}}{\mathrm{d}x}\sin(2x) = 2\cos(2x). +%\end{equation} +% +%\begin{definition} +%เซ็กเมนต์ฟอสซิลครอสโนวาไดนามิคพาราเซตามอล ไฮเพอร์โบลาคูลอมบ์ +%ควอนตัมปฏิยานุพันธ์ไดนามิคโซนาร์เวกเตอร์ไดนามิกส์ +%ไดนามิกส์ควอนตัม ไททันไฮดรอลิกเทอร์โมยูเรียซิลิเกต ไฮเพอร์โบลาวีก้าไพรเมตเนกาตีฟ +%เมทริกซ์เซ็กเมนต์ โมเมนตัมแอสพาร์แตมเมตริกซ์ +%\end{definition} +% +%\begin{theorem} +%ไทฟอยด์ดอปเพลอร์เพอร์ออกไซด์ ฟิชชันฮิวมัสไดออกไซด์เอทานอล +%ไดนามิคโอเซลทามิเวียร์เทฟลอนวีก้า อีโบลาแคโรทีนเมตริกซ์ออกเทน พันธุศาสตร์ยูริกอัลตราซาวนด์เคอราติน +%อีโบล่าควอนตัม ดอปเปลอร์โพลาไรซ์มอนอกไซด์เวก้าอินทิกรัล ทามิฟลูทามิฟลูจุลชีววิทยาโครมาโทกราฟีฟอสซิล +%ซัลไฟด์ฟิชชันกลีเซอรีนเอทิลีนแคสสินี ไดนามิกฟอสซิลทามิฟลูแอสพาร์แตม +%\end{theorem} +% +%\section{หัวข้อที่สอง} +%เกตเวย์เอาต์พุทโหลด ไฟร์วอลล์สแปมเอาท์พุตอีเมลเวอร์ชวล +%ไลบรารีพร็อกซีแอปพลิเคชันโปรเซสพร็อกซี ดิจิทัลแอนิเมชั่นไอพ็อด ไดโอดซอร์สเดลไฟเน็ตบุ๊ค +%โฮสต์กราฟิกเอาท์พุตคอมไพเลอร์ อินพุทดาวน์โหลด แอสเซมเบลอร์อินเทอร์เน็ตเดเบียนเคอร์เซอร์อัพโหลด +%เฟิร์มแวร์โพรโทคอลไลบรารีเอนจินโน้ตบุค โค้ดเชลล์ริงโทน แอพพลิเคชั่นมอนิเตอร์อีเมลสปายแวร์ไฟล์ +%เทเลคอมเน็ตเวิร์กโฮสต์โหลด +%\begin{table}[!ht] +%\begin{center} +%\begin{tabular}{|c|c|} +%\hline +%\textbf{ไลบรารีพร็อกซี} & \textbf{โค้ดเชลล์ริงโทน}\\ \hline +%ดิจิตอลมินิมอล & $\tan(2x)-16x^2$ \\ \hline +%อลูมิเนียมไลบรารี & $\cos(x^2)$ \\ \hline +%\end{tabular} +%\caption{ไลบรารีเอนจินโน้ตบุค} +%\end{center} +%\end{table} +%ไฮดรอกไซด์พาร์ทิชัน เบงกาลี แล็ปท็อปกุมภาพันธ์พร็อกซีแคสสินี ตุลาคมทรานแซ็กชั่น +%แพลตฟอร์มไดโอดอัปเดตพารามิเตอร์โพลาไรซ์ ไฟเบอร์เจ๊บอแรกซ์ดิจิทัล คลิกเยลลี่สงบสุขโมดูล +%พาเนลเมตริกซ์ คอนโดมิเนียมคลัสเตอร์ เวิร์คสเตชั่น แท็บไอซีแฮปปี้ยีสต์ซัลฟิวริก โน้ตบุ๊กสงบสุขแอสพาร์แตม +%ดิสเครดิตเตี๊ยมคลอไรด์สวาฮิลีสแกนเนอร์ ออโรร่าไบต์ฮันกึลสปีชีส์อัลตราซาวด์ อารบิกกิกะไบต์ +%แพตเทิร์นบาร์บีคิวมีเดียริงโทน +% +%กลีเซอรีนโน้ตบุค ชิพฟีโรโมนละตินอินเทอร์เฟซ เกตเวย์คอเลสเตอรอลแพตช์วีเจ ฮิวมัสโบกี้โนวาเวิร์ลด์ +%แจ๊กพอตป๋าไอโฟนทามิฟลูคอมพ์ ไดเรกทอรีเจ็ตทัชแพดคลาสโฮสต์ บอแรกซ์ไชน่าแบนด์วิดท์พอร์ทจุลชีววิทยา +%ซัลฟิวริกเทคโนแครตโมเมนตัมโฮสต์ สต๊อคยีสต์โอริยา ภูมิทัศน์ดอสแคมเปญ เวกเตอร์คอเลสเตอรอลบึ้มสเปก +%เปียโนฟิวชันไอพ็อดมิถุนายนชิคุนกุนยา นายพรานอินพุตพอร์ทปูอัด +% +%ดิจิทัลสมิติเวชบอแรกซ์แพกเก็ต คลอไรด์ทัวริสต์ไชน่าโน้ตบุค คลาสสปายแวร์ไททันอะซีติกคอมพิวติ้ง +%ไฟเบอร์จิ๊กเคลมตากาล็อก เวสิเคิลโมไบล์อ่วม อูบันตูบึ้มไอโฟนโอริยาชิป พะเรอดิจิทัลอัพเกรด +%คลิกโซนาร์เลเยอร์มาร์เก็ต วอล์กเมลานินฮิรางานะธาลัสซีเมียภคันทลาพาธ กรีนฟอนต์ +%เกย์ไฮดรอกไซด์ครูเสดบาร์บีคิวคีย์ คอร์สเปกฟีโรโมนล็อบบี้ปูอัด เพทนาการดิจิทัลกรีน +%ไอคอนบลูทูธไททันซาดิสม์ไฮดรอกไซด์ อัลกอริทึมไอซีโอริยามอนอกไซด์แอสพาร์แตม +% +% +%\StopEventually{} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*thaispec.sty> +% \end{macrocode} +%\fi +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{thaispec}[2018/02/23 thaispec version 0.1] + +\RequirePackage{kvoptions} +\RequirePackage[no-math]{fontspec} +\RequirePackage[Latin, Thai]{ucharclasses} +\RequirePackage{setspace} +\RequirePackage{polyglossia} +\RequirePackage[calc]{datetime2} +\RequirePackage{xstring} +\RequirePackage{fp-basic, fp-snap} +\RequirePackage{afterpackage} +\RequirePackage{xpatch} + +% Key-Value Options +\SetupKeyvalOptions{ +family=THL, +prefix=THL@ +} +\DeclareStringOption[TH Sarabun New]{thaifont}[TH Sarabun New] +\DeclareStringOption[TeX Gyre Termes]{mainfont}[TeX Gyre Termes] +\DeclareStringOption[TeX Gyre Heros]{sansfont}[TeX Gyre Heros] +\DeclareStringOption[TeX Gyre Cursor]{monofont}[TeX Gyre Cursor] + +\DeclareVoidOption{thainum}{\renewcommand{\thesection}{\thainum{section}}} +\DeclareBoolOption[true]{texgyrefont} + +\DeclareStringOption[default]{thmcount}[default] + +\ProcessKeyvalOptions{THL} + + +% TeX Commands + +\newcommand{\testvar}{\THL@thmcount} + +% Set Thai language +\XeTeXlinebreaklocale "th" +\XeTeXlinebreakskip = 0pt plus 0pt +\sloppy +\defaultfontfeatures{Mapping=tex-text} + + +% Select Thai fonts +\ifTHL@texgyrefont +\setmainfont{\THL@mainfont} +\setsansfont{\THL@sansfont} +\setmonofont{\THL@monofont} +\else +\setmainfont[Scale=1.23]{\THL@thaifont} +\fi + + +% Control English/Thai Fonts +\newfontfamily{\thaifont}[Scale=MatchUppercase,Mapping=tex-text]{\THL@thaifont} + +\newenvironment{thailang} +{\thaifont} +{} + +\setTransitionTo{Thai}{\begin{thailang}} +\setTransitionFrom{Thai}{\end{thailang}} + +\setdefaultlanguage{english} +\setotherlanguage{thai} +\AtBeginDocument\captionsthai + +% In case of Beamer class +\@ifclassloaded{beamer} +{ +% TODO: Serif math font in beamer +} +{ +%% Normally set onehalf spacing +\onehalfspacing +} + + +% Define Thai alpha/number/digit for enumerated items +\def\thaialph#1{\expandafter\thalph\csname c@#1\endcsname} +\def\thalph#1{% + \ifcase#1\or ก\or ข\or ค\or ง\or จ\or ฉ\or ช\or ซ\or + ฌ\or ญ\or ฎ\or ฏ\or ฐ\or ฑ\or ฒ\or ณ\or ด\or ต\or ถ\or ท\or ธ\or น\or + บ\or ป\or ผ\or ฝ\or พ\or ฟ\or ภ\or ม\or ย\or ร\or ฤ\or ล\or ฦ\or ว\or + ศ\or ษ\or ส\or ห\or ฬ\or อ\else ฮ\else\xpg@ill@value{#1}{thalph}\fi} +\def\thainum#1{\expandafter\thainumber\csname c@#1\endcsname} +\def\thainumber#1{% + \thaidigits{\number#1}% +} +\def\thaidigits#1{\expandafter\thdigits #1@ } +\def\thdigits#1{% + \ifx @#1% then terminate + \else + \ifx0#1๐\else\ifx1#1๑\else\ifx2#1๒\else\ifx3#1๓\else\ifx4#1๔\else\ifx5#1๕\else\ifx6#1๖\else\ifx7#1๗\else\ifx8#1๘\else\ifx9#1๙\else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \expandafter\thdigits + \fi +} + +% Define Thai datetime +% \today - Print today in short format d-M-Y(BD) +% \Today - Print today in long format dow-d-M-Y(BD) +\DTMsavenow{now} +\newcommand{\dtdow}{\IfStrEqCase{\DTMfetchdow{now}}{{0}{วันจันทร์} +{1}{วันอังคาร} +{2}{วันพุธ} +{3}{วันพฤหัสบดี} +{4}{วันศุกร์} +{5}{วันเสาร์} +{6}{วันอาทิตย์} +}} + +\newcommand{\dtmonth}{\IfStrEqCase{\DTMfetchmonth{now}}{{1}{มกราคม} +{2}{กุมภาพันธ์} +{3}{มีนาคม} +{4}{เมษายน} +{5}{พฤษภาคม} +{6}{มิถุนายน} +{7}{กรกฎาคม} +{8}{สิงหาคม} +{9}{กันยายน} +{10}{ตุลาคม} +{11}{พฤศจิกายน} +{12}{ธันวาคม} +}} + +\newcommand{\dtyearbd}{\FPadd{\tmpdtyearbd}{\DTMfetchyear{now}}{543}\FPclip{\rtmpdtyearbd}{\tmpdtyearbd}พ.ศ.\;\rtmpdtyearbd} +\AtBeginDocument{ +\def\Today{\dtdow\;\DTMfetchday{now}\;\dtmonth\;\dtyearbd} +\def\today{\DTMfetchday{now}\;\dtmonth\;\dtyearbd} +} + + +% Thai theorem environments + +\AfterPackage{amsthm}{% +\IfStrEqCase{\THL@thmcount}{% +{default}{% +\newtheorem{theorem}{ทฤษฎีบท} +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{no}{% +\newtheorem*{theorem}{ทฤษฎีบท} +\newtheorem*{lemma}{บทตั้ง} +\newtheorem*{corollary}{บทแทรก} +\newtheorem*{proposition}{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem*{definition}{บทนิยาม} +\newtheorem*{undefinedterm}{อนิยาม} +\newtheorem*{axiom}{สัจพจน์} +\newtheorem*{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{full}{% +\newtheorem{theorem}{ทฤษฎีบท} +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ} +\newtheorem{note}{บันทึก} +}% +{section}{% +\newtheorem{theorem}{ทฤษฎีบท}[section] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{chapter}{% +\newtheorem{theorem}{ทฤษฎีบท}[chapter] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{kind}{% +\newtheorem{theorem}{ทฤษฎีบท} +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}{บทนิยาม} +\newtheorem{undefinedterm}[definition]{อนิยาม} +\newtheorem{axiom}[definition]{สัจพจน์} +\newtheorem{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ} +\newtheorem{note}{บันทึก} +}% +{kind-section}{% +\newtheorem{theorem}{ทฤษฎีบท}[section] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}{บทนิยาม}[section] +\newtheorem{undefinedterm}[definition]{อนิยาม} +\newtheorem{axiom}[definition]{สัจพจน์} +\newtheorem{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ}[section] +\newtheorem{note}{บันทึก}[section] +}% +{kind-chapter}{% +\newtheorem{theorem}{ทฤษฎีบท}[chapter] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}{บทนิยาม}[chapter] +\newtheorem{undefinedterm}[definition]{อนิยาม} +\newtheorem{axiom}[definition]{สัจพจน์} +\newtheorem{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ}[chapter] +\newtheorem{note}{บันทึก}[chapter] +}% +}% +\xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{} +} + + +\endinput +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/thaispec/thaispec.ins b/Master/texmf-dist/source/latex/thaispec/thaispec.ins new file mode 100644 index 00000000000..bd0a347baff --- /dev/null +++ b/Master/texmf-dist/source/latex/thaispec/thaispec.ins @@ -0,0 +1,31 @@ +% thaispec.ins generated using makedtx version 0.94b 2018/2/23 22:01 +\input docstrip + +\preamble + + thaispec.dtx + Copyright 2018 Ratthaprom Promkam + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either version 1.3 + of this license of (at your option) any later version. + The latest version of this license is in + http://www.latex-project.org/lppl.txt + and version 1.3 or later is part of all distributions of LaTeX + version 2005/12/01 or later. + + This work has the LPPL maintenance status `maintained'. + + The Current Maintainer of this work is Ratthaprom Promkam. + + This work consists of the files thaispec.dtx and thaispec.ins and the derived file thaispec.sty. + +\endpreamble + +\askforoverwritefalse + +\generate{\file{thaispec.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{thaispec.dtx}{thaispec.sty,package}} +} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/thaispec/thaispec.sty b/Master/texmf-dist/tex/latex/thaispec/thaispec.sty new file mode 100644 index 00000000000..ebbc72734cb --- /dev/null +++ b/Master/texmf-dist/tex/latex/thaispec/thaispec.sty @@ -0,0 +1,278 @@ +%% +%% This is file `thaispec.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% thaispec.dtx (with options: `thaispec.sty,package') +%% +%% thaispec.dtx +%% Copyright 2018 Ratthaprom Promkam +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Ratthaprom Promkam. +%% +%% This work consists of the files thaispec.dtx and thaispec.ins and the derived file thaispec.sty. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{thaispec}[2018/02/23 thaispec version 0.1] + +\RequirePackage{kvoptions} +\RequirePackage[no-math]{fontspec} +\RequirePackage[Latin, Thai]{ucharclasses} +\RequirePackage{setspace} +\RequirePackage{polyglossia} +\RequirePackage[calc]{datetime2} +\RequirePackage{xstring} +\RequirePackage{fp-basic, fp-snap} +\RequirePackage{afterpackage} +\RequirePackage{xpatch} + +\SetupKeyvalOptions{ +family=THL, +prefix=THL@ +} +\DeclareStringOption[TH Sarabun New]{thaifont}[TH Sarabun New] +\DeclareStringOption[TeX Gyre Termes]{mainfont}[TeX Gyre Termes] +\DeclareStringOption[TeX Gyre Heros]{sansfont}[TeX Gyre Heros] +\DeclareStringOption[TeX Gyre Cursor]{monofont}[TeX Gyre Cursor] + +\DeclareVoidOption{thainum}{\renewcommand{\thesection}{\thainum{section}}} +\DeclareBoolOption[true]{texgyrefont} + +\DeclareStringOption[default]{thmcount}[default] + +\ProcessKeyvalOptions{THL} + + +\newcommand{\testvar}{\THL@thmcount} + +\XeTeXlinebreaklocale "th" +\XeTeXlinebreakskip = 0pt plus 0pt +\sloppy +\defaultfontfeatures{Mapping=tex-text} + +\ifTHL@texgyrefont +\setmainfont{\THL@mainfont} +\setsansfont{\THL@sansfont} +\setmonofont{\THL@monofont} +\else +\setmainfont[Scale=1.23]{\THL@thaifont} +\fi + +\newfontfamily{\thaifont}[Scale=MatchUppercase,Mapping=tex-text]{\THL@thaifont} + +\newenvironment{thailang} +{\thaifont} +{} + +\setTransitionTo{Thai}{\begin{thailang}} +\setTransitionFrom{Thai}{\end{thailang}} + +\setdefaultlanguage{english} +\setotherlanguage{thai} +\AtBeginDocument\captionsthai + +\@ifclassloaded{beamer} +{ +} +{ +%% Normally set onehalf spacing +\onehalfspacing +} + +\def\thaialph#1{\expandafter\thalph\csname c@#1\endcsname} +\def\thalph#1{% + \ifcase#1\or ก\or ข\or ค\or ง\or จ\or ฉ\or ช\or ซ\or + ฌ\or ญ\or ฎ\or ฏ\or ฐ\or ฑ\or ฒ\or ณ\or ด\or ต\or ถ\or ท\or ธ\or น\or + บ\or ป\or ผ\or ฝ\or พ\or ฟ\or ภ\or ม\or ย\or ร\or ฤ\or ล\or ฦ\or ว\or + ศ\or ษ\or ส\or ห\or ฬ\or อ\else ฮ\else\xpg@ill@value{#1}{thalph}\fi} +\def\thainum#1{\expandafter\thainumber\csname c@#1\endcsname} +\def\thainumber#1{% + \thaidigits{\number#1}% +} +\def\thaidigits#1{\expandafter\thdigits #1@ } +\def\thdigits#1{% + \ifx @#1% then terminate + \else + \ifx0#1๐\else\ifx1#1๑\else\ifx2#1๒\else\ifx3#1๓\else\ifx4#1๔\else\ifx5#1๕\else\ifx6#1๖\else\ifx7#1๗\else\ifx8#1๘\else\ifx9#1๙\else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \expandafter\thdigits + \fi +} + +\DTMsavenow{now} +\newcommand{\dtdow}{\IfStrEqCase{\DTMfetchdow{now}}{{0}{วันจันทร์} +{1}{วันอังคาร} +{2}{วันพุธ} +{3}{วันพฤหัสบดี} +{4}{วันศุกร์} +{5}{วันเสาร์} +{6}{วันอาทิตย์} +}} + +\newcommand{\dtmonth}{\IfStrEqCase{\DTMfetchmonth{now}}{{1}{มกราคม} +{2}{กุมภาพันธ์} +{3}{มีนาคม} +{4}{เมษายน} +{5}{พฤษภาคม} +{6}{มิถุนายน} +{7}{กรกฎาคม} +{8}{สิงหาคม} +{9}{กันยายน} +{10}{ตุลาคม} +{11}{พฤศจิกายน} +{12}{ธันวาคม} +}} + +\newcommand{\dtyearbd}{\FPadd{\tmpdtyearbd}{\DTMfetchyear{now}}{543}\FPclip{\rtmpdtyearbd}{\tmpdtyearbd}พ.ศ.\;\rtmpdtyearbd} +\AtBeginDocument{ +\def\Today{\dtdow\;\DTMfetchday{now}\;\dtmonth\;\dtyearbd} +\def\today{\DTMfetchday{now}\;\dtmonth\;\dtyearbd} +} + + +\AfterPackage{amsthm}{% +\IfStrEqCase{\THL@thmcount}{% +{default}{% +\newtheorem{theorem}{ทฤษฎีบท} +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{no}{% +\newtheorem*{theorem}{ทฤษฎีบท} +\newtheorem*{lemma}{บทตั้ง} +\newtheorem*{corollary}{บทแทรก} +\newtheorem*{proposition}{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem*{definition}{บทนิยาม} +\newtheorem*{undefinedterm}{อนิยาม} +\newtheorem*{axiom}{สัจพจน์} +\newtheorem*{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{full}{% +\newtheorem{theorem}{ทฤษฎีบท} +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ} +\newtheorem{note}{บันทึก} +}% +{section}{% +\newtheorem{theorem}{ทฤษฎีบท}[section] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{chapter}{% +\newtheorem{theorem}{ทฤษฎีบท}[chapter] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{บทนิยาม} +\newtheorem{undefinedterm}[theorem]{อนิยาม} +\newtheorem{axiom}[theorem]{สัจพจน์} +\newtheorem{example}[theorem]{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem*{remark}{หมายเหตุ} +\newtheorem*{note}{บันทึก} +}% +{kind}{% +\newtheorem{theorem}{ทฤษฎีบท} +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}{บทนิยาม} +\newtheorem{undefinedterm}[definition]{อนิยาม} +\newtheorem{axiom}[definition]{สัจพจน์} +\newtheorem{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ} +\newtheorem{note}{บันทึก} +}% +{kind-section}{% +\newtheorem{theorem}{ทฤษฎีบท}[section] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}{บทนิยาม}[section] +\newtheorem{undefinedterm}[definition]{อนิยาม} +\newtheorem{axiom}[definition]{สัจพจน์} +\newtheorem{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ}[section] +\newtheorem{note}{บันทึก}[section] +}% +{kind-chapter}{% +\newtheorem{theorem}{ทฤษฎีบท}[chapter] +\newtheorem{lemma}[theorem]{บทตั้ง} +\newtheorem{corollary}[theorem]{บทแทรก} +\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ} +\theoremstyle{definition} +\newtheorem{definition}{บทนิยาม}[chapter] +\newtheorem{undefinedterm}[definition]{อนิยาม} +\newtheorem{axiom}[definition]{สัจพจน์} +\newtheorem{example}{ตัวอย่าง} +\theoremstyle{remark} +\newtheorem{remark}{หมายเหตุ}[chapter] +\newtheorem{note}{บันทึก}[chapter] +}% +}% +\xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{} +} + +\endinput +%% +%% End of file `thaispec.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index c6f2b557244..27b555c57dc 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -612,7 +612,7 @@ my @TLP_working = qw( texliveonfly texloganalyser texlogos texmate texments texosquery texpower texproposal texshade textualicomma texvc textcase textfit textglos textgreek textmerg textopo textpath textpos - tfrupee thaienum thalie theatre theoremref + tfrupee thaienum thaispec thalie theatre theoremref thesis-ekf thesis-gwu thesis-titlepage-fhac thinsp thmbox thmtools threadcol threeddice threeparttable threeparttablex thumb thumbpdf thumbs thumby thuthesis diff --git a/Master/tlpkg/tlpsrc/collection-langother.tlpsrc b/Master/tlpkg/tlpsrc/collection-langother.tlpsrc index d8c84bf1618..9895643d8ec 100644 --- a/Master/tlpkg/tlpsrc/collection-langother.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langother.tlpsrc @@ -51,6 +51,7 @@ depend padauk depend sanskrit depend sanskrit-t1 depend thaienum +depend thaispec depend velthuis depend vntex depend wnri diff --git a/Master/tlpkg/tlpsrc/thaispec.tlpsrc b/Master/tlpkg/tlpsrc/thaispec.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3