summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-01 22:36:54 +0000
committerKarl Berry <karl@freefriends.org>2021-03-01 22:36:54 +0000
commitcb7e589f4d6de0732a654dcacd8cb1273d519c28 (patch)
tree5f974774a1737f6a2d1d0b74e3dc1a7323f359d1 /Master
parent5f1f54a9110f9c39663d8ea100d2405d1f2f2627 (diff)
thaispec (1mar21)
git-svn-id: svn://tug.org/texlive/trunk@58019 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/thaispec/thaispec.pdfbin84199 -> 88377 bytes
-rw-r--r--Master/texmf-dist/source/latex/thaispec/thaispec.dtx146
-rw-r--r--Master/texmf-dist/source/latex/thaispec/thaispec.ins4
-rw-r--r--Master/texmf-dist/tex/latex/thaispec/thaispec.sty63
4 files changed, 108 insertions, 105 deletions
diff --git a/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf b/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf
index 944a289b7b5..189187ee128 100644
--- a/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf
+++ b/Master/texmf-dist/doc/latex/thaispec/thaispec.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/thaispec/thaispec.dtx b/Master/texmf-dist/source/latex/thaispec/thaispec.dtx
index 793da531198..499dbdb2dd7 100644
--- a/Master/texmf-dist/source/latex/thaispec/thaispec.dtx
+++ b/Master/texmf-dist/source/latex/thaispec/thaispec.dtx
@@ -1,11 +1,11 @@
%\iffalse
% thaispec.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -src "thaispec\.sty=>thaispec.sty"
% -doc "thaispec.tex"
% -author "Ratthaprom_Promkam"
+% -src "thaispec\.sty=>thaispec.sty"
% thaispec
-% Created on 2019/7/4 22:02
+% Created on 2021/3/2 0:13
%\fi
%\iffalse
%<*package>
@@ -28,7 +28,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2019 Ratthaprom_Promkam, all rights reserved.
+% Copyright (C) 2021 Ratthaprom_Promkam, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -82,7 +82,7 @@ autogobble=true,
\title{The \pkgname\ package: \\Thai language typesetting in \XeLaTeX}
\author{Ratthaprom Promkam\\{\texttt{\small ratthaprom@me.com}}}
-\date{Version 0.4 from July 4, 2019}
+\date{Version 2021.03.01}
\begin{document}
\DocInput{thaispec.dtx}
@@ -99,20 +99,28 @@ autogobble=true,
%
%
%\section{Prerequisite}
-%The package use \texttt{TH Sarabun New} font by default to typeset Thai characters
-%which included in the collection of Thai national fonts
-%\footnote{Thai national fonts, a.k.a. \texttt{SIPAFonts}.
-%See \url{https://github.com/epsilonxe/sipafonts}}.
-%At least this font must be installed to system wide in order to use this package.
-%Moreover the following \LaTeX\ package are essentially required for the default option: \texttt{fontspec}, \texttt{uchar­classes}, \texttt{poly­glos­sia}, \texttt{setspace}, \texttt{date­time2}, \texttt{kvop­tions}, \texttt{after­pack­age}, \texttt{xstring}, and \texttt{xpatch}.
+%The package requires \texttt{TH Sarabun New} \footnote{Thai national fonts, a.k.a. \texttt{SIPAFonts}.
+%See \url{https://github.com/epsilonxe/sipafonts}}, included in the collection of Thai national fonts, by default to typeset Thai characters.
+%The following \LaTeX\ package are essentially required for the default option: \texttt{fontspec}, \texttt{uchar­classes}, \texttt{poly­glos­sia}, \texttt{setspace}, \texttt{kvop­tions}, and \texttt{xpatch}.
%
%\section{Installation}
-%The \texttt{thaispec} packages are included in all major \LaTeX distributions.
-%In case it is not installed, please visit \url{https://github.com/epsilonxe/latex}} to download the latest version of \texttt{thaispec.sty} and put it in your working directory.
+%Although the \texttt{thaispec} packages are included in all major \LaTeX\ distributions, you may need to manually install or upgrade to the latest version.
+%
+%In a case that it is neither installed nor outdated, please visit \url{https://github.com/epsilonxe/latex} to download the latest version of \texttt{thaispec.sty} and put it in your working directory.
+%
+%More conveniently, but require familiar to command line interface,
+%please run the following commands to install or update to the most recent version of \texttt{thaipsec} via TexLive Manager.
+%However, you may need administrator right to launch these commands.
+%So consider to add \texttt{sudo} before each of the following commands.
+%
+%\begin{minted}{bash}
+%$tlmgr install thaispec
+%$tlmgr update thaispec
+%\end{minted}
%
%\section{Recommendation}
-%Install the collection of Thai national font said above.
-%Python and \textt{pygments} are also recommended to be installed to typeset Thai documents which some syntax highlighted codes are needed.
+%Install the collection of Thai national fonts said above.
+%Python and \texttt{pygments} are also recommended to be installed if syntax highlight needed in the document.
%
%\section{Package loading}
%In the preamble, add the command
@@ -303,7 +311,7 @@ autogobble=true,
%
%
%\section{Known Issues}
-%\subsection*{Incorrect Thai characters with \texttt{listing} package}
+%\subsection{Incorrect Thai characters with \texttt{listing} package}
%If you typeset some codes consisting of Thai characters in \texttt{lstlisting} environment provided by \texttt{listing} package, this will possibly cause you a problem with incorrect Thai characters.
%The recommendation is choosing \texttt{minted} package instead of \texttt{listing} package.
%However you need to additionally install \texttt{pygments} python module in order to use \texttt{minted} package.
@@ -318,6 +326,16 @@ autogobble=true,
%\end{minted}
%to typeset your tex file.
%
+%\subsection{TexPad in macOS}
+%As said above, the shell-escape must be enabled.
+%Additionally, the \emph{Hide Intermediate Files} option must be disable and copy the pygment launcher to \texttt{/usr/local/bin}.
+%The launcher can be located with the command
+%\begin{minted}[frame=single]{shell}
+%$ which pygments
+%\end{minted}
+%Instead of copying the launcher directly, one may put its symbolic link to \texttt{/usr/local/bin}.
+%If there is an error due to \texttt{minted} package, we recommend to delete the minted output directory prior typesetting.
+%
%\section{Credits}
%This package is motivated by a set of \LaTeX\ commands for typesetting Thai documents
%provided by Dittaya Wanvarie
@@ -344,16 +362,16 @@ autogobble=true,
% \end{macrocode}
%\fi
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thaispec}[2019/07/03 version 0.4 thaispec]
+\ProvidesPackage{thaispec}[version 2021.03.01]
\RequirePackage{kvoptions}
\RequirePackage[no-math]{fontspec}
\RequirePackage[Latin, Thai]{ucharclasses}
\RequirePackage{setspace}
\RequirePackage{polyglossia}
-\RequirePackage[calc]{datetime2}
+% \RequirePackage[calc]{datetime2}
\RequirePackage{xstring}
-\RequirePackage{afterpackage}
+% \RequirePackage{afterpackage}
\RequirePackage{xpatch}
% Key-Value Options
@@ -385,13 +403,17 @@ prefix=THL@
% TeX Commands
+\newcommand{\thaispecver}{2021.03.01}
+
% Set Thai language
\XeTeXlinebreaklocale "th"
\XeTeXlinebreakskip = 0pt plus 0pt
+
\ifTHL@sloppy
\sloppy
\fi
+
\defaultfontfeatures{Mapping=tex-text}
@@ -410,8 +432,19 @@ prefix=THL@
\setdefaultlanguage{english}
\setotherlanguage{thai}
+
\ifTHL@thaicaption
\AtBeginDocument\captionsthai
+\addto\captionsenglish{%
+ \renewcommand{\proofname}{พิสูจน์}%
+ \renewcommand{\chaptername}{บทที่}%
+ \renewcommand{\contentsname}{สารบัญ}%
+ \renewcommand{\listfigurename}{สารบัญรูปภาพ}%
+ \renewcommand{\listtablename}{สารบัญตาราง}%
+ \renewcommand{\figurename}{รูปภาพ}%
+ \renewcommand{\tablename}{ตาราง}%
+ \renewcommand{\refname}{เอกสารอ้างอิง}%
+}
\fi
@@ -438,38 +471,39 @@ prefix=THL@
% 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}{ธันวาคม}
-}}
-
-\newcounter{yearbd}
-\setcounter{yearbd}{\DTMfetchyear{now}}
-\addtocounter{yearbd}{543}
-%\newcommand{\dtyearbd}{\FPadd{\tmpdtyearbd}{\DTMfetchyear{now}}{543}\FPclip{\rtmpdtyearbd}{\tmpdtyearbd}พ.ศ.\;\rtmpdtyearbd}
-\AtBeginDocument{
-\def\Today{\dtdow\ \DTMfetchday{now}\ \dtmonth\ พ.ศ. \theyearbd}
-\def\today{\DTMfetchday{now}\ \dtmonth\ พ.ศ. \theyearbd}
-}
+
+% \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}{ธันวาคม}
+% }}
+
+% \newcounter{yearbd}
+% \setcounter{yearbd}{\DTMfetchyear{now}}
+% \addtocounter{yearbd}{543}
+% %\newcommand{\dtyearbd}{\FPadd{\tmpdtyearbd}{\DTMfetchyear{now}}{543}\FPclip{\rtmpdtyearbd}{\tmpdtyearbd}พ.ศ.\;\rtmpdtyearbd}
+% \AtBeginDocument{
+% \def\Today{\dtdow\ \DTMfetchday{now}\ \dtmonth\ พ.ศ. \theyearbd}
+% \def\today{\DTMfetchday{now}\ \dtmonth\ พ.ศ. \theyearbd}
+% }
% In beamer
@@ -527,7 +561,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -541,7 +574,6 @@ prefix=THL@
\newtheorem*{proposition}{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem*{definition}{บทนิยาม}
-\newtheorem*{undefinedterm}{อนิยาม}
\newtheorem*{axiom}{สัจพจน์}
\newtheorem*{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -555,7 +587,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -569,7 +600,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -583,7 +613,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -597,7 +626,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}{บทนิยาม}
-\newtheorem{undefinedterm}[definition]{อนิยาม}
\newtheorem{axiom}[definition]{สัจพจน์}
\newtheorem{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -611,7 +639,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}{บทนิยาม}[section]
-\newtheorem{undefinedterm}[definition]{อนิยาม}
\newtheorem{axiom}[definition]{สัจพจน์}
\newtheorem{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -625,7 +652,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}{บทนิยาม}[chapter]
-\newtheorem{undefinedterm}[definition]{อนิยาม}
\newtheorem{axiom}[definition]{สัจพจน์}
\newtheorem{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -638,8 +664,8 @@ prefix=THL@
{}
-\endinput
-%\iffalse
+% \endinput
+% END OF PACKAGE ----------------------------%\iffalse
% \begin{macrocode}
%</thaispec.sty>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/thaispec/thaispec.ins b/Master/texmf-dist/source/latex/thaispec/thaispec.ins
index a9d2cf6dd20..1fc55a3253d 100644
--- a/Master/texmf-dist/source/latex/thaispec/thaispec.ins
+++ b/Master/texmf-dist/source/latex/thaispec/thaispec.ins
@@ -1,10 +1,10 @@
-% thaispec.ins generated using makedtx version 1.2 2019/7/4 22:02
+% thaispec.ins generated using makedtx version 1.2 2021/3/2 0:13
\input docstrip
\preamble
thaispec.dtx
- Copyright 2019 Ratthaprom_Promkam
+ Copyright 2021 Ratthaprom_Promkam
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/tex/latex/thaispec/thaispec.sty b/Master/texmf-dist/tex/latex/thaispec/thaispec.sty
index 43f55494761..fdc1d68b8d0 100644
--- a/Master/texmf-dist/tex/latex/thaispec/thaispec.sty
+++ b/Master/texmf-dist/tex/latex/thaispec/thaispec.sty
@@ -7,7 +7,7 @@
%% thaispec.dtx (with options: `thaispec.sty,package')
%%
%% thaispec.dtx
-%% Copyright 2019 Ratthaprom_Promkam
+%% Copyright 2021 Ratthaprom_Promkam
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -65,16 +65,14 @@
%%
%%\end{lstlisting}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thaispec}[2019/07/03 version 0.4 thaispec]
+\ProvidesPackage{thaispec}[version 2021.03.01]
\RequirePackage{kvoptions}
\RequirePackage[no-math]{fontspec}
\RequirePackage[Latin, Thai]{ucharclasses}
\RequirePackage{setspace}
\RequirePackage{polyglossia}
-\RequirePackage[calc]{datetime2}
\RequirePackage{xstring}
-\RequirePackage{afterpackage}
\RequirePackage{xpatch}
\SetupKeyvalOptions{
@@ -103,11 +101,15 @@ prefix=THL@
\ProcessKeyvalOptions{THL}
+\newcommand{\thaispecver}{2021.03.01}
+
\XeTeXlinebreaklocale "th"
\XeTeXlinebreakskip = 0pt plus 0pt
+
\ifTHL@sloppy
\sloppy
\fi
+
\defaultfontfeatures{Mapping=tex-text}
@@ -122,8 +124,19 @@ prefix=THL@
\setdefaultlanguage{english}
\setotherlanguage{thai}
+
\ifTHL@thaicaption
\AtBeginDocument\captionsthai
+\addto\captionsenglish{%
+ \renewcommand{\proofname}{พิสูจน์}%
+ \renewcommand{\chaptername}{บทที่}%
+ \renewcommand{\contentsname}{สารบัญ}%
+ \renewcommand{\listfigurename}{สารบัญรูปภาพ}%
+ \renewcommand{\listtablename}{สารบัญตาราง}%
+ \renewcommand{\figurename}{รูปภาพ}%
+ \renewcommand{\tablename}{ตาราง}%
+ \renewcommand{\refname}{เอกสารอ้างอิง}%
+}
\fi
\def\thaialph#1{\expandafter\thalph\csname c@#1\endcsname}
@@ -145,37 +158,9 @@ prefix=THL@
\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}{ธันวาคม}
-}}
-
-\newcounter{yearbd}
-\setcounter{yearbd}{\DTMfetchyear{now}}
-\addtocounter{yearbd}{543}
-\AtBeginDocument{
-\def\Today{\dtdow\ \DTMfetchday{now}\ \dtmonth\ พ.ศ. \theyearbd}
-\def\today{\DTMfetchday{now}\ \dtmonth\ พ.ศ. \theyearbd}
-}
+
+
+
\@ifclassloaded{beamer}
{
@@ -226,7 +211,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -240,7 +224,6 @@ prefix=THL@
\newtheorem*{proposition}{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem*{definition}{บทนิยาม}
-\newtheorem*{undefinedterm}{อนิยาม}
\newtheorem*{axiom}{สัจพจน์}
\newtheorem*{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -254,7 +237,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -268,7 +250,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -282,7 +263,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{บทนิยาม}
-\newtheorem{undefinedterm}[theorem]{อนิยาม}
\newtheorem{axiom}[theorem]{สัจพจน์}
\newtheorem{example}[theorem]{ตัวอย่าง}
\theoremstyle{remark}
@@ -296,7 +276,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}{บทนิยาม}
-\newtheorem{undefinedterm}[definition]{อนิยาม}
\newtheorem{axiom}[definition]{สัจพจน์}
\newtheorem{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -310,7 +289,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}{บทนิยาม}[section]
-\newtheorem{undefinedterm}[definition]{อนิยาม}
\newtheorem{axiom}[definition]{สัจพจน์}
\newtheorem{example}{ตัวอย่าง}
\theoremstyle{remark}
@@ -324,7 +302,6 @@ prefix=THL@
\newtheorem{proposition}[theorem]{ทฤษฎีบทประกอบ}
\theoremstyle{definition}
\newtheorem{definition}{บทนิยาม}[chapter]
-\newtheorem{undefinedterm}[definition]{อนิยาม}
\newtheorem{axiom}[definition]{สัจพจน์}
\newtheorem{example}{ตัวอย่าง}
\theoremstyle{remark}