From 474fcb97dec178e39c0f996b2e4a99f9e4bf1a11 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 21 May 2019 21:08:02 +0000 Subject: hmtrump (21may19) git-svn-id: svn://tug.org/texlive/trunk@51178 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/lualatex/hmtrump/README.md | 63 ++++ Master/texmf-dist/doc/lualatex/hmtrump/by-sa.png | Bin 0 -> 11916 bytes .../doc/lualatex/hmtrump/hmtrump-sample.pdf | Bin 0 -> 419342 bytes .../doc/lualatex/hmtrump/hmtrump-sample.tex | 188 ++++++++++++ Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.pdf | Bin 0 -> 601854 bytes Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.tex | 322 +++++++++++++++++++++ .../hmtrump/nkd04_playing_cards_index/LICENSE | 62 ++++ .../hmtrump/nkd04_playing_cards_index/readme.txt | 55 ++++ .../public/hmtrump/nkd04_playing_cards_index.ttf | Bin 0 -> 49152 bytes Master/texmf-dist/tex/lualatex/hmtrump/hmtrump.sty | 134 +++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/libexec/ctan2tds | 7 + Master/tlpkg/tlpsrc/collection-games.tlpsrc | 1 + Master/tlpkg/tlpsrc/hmtrump.tlpsrc | 0 14 files changed, 833 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/README.md create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/by-sa.png create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.pdf create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.tex create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.pdf create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.tex create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/LICENSE create mode 100644 Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/readme.txt create mode 100644 Master/texmf-dist/fonts/truetype/public/hmtrump/nkd04_playing_cards_index.ttf create mode 100644 Master/texmf-dist/tex/lualatex/hmtrump/hmtrump.sty create mode 100644 Master/tlpkg/tlpsrc/hmtrump.tlpsrc diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/README.md b/Master/texmf-dist/doc/lualatex/hmtrump/README.md new file mode 100644 index 00000000000..5f0c6568164 --- /dev/null +++ b/Master/texmf-dist/doc/lualatex/hmtrump/README.md @@ -0,0 +1,63 @@ +# hmtrump Package + +## What is this? + +You will be able to describe playing cards using *hmtrump* package. +**This package needs LuaLaTeX**. + +sample.tex is sample file. + +## How to use? + +1. Install NKD04 Playing Card's Index font +1. \usepackage{hmtrump} in preamble +1. To describe cards, use \trump{*rank*}{*suit*} + ++ *rank*: 1 to 9, T (meaning 10), J, Q, K ++ *suit*: S (Spade), H (Hard), D (Diamond), C (Club), x (no suits) + +## Manual + +[hmtrump.pdf](hmtrump.pdf) is manual, written in Japanese. + +## 日本語でok + +トランプのルールを TeX で執筆する人に向けて作ったパッケージです。 +トランプのカードの記号を手軽に出力することができます。 +[hmtrump-sample.tex](hmtrump-sample.tex) がサンプルファイルになっています。 + +[hmtrump.pdf](hmtrump.pdf) がマニュアルです。ご一読ください。 + +### 使い方 + +**LuaLaTeX** を必要とします(fontspec パッケージを内部で読み込みます)。 + +まずはじめに、同梱の NKD04 Playing Card's Index フォントをインストールしてください。 + +プリアンブルに \usepackage{hmtrump} と書けば使用することができます。 + +トランプのカードを出力するには \trump{*rank*}{*suit*} とします。 +*rank* は 1〜9 の数字または T(10), K, Q, J を指定し、*suit* には S, H, D, C, x +(スペード、ハート、ダイヤ、クラブ、スートなし)を指定します。 + +その他提供される命令はマニュアルを参照してください。 + +## License + +このパッケージに含まれる成果物は、クリエイティブ・コモンズ 表示--継承 +ライセンスの元で配布を行う。 + +This package is licensed under a Creative Commons Attribution-ShareAlike +4.0 International License. + +NKD04 Playing Card's Index フォントのライセンスは、配布元で示されている通りの +条件に従う。すなわち、商用私用問わず自由に使用でき、配布元 +[http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm](http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm) +を示せば再配布も可能である。原文は[ここ](./nkd04_playing_cards_index/LICENSE)を参照。 + +NKD04 Playing Card's Index is licensed under following; +There is no restriction on using NKD04 Playing Card's Index regardless +of private or commercial, and it is possible to redistribute this. +In the case of redistribution, please specify this distribution source +([http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm](http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm)). +For further information, pleas see [here](./nkd04_playing_cards_index/LICENSE). diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/by-sa.png b/Master/texmf-dist/doc/lualatex/hmtrump/by-sa.png new file mode 100644 index 00000000000..182227ce65e Binary files /dev/null and b/Master/texmf-dist/doc/lualatex/hmtrump/by-sa.png differ diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.pdf b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.pdf new file mode 100644 index 00000000000..eaa32ceef52 Binary files /dev/null and b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.tex b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.tex new file mode 100644 index 00000000000..d50d58726bb --- /dev/null +++ b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump-sample.tex @@ -0,0 +1,188 @@ +\documentclass[jafontsize=8pt]{jlreq} + +\usepackage{luatexja} +\ltjdefcharrange{11}{`→,`↑,`↓,`←} +\ltjsetparameter{jacharrange={-2,-8,+11}} +\usepackage[jfm_yoko=jlreq,jfm_tate=jlreqv]{luatexja-preset} +\usepackage{luatexja-otf,luatexja-adjust} +\newopentypefeature{PKana}{On}{pkna} + +\usepackage{yhmath,amssymb,mathtools,mathabx,mathrsfs,mathbbol} + +\usepackage[math]{iwona} +\usepackage[euler-digits]{eulervm} +\usepackage{tgheros,newpxtext,yhmath} +\usepackage[scaled]{beramono} +\DeclareMathAlphabet{\mathtt}{T1}{fvm}{m}{n} +\DeclareMathAlphabet{\mathsf}{T1}{uop}{m}{n} + +\usepackage{scalefnt} +\usepackage{multirow} +\usepackage{multicol} +\ltjenableadjust[lineend=extended,priority=true,profile=true,linestep=true] +\allowdisplaybreaks[4] + +\usepackage{hmtrump} + +\usepackage[a4paper,margin=15mm]{geometry} + +\newcommand{\hmG}{% + \tikz[baseline=(T.base)] + \node[fill=black,text=white,outer sep=0pt,inner sep=0.1ex] + (T)at(0,0){\textsf{G}};% +} + +%%%%%%%%%%%%%%%%%%%%%%% + + +\begin{document} + +\pagestyle{empty} + +\vspace{-1cm} +\title{Skat ルールサマリー} +\author{ひとみさん} + +\begin{center} +{\LARGE Skat ルール早見}---ひとみさん \today +\end{center} + +\setlength{\parindent}{0pt} + +\section{ゲームの流れ} +\textbf{\mbox{カードを配る}\hfill →\hfill \mbox{ビッドをする}\hfill →\hfill +\mbox{スカート交換、ゲームの種類を決める}\hfill →\hfill \mbox{トリックテイキング}\hfill +→\hfill \mbox{得点計算}\hfill}\\ +配り方: 3→スカート2→4→3 +\hspace*{1\zw}(4人以上)ディーラーと(5人)ディーラーの3つ左隣は不参加、ディーラーの次がオープニングリード\\ +ビッドは勝ち抜き方式(先のビッドに優先権) + +\section{カード} +基本の目的: 61カード点以上獲得/ヌルゲーム: 1トリックも取らない +\begin{table}[h] +\begin{minipage}{.2\textwidth} +\centering +\caption{カード点} +\begin{tabular}{c|c} +\hline +\trump Ax&11\\ +\trump Tx&10\\ +\trump Kx&4\\ +\trump Qx&3\\ +\trump Jx&2\\ +\hline\hline +総計&120\\ +\hline +\end{tabular} +\end{minipage} +\begin{minipage}{.75\textwidth} +\centering +\caption{ランクの順} +\begin{tabular}{c|c|l} +\hline +\multirow{2}{*}{スートゲーム}& +切札&$\trump JC>\trump JS>\trump JH>\trump JD + >\trump Ax>\trump Tx>\trump Kx>\trump Qx>\trump 9x>\trump 8x>\trump 7x$\\ +&切札以外&$\trump Ax>\trump Tx>\trump Kx>\trump Qx>\trump 9x>\trump 8x>\trump 7x$\\ +\hline +\multirow{2}{*}{グランド}& +切札&$\trump JC>\trump JS>\trump JH>\trump JD$\\ +&切札以外&$\trump Ax>\trump Tx>\trump Kx>\trump Qx>\trump 9x>\trump 8x>\trump 7x$\\ +\hline\hline +\multicolumn{2}{c|}{ヌルゲーム}& +$\trump Ax>\trump Kx>\trump Qx>\trump Jx>\trump Tx>\trump 9x>\trump 8x>\trump 7x$\\ +\hline +\end{tabular} +\end{minipage} +\end{table} + +\section{ゲーム点} +$\text{Gp}=\text{基本点}\times\text{達成点}$、失敗ならば2倍\\ +ビッドの点数に足りず失敗→達成点を増やし、ビッドの点数を超えたところで Gp とし、それの2倍の失点\\ +\textbf{シュワルツ}→全トリック取る/\textbf{シュナイダー}→90点以上/\textbf{ウベア}→手札を公開して全トリック\\ +\hspace{1\zw}いずれもハンドゲームのときにのみ宣言可能(宣言せずとも、成り行きで達成は可能)\\ +\textbf{ウィズ/ウィズアウト}→上から何枚の連続した切札を持っている/いないか +\begin{table}[h] +\begin{minipage}{.2\textwidth} +\centering +\caption{基本点} +\begin{tabular}{cc|c} +\hline +\multirow{2}{*}{\mbox{\tate \hspace{0.3\zw}スートゲーム}} +&\hmD&9\\ +&\hmH&10\\ +&\hmS&11\\ +&\hmC&12\\ +\hline +\multicolumn{2}{c|}{グランド}&24\\ +\hline +\end{tabular} +\end{minipage} +\begin{minipage}{.75\textwidth} +\centering +\caption{達成点} +\begin{tabular}{cc||cccccc} +\hline +&&シュワルツ&シュナイダー&89--31&逆シュナイダー&逆シュワルツ\\ +\hline\hline +\multicolumn{2}{c||}{スカートゲーム} +&3&2&1&2&3\\ +\multirow{4}{*}{\mbox{\tate \hspace{0.3\zw}ハンドゲーム}} +&宣言無し +&4&3&2&3&4\\ +&シュナイダー宣言 +&5&4&4&5&6\\ +&シュワルツ宣言 +&6&6&6&7&8\\ +&ウベア宣言 +&7&7&7&8&9\\ +\hline +\multicolumn{7}{r}{+ウィズ/ウィズアウト} +\end{tabular} +\end{minipage} +\end{table} +\begin{table}[h] +\caption{基本点(ヌルゲーム)→達成点は1固定} +\centering +\begin{tabular}{cccc} +\hline +ヌル(ハンド)&ヌル(スカート)&ヌル・ウベア(ハンド)&ヌル・ウベア(スカート)\\ +\hline +23&35&46&59\\ +\hline +\end{tabular} +\end{table} + +\section{ビッド可能な点数} +18 \hmD2→\hmD のスートゲーム、達成点2で 18 Gp\hspace{1\zw}\hmG →グランド\\ +\begin{multicols}{4} +\renewcommand{~}{\hspace{1\zw}} +18~\hmD2\\ +20~\hmH2\\ +22~\hmS2\\ +23~ヌル(スカート)\\ +24~\hmC2\\ +27~\hmD3\\ +30~\hmH3\\ +33~\hmS3\\ +35~ヌル(ハンド)\\ +36~\hmD4, \hmC3\\ +40~\hmH4\\ +44~\hmS4\\ +45~\hmD5\\ +46~ヌル・ウベア(ハンド)\\ +48~\hmC4, \hmG2\\ +50~\hmH5\\ +54~\hmD6\\ +55~\hmS5\\ +59~ヌル・ウベア(ハンド)\\ +60~\hmH6, \hmC5\\ +63~\hmD7\\ +66~\hmS6\\ +70~\hmH7\\ +72~\hmD8, \hmC6, \hmG3\\ +\begin{center}$\vdots$\end{center} +\end{multicols} + + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.pdf b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.pdf new file mode 100644 index 00000000000..6c1d58a550d Binary files /dev/null and b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.tex b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.tex new file mode 100644 index 00000000000..a67ee7f0b73 --- /dev/null +++ b/Master/texmf-dist/doc/lualatex/hmtrump/hmtrump.tex @@ -0,0 +1,322 @@ +%! LuaLaTeX +\documentclass{jlreq} +\usepackage{hmtrump} +\usepackage{shortvrb,bxtexlogo} +\usepackage[hidelinks,unicode=true]{hyperref} +\usepackage{tgheros,newpxtext,newpxmath} +\usepackage[scaled]{beramono} +\MakeShortVerb{\|} +\usepackage[jfm_yoko=jlreq,jfm_tate=jlreqv]{luatexja-preset} +\renewcommand{\thefootnote}{\textasteriskcentered\arabic{footnote}} +\title{|hmtrump| Package} +\author{ひとみさん} +\date{v1.0d [2019/05/14]} + +\begin{document} +\maketitle + +\begin{center} +Repository: \url{https://github.com/Hitomi-San/hmtrump}\\ +Font: \url{http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm} +\end{center} + +\hrulefill +\tableofcontents +\pagebreak + +\section{What is this} +You will be able to describe playing cards using |hmtrump| package. +\emph{This package needs LuaLaTeX.} + + +\section{How to use?} +\begin{enumerate} +\item Install NKD04 Playing Card's Index font +\item |\usepackage{hmtrump}| in preamble +\item To describe cards, use |\trump{}{}| +\end{enumerate} + +\begin{description} +\item[] 1 to 9, T (meaning 10), J, Q, K +\item[] S (Spade), H (Hard), D (Diamond), C (Club), x (no suits) +\end{description} + +\vspace*{5pt} +\rule{0pt}{0pt}\hfil +\begin{minipage}[t]{.45\textwidth} +\centerline{output}\hrule\vspace*{1pt}\hrule +\footnotesize +When you play skat, you might remember all \trumpx J +cards---\trump JC, \trump JS, \trump JH and \trump JD +belong trump suit. If trump suit is \hmD{} and +\trump TD is led, then you can follow with \trump JC. + +The rank of \trumpx{J} is below: +\[\trump JC>\trump JS>\trump JH>\trump JD\] + +All joker---\joker, \blackjoker, \redjoker{} will not +be used in skat. + +\hspace{1ex}\hrule\hspace{1ex} + +タロットカードには、切札専用のカード\tarottrump{1}〜 +\tarottrump{21}が含まれています。占い用のタロットカード +には\trumpblank{愚者}のカードが含まれていますが、 +これは切札ではありません。 +\end{minipage} +\hfil +\begin{minipage}[t]{.45\textwidth} +\centerline{imput}\hrule\vspace*{1pt}\hrule +\scriptsize\ttfamily +When you play skat, you might remember all |\trumpx| J +cards---|\trump| JC, |\trump| JS, |\trump| JH and |\trump| JD +belong trump suit. If trump suit is |\hmD{}| and |\trump| TD +is led, then you can follow with |\trump| JC.\\ + +The rank of trumps are below:\\ +|\[| +|\trump| JC > |\trump| JS > |\trump| JH > |\trump| JD +|\]|\\ +All joker---|\joker|, |\blackjoker|, |\redjoker{}| will not +be used in skat.\\ + +|\hspace{1ex}\hrule\hspace{1ex}|\\ + +タロットカードには、切札専用のカード |\tarottrump{1}|〜 +|\tarottrump{21}| が含まれています。占い用のタロットカードには +|\trumpblank{愚者}| のカードが含まれていますが、これは切札では +ありません。 +\end{minipage} +\hfil\rule{0pt}{0pt} +\vspace*{5pt} + +\section{これは何} +\TeX 文書中で、トランプのカードを表現するためのパッケージです。 +|hmtrump| パッケージを利用することで、次のような出力を得る +ことができます。内部で |fontspec| パッケージを読み込んでいるので、 +\LuaLaTeX 専用のパッケージとなります(\XeLaTeX でも動くかも +しれないけど、動作確認してないので非対応です)。日本語文書中 +でも使用できます。 + +\section{使い方} +このパッケージで用いているトランプのインデックス用のフォントは、 +同梱のトランプの隅印的書体『NKD04 Playing Card's Index』Version 0.80 +\footnote{\url{http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm}} +を用いています。|hmtrump| パッケージを利用する前に、このフォントを +\LuaTeX から利用可能な場所に保存してください。通常はこのフォントを +インストールすればよいです。フォントの作成者はうみほたる様です。 +パッケージ作成者ではありません。 + +パッケージを読み込むには|\usepackage{hmtrump}|をプリアンブルに +書いてください。オプションはありません。 + +\section{依存パッケージ} +|hmtrump| パッケージは内部で |tikz|、|xcolor|、|fontspec| パッケージ +を読み込みます。 + +\section{提供される命令} +\begin{table}[tb] +\centering +\caption{例\label{ie}} +\begin{tabular}{lc} +\hline +\multicolumn{1}{c}{入力/input}&出力/output\\ +\hline\hline +|\trump{A}{S} \trump{J}{C}|&\trump {A}{S} \trump{J}{C}\\ +|\trump 7D \trump QH|&\trump 7D \trump QH\\ +|\trump 3x \trump Tx|&\trump 3x \trump Tx\\ +|\trumpx 6 \trumpx Q|&\trumpx 6 \trumpx Q\\ +\hline +|\hmS \hmH \hmD \hmC|&\hmS \hmH \hmD \hmC\\ +\hline +|\JOKER \joker|&\JOKER \joker\\ +|\BLACKJOKER \blackjoker|&\BLACKJOKER \blackjoker\\ +|\WHITEJOKER \whitejoker|&\WHITEJOKER \whitejoker\\ +|\REDJOKER \redjoker|&\REDJOKER \redjoker\\ +\hline +|\trumpblank{愚者}|&\trumpblank{愚者}\\ +|\trumpblank{\hmtcfont PAGE}|&\trumpblank{\hmtcfont PAGE}\\ +\hline +|\tarottrump{0}|&\tarottrump{0}\\ +|\tarottrump{14}|&\tarottrump{14}\\ +|\tarottrump{21}|&\tarottrump{21}\\ +\hline +\end{tabular} +\end{table} + +\subsection{\textbackslash trump 命令} +|\trump{<ランク>}{<スート>}| の書式で、トランプのカードを出力します。 +|<ランク>| には通常 |A|、|1| から |9| の整数、|T|、|J|、|C|、|Q|、|K| の +いずれかが入力されることを想定しています。|T| とすると +{\fontspec{NKD04_Playing_Cards_Index}{\char"E002}}が出力 +されます。|<スート>| には |S|(\hmS)、|H|(\hmH)、|D|(\hmD)、 +|C|(\hmC)|x|(スートの指定なし)のいずれかを指定します。 + +|\trump{<ランク>}{x}|は|\trumpx{<ランク>}|と書くこともできます。 + +\subsection{スート出力命令} +|\hmS|、|\hmH|、|\hmD|、|\hmC| はそれぞれ \hmS、\hmH、 +\hmD、\hmC を出力します。 + +\subsection{ジョーカー出力命令} +|\JOKER| や |\joker| で\JOKER や\joker を出力します。 +ジョーカー出力命令は8種類あります。表\ref{ie}を参照してください。 +デフォルトでは、|\JOKER| は |\BLACKJOKER|になり、 +|\joker| は |\blackjoker| となっています。必要に +応じて、|\renewcommand{\joker}{\whitejoker}| などとすることが +できます。 + +\subsection{汎用カード命令} +|\trumpblank{<内容>}| で一般のカードを出力します。カードの中身 +は本文書体で表示されるので、必要があれば適当に |\textsf| や |\textbf| +などを補ってください。|\hmtcfont| 命令 +で NKD04 Playing Card's Index を利用できます(|\hmtcfont| +は宣言型の命令です)。例えば、|\trumpblank{\hmtcfont JOKER}| +で\trumpblank{\hmtcfont JOKER}を出力します。 + +\subsection{タロットカードの切札用命令} +|\tarottrump{<数字>}| で、タロットの切札を出力できます。|<数字>| には +0から21の整数が入ります。例えば、|\tarottrump{8}| で\tarottrump{8}が +出力されます。|\tarottrump{0}| は愚者のカードを出力する目的で用い、 +\tarottrump{0}が出力されます。 + +\section{カスタマイズ} +|\renewcommand| などをすることによって、出力結果をカスタマイズ +することができます。 + +\subsection{フォント名} +NKD04\_Playing\_Cards\_Index を違うフォント名でインストールした場合、 +|\hmtc@trump@font| をインストールしたフォント名に |\renewcommand| で +定義し直してください。 + +注意: NKD04 Playing Card's Index Version 0.80 の私用領域を +前提としているので、他のフォントを指定した場合はうまく動きません。 + +\subsection{色} +\begin{table}[tb] +\centering +\caption{変更可能な色\label{color}} +\begin{tabular}{lll} +\hline +色の名前&デフォルトの定義&色の箇所\\ +\hline\hline +|hartsuit|&|{cmyk}{.14,.94,.22,.27}|&ハートのスート及びカードの文字\\ +|diasuit|&|{cmyk}{.11,.57,.97,.31}|&ダイヤのスート及びカードの文字\\ +|clubsuit|&|{cmyk}{.70,.5,.99,.18}|&クラブのスート及びカードの文字\\ +|spadesuit|&|{cmyk}{.98,.80,.5,.15}|&スペードのスート及びカードの文字\\ +\hline +|cardback|&|{gray}{.95}|&カードの背景\\ +|cardborder|&|{gray}{.2}|&カードの枠線\\ +|cardtext|&|{gray}{0}|&スート指定のないカードの文字\\ +\hline +\end{tabular} +\end{table} + +視認しやすいよう、|hmtrump| パッケージではスートのマークと、 +スートのマークを伴うカードを出力する時に、色を使って出力します。 +デフォルトでは、白黒印刷にも耐えれるよう、それぞれ彩度を落とした +色になっています。 + +色を変更したい場合は、|xcolor| パッケージが提供している、 |\definecolor| +命令を使って、色の定義を変更します。変更できる色の定義は、表\ref{color}に +示してあるとおりです。 + +例えば、|\definecolor{hartsuit}{cmyk}{0,.84,.94,.01}| と書いておけば、 +|\hmH| で{\definecolor{hartsuit}{cmyk}{0,.84,.94,.01}\hmH}が出力されます。 +|\definecolor| 命令は、局所化の影響を受けるので、|{}| で括れば +一部だけの色を変えることも可能です。 + +\subsection{サイズ} +|\tizset|命令を使って、出力されるカードのサイズを変更することができます。 + +|\tikzset{hmtcscale/.style={scale=<倍率>}}| と書くことで指定した倍率の +カードが出力されます。デフォルトでは 0.9 倍になっています。こちらも局所化の影響を +うけます。ベースラインの位置は固定です。 + +例えば |{\tikzset{hmtcscale/.style={scale=0.6}}\trump 3H}\trump JD| と +書くと {\tikzset{hmtcscale/.style={scale=0.6}}\trump 3H}\trump JD が出力されます。 + +\section{その他} +\begin{itemize} +\item \LuaLaTeX-ja を利用している場合、|\ltjdefcharrange| 命令を用いて、24番の + 文字範囲にいくつかの文字を追加し、それらを\textbf{ALchar}として設定します。 + 文字範囲を変更している場合、24番の文字範囲には新しく文字を追加したり、\textbf{JAchar} + として設定しないように注意してください。 +\end{itemize} + +\section{TO DO} +以下実装したいと思っていること: +\begin{itemize} +\item Unicode のトランプの領域の文字({\fontspec{NKD04_Playing_Cards_Index}\char"1F0D1}など) + を利用するための機構の実装。 +\item |\trump| 命令に不正なスートの指定子が指定された時にエラーを吐くようにする。 +\item もしかしなくても |\joker| 命令で出力されるカード、若干位置が下がってますね……。 +\item {[2019-04-14 ver.~1.0]} |fontspec| パッケージに対する理解が甘くて、 + フォントを選択するやり方が若干マズい気がするので、修正したい。 +\end{itemize} + +\section{License} + +\rule{0pt}{0pt}\hfill\includegraphics[height=2\zh]{by-sa.png}\hfill\rule{0pt}{0pt} + +このパッケージに含まれる成果物は、クリエイティブ・コモンズ 表示--継承 +ライセンスの元で配布を行う。 + +NKD04 Playing Card's Index フォントのライセンスは、配布元で示されている通りの +条件に従う。すなわち、商用私用問わず自由に使用でき、配布元 +\url{http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm} +を示せば再配布も可能である。原文は下に示す。 + +This package is licensed under a Creative Commons Attribution-ShareAlike +4.0 International License. + +NKD04 Playing Card's Index is licensed under following; +There is no restriction on using NKD04 Playing Card's Index regardless +of private or commercial, and it is possible to redistribute this. +In the case of redistribution, please specify this distribution source +\url{http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm}. +The original text is shown below. + +以下が、\url{http://hwm3.gyao.ne.jp/shiroi-niwatori/faq.txt}にて記されている、 +フォントのライセンスの全文である(「以下各フォント」に +nkd04\_playing\_cards\_index.ttf も含まれている)。 + +\noindent\hspace{1cm}\dotfill\hspace{1cm} + +\bgroup\small +\url{http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm} +にて配布している「にしき的フォント」以下各フォントでの文書や画像の作成、 +装飾としての利用等、一般的な目的での使用については何の制限もありません。 +私用商用を問わず存分にご自由におこなってください。 + +ゲームなどのアーカイヴへの同梱や、その他なんらかの形の再配布についても、必要であればかまいません。 +再配布の場合は当配布元は明示しておいていただければと思います (当配布元が消滅した場合は不要です)。 + +フォントはときどき更新していたりするので、なるべく最新版をお使いいただけると嬉しいです。 +特に「にしき的フォント」(Nishiki-teki) は文字の追加や修正等をかなり頻繁におこなっております。 + +フォントの使用に際して当方への報告などは特に必要ありません。 +が、ご一報などいただけました場合には使ってくださってありがたいなあと喜びつつ今後の参考にさせて +いただいたり心の糧として励みにするなどいたします。 + +なにか疑問点や至らぬ点などございましたら忌憚なくお問い合わせください。\\ +\url{http://hwm3.gyao.ne.jp/shiroi-niwatori/quispiam_est.htm}\\ +このページ下部のWeb拍手あたりをご利用いただければと存じます。 +当方からの返答は \url{http://d.hatena.ne.jp/Umihotaru/} こちらをご覧になってください。 + + +\hspace{3\zw}2016-03-18\hspace{1\zw}うみほたる拝 +\egroup + +\section{Change log} +\begin{description} +\item[{[2019-05-21 ver.~1.0d]}] フォントのライセンスを明記。 +\item[{[2019-05-15 ver.~1.0c]}] ライセンスを明記。 +\item[{[2019-05-14 ver.~1.0b]}] |\@undefined| を使うことを覚えた。 +\item[{[2019-05-14 ver.~1.0b]}] 英文のドキュメントを作成。 +\item[{[2019-04-14 ver.~1.0]}] |hmtrump.sty| に作者を明記。 +\item[{[2019-04-14 ver.~1.0]}] ドキュメントのサンセリフフォントを変更。 +\item[{[2019-04-14 ver.~1.0]}] TO DO を追加。 +\end{description} + +\end{document} diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/LICENSE b/Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/LICENSE new file mode 100644 index 00000000000..dad2dab2f54 --- /dev/null +++ b/Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/LICENSE @@ -0,0 +1,62 @@ +以下は、http://hwm3.gyao.ne.jp/shiroi-niwatori/faq.txt にて記されている、 +フォントのライセンスの全文である。 +(「以下各フォント」に nkd04_playing_cards_index.ttf も含まれている) + +------------------------- + +http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm +にて配布している「にしき的フォント」以下各フォントでの文書や画像の作成、 +装飾としての利用等、一般的な目的での使用については何の制限もありません。 +私用商用を問わず存分にご自由におこなってください。 + +ゲームなどのアーカイヴへの同梱や、その他なんらかの形の再配布についても、必要であればかまいません。 +再配布の場合は当配布元は明示しておいていただければと思います (当配布元が消滅した場合は不要です)。 + +フォントはときどき更新していたりするので、なるべく最新版をお使いいただけると嬉しいです。 +特に「にしき的フォント」(Nishiki-teki) は文字の追加や修正等をかなり頻繁におこなっております。 + +フォントの使用に際して当方への報告などは特に必要ありません。 +が、ご一報などいただけました場合には使ってくださってありがたいなあと喜びつつ今後の参考にさせて +いただいたり心の糧として励みにするなどいたします。 + +なにか疑問点や至らぬ点などございましたら忌憚なくお問い合わせください。 +http://hwm3.gyao.ne.jp/shiroi-niwatori/quispiam_est.htm +このページ下部のWeb拍手あたりをご利用いただければと存じます。 +当方からの返答は http://d.hatena.ne.jp/Umihotaru/ こちらをご覧になってください。 + + +   2016-03-18 うみほたる拝 + +====================== + +This is license written of ``Nishiki-teki font,'' including NKD04 Playing Card’s Index, +in http://hwm3.gyao.ne.jp/shiroi-niwatori/faq.txt + +------------------------- + +There is no restriction on using each font distributed on +http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm, such as ``Nishiki-teki,'' +for general purpose such as creation of documents and images, use as decoration, etc. +Please do it freely regardless of private or commercial. + +It is possible, if necessary, to bundle the fonts into an archive, such as a game, +or to redistribute them in some other way. In the case of redistribution, please +specify this distribution source (it is not necessary if this distribution source +has disappeared). + +The fonts are updated from time to time, so I hope you will use the latest version +as much as possible. In particular, "Nishiki-teki" frequently adds characters and +makes corrections. + +There is no need to report to us when using fonts. However, if you do so, I would +like to thank you for using it, and I will use it as a reference for the future, or +as a source of encouragement. + +Please feel free to contact us if you have any questions or concerns. +http://hwm3.gyao.ne.jp/shiroi-niwatori/quispiam_est.htm + +We hope you can use Web Clap at the bottom of this page. +The response from me http://d.hatena.ne.jp/Umihotaru/ Please see here. + +2016-03-18 Umihotaru +(translated by Shoma Hitomi 2019-05-21) diff --git a/Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/readme.txt b/Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/readme.txt new file mode 100644 index 00000000000..322ee67c20f --- /dev/null +++ b/Master/texmf-dist/doc/lualatex/hmtrump/nkd04_playing_cards_index/readme.txt @@ -0,0 +1,55 @@ + + _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ + + + TrueTypeフォント トランプの隅印的書体 + 『NKD04 Playing Card's Index』 + Version 0.80 + + + _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ + + + + * トランプのインデックスによく使われるような数字や文字の書体を摸したスラブセリフ体のフォントです。 + + * インデックス index とは、トランプのカードの隅に振られている数字とスート (♠♥♦♣) の表示のことです。 + * 小学館『ランダムハウス英和大辞典』ではこの index に対して + * 「隅印(すみじるし)」という和訳語を示していますが、あまり一般に知られた用語ではなさそうです。 + + + * 当フォントはASCII文字のほかに、今のところ以下の文字や記号を含んでいます: + +¼½¾ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯ○●★☆♠♡♢♣♤♥♦♧❤ + + * また、Unicodeの「Playing Cards」ブロック (U+1F0A0..1F0FF) に、数字とスートを簡約に示した図柄を + * 収録しています。 + + * そのほか、私用領域に以下のものを収めています。 + +U+E000  ブランクカード +U+E001  合成用カード枠 +U+E002  数字10 +U+E003  数字11 +U+E004  数字12 +U+E005  数字13 +U+EDDB  ローマ数字XIII +U+EDDC  ローマ数字XIV +U+EDDD  ローマ数字XV +U+EDDE  ローマ数字XVI +U+EDDF  ローマ数字XVII +U+EDE0  ローマ数字XVIII +U+EDE1  ローマ数字XIX +U+EDE2  ローマ数字XX +U+EDE3  ローマ数字XXI +U+F5BC  ジョーカーのシンボル黒 +U+F5BD  ジョーカーのシンボル白 +U+F5BE  ジョーカーのシンボル赤(縦縞) + + + + + 制作: うみほたる + ni.wa.torigairu@gmail.com + http://hwm3.gyao.ne.jp/shiroi-niwatori/nishiki-teki.htm + diff --git a/Master/texmf-dist/fonts/truetype/public/hmtrump/nkd04_playing_cards_index.ttf b/Master/texmf-dist/fonts/truetype/public/hmtrump/nkd04_playing_cards_index.ttf new file mode 100644 index 00000000000..e11169e7fc1 Binary files /dev/null and b/Master/texmf-dist/fonts/truetype/public/hmtrump/nkd04_playing_cards_index.ttf differ diff --git a/Master/texmf-dist/tex/lualatex/hmtrump/hmtrump.sty b/Master/texmf-dist/tex/lualatex/hmtrump/hmtrump.sty new file mode 100644 index 00000000000..5fe1bfb49c5 --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/hmtrump/hmtrump.sty @@ -0,0 +1,134 @@ +% +% This is `hmtrump.sty' +% +% Author: Hitomi-san (a.k.a. Carele Smith) +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hmtrump}[2019/02/07 v1.0] +\RequirePackage{tikz,xcolor,fontspec} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 定義本体 + +%: 色の宣言 +\definecolor{hartsuit}{cmyk}{.14,.94,.22,.27} +\definecolor{diasuit}{cmyk}{.11,.57,.97,.31} +\definecolor{clubsuit}{cmyk}{.70,.5,.99,.18} +\definecolor{spadesuit}{cmyk}{.98,.80,.5,.15} + +\definecolor{cardback}{gray}{.95} +\definecolor{cardborder}{gray}{.2} +\definecolor{cardtext}{gray}{0} + +% \hmtc@strut => 支柱\rule[-0.65em]{0pt}{1.85em} +% \newcommand{\hmtc@strut}{\rule[-0.65em]{0pt}{1.85em}} +\newcommand{\hmtc@strut}{\relax} + +%: 日本語している時対策 +\ifx\ltjdefcharrange\@undefined\relax\else + \ltjdefcharrange{24}{ + "2660-"2667,%各スート + "E000-"E005,%ブランク、(合成用ブランク→不使用)、数字10-13 + "EDDB-"EDE3,%ジョーカーマーク + "2160-"216B,%ローマ数字1-12 + "E5BC-"E5BE,%ローマ数字12-21 + "1F0A0-"1F0FF%Unicodeトランプ + } + \ltjsetparameter{jacharrange={-24}} +\fi + +%: \hmtcfont => フォント変更 +\newcommand{\hmtc@trump@font}{NKD04_Playing_Cards_Index} +\newcommand{\hmtcfont}{\fontspec{\hmtc@trump@font}} + +%%: \trump{ランク}{スート} +\tikzset{hmtcscale/.style={scale=0.9}} % 倍率 +\tikzset{hmtrump/.style={hmtcscale,draw=cardborder,fill=cardback,outer sep=0pt,rounded corners}} + % hmtrump スタイルを定義し直す(\tikzset を使って上書きする)ことで、カードのスタイルを変更可能。 + +\newcommand{\trump}[2]{\hmtc@strut\hmtc@trump@{\hmtc@rank@{#1}}{#2}} + +\newcommand{\hmtc@rank@}[1]{\ifx#1T{\char"E002}\else#1\fi} % 10 + +\newcommand{\hmtc@trump@}[2]{% + \ifx#2H{% + \tikz[baseline=(T.base)] + \node[hmtrump,text=hartsuit] + (T)at(0,0){\hmtcfont{#1\char"2665}};% + }% + \else\ifx#2D{% + \tikz[baseline=(T.base)] + \node[hmtrump,text=diasuit] + (T)at(0,0){\hmtcfont{#1\char"2666}};% + }% + \else\ifx#2C{% + \tikz[baseline=(T.base)] + \node[hmtrump,text=clubsuit] + (T)at(0,0){\hmtcfont{#1\char"2663}};% + }% + \else\ifx#2S{% + \tikz[baseline=(T.base)] + \node[hmtrump,text=spadesuit] + (T)at(0,0){\hmtcfont{#1\char"2660}};% + }% + \else{% + \tikz[baseline=(T.base)] + \node[hmtrump] + (T)at(0,0){\hmtcfont{#1}};% + }% + \fi\fi\fi\fi% +} + +%%: \trumpx{ランク} +\newcommand{\trumpx}[1]{\hmtc@strut\hmtc@trump@{\hmtc@rank@{#1}}{x}} + + +%: \hm[S,H,D,C] => それぞれのスートを出力 +\newcommand{\hmH}{\textcolor{hartsuit}{\hmtcfont\char"2665}} +\newcommand{\hmD}{\textcolor{diasuit}{\hmtcfont\char"2666}} +\newcommand{\hmC}{\textcolor{clubsuit}{\hmtcfont\char"2663}} +\newcommand{\hmS}{\textcolor{spadesuit}{\hmtcfont\char"2660}} + +%: \joker など=> ジョーカー +\newcommand{\BLACKJOKER}{\trumpx{\char"F5BC}} +\newcommand{\WHITEJOKER}{\trumpx{\char"F5BD}} +\newcommand{\REDJOKER}{\trumpx{\char"F5BE}} +\newcommand{\JOKER}{\BLACKJOKER} + +\newcommand{\blackjoker}{\hmtc@joker@base{\char"F5BC}} +\newcommand{\whitejoker}{\hmtc@joker@base{\char"F5BD}} +\newcommand{\redjoker}{\hmtc@joker@base{\char"F5BE}} +\newcommand{\joker}{\blackjoker} + +\newcommand{\hmtc@joker@base}[1]{\hmtc@strut{\hmtcfont% + \tikz[baseline=(T.base)]\node[hmtrump](T)at(0,0){ + \parbox{1em}{ + \fontsize{0.3em}{0}\rule{0pt}{0pt}\hfil\selectfont JOKER\hfil\rule{0pt}{0pt}\\ + \fontsize{2.33em}{0}\selectfont\rule{0pt}{0pt}\hfil#1\hfil\rule{0pt}{0pt}% + } + };% +}} + + +%: \trumpblank => 枠 +\newcommand{\trumpblank}[1]{% + \rule[-0.65em]{0pt}{1.85em}\tikz[baseline=(T.base)]\node[hmtrump](T)at(0,0){#1};% +} + +%: \romanindex => ローマ数字 +\newcounter{hmtc@roman} +\newcommand{\romanindex}[1]{% + \ifnum#1=0\relax% + O% + \else\ifnum#1<13\relax% + \setcounter{hmtc@roman}{"215F}% + \addtocounter{hmtc@roman}{#1}% + {\hmtcfont\char\value{hmtc@roman}}% + \else\ifnum#1>12\relax% + \setcounter{hmtc@roman}{"EDCE}% + \addtocounter{hmtc@roman}{#1}% + {\hmtcfont\char\value{hmtc@roman}}% + \fi\fi\fi% +} + +%: \tarottrump => タロットの切札 +\newcommand{\tarottrump}[1]{\trumpx{\romanindex{#1}}} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index af2f850e19f..e3821fef360 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -346,7 +346,7 @@ my @TLP_working = qw( hepparticles hepthesis hepunits here heuristica hexgame hf-tikz hfbright hfoldsty hhtensor histogr historische-zeitschrift hitec hithesis hletter hlist - hobby hobete hook-pre-commit-pkg horoscop + hmtrump hobby hobete hook-pre-commit-pkg horoscop hpsdiss hrefhide hrlatex hulipsum hustthesis hvfloat hvindex hypdvips hyper hyperbar hypernat hyperref hyperxmp hyph-utf8 hyphen-base hyphenat hyphenex hyplain diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 01c28e6450f..0b3a2e8b843 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1434,6 +1434,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'grotesq' => '&POSTgrotesq', 'grverb' => '&POSTgrverb', 'guide-latex-fr' => '&POST_rmsymlink', + 'hmtrump' => '&POSThmtrump', 'hustthesis' => '&POSThustthesis', 'ibygrk' => '&POSTibygrk', 'isodoc' => '&POSTisodoc', @@ -6150,6 +6151,12 @@ sub POSTgrverb { &SYSTEM ("$MV $mapdir/psfonts.map $mapdir/grverb.map"); } +sub POSThmtrump { + print "POST$package - move .ttf from subdir\n"; + &mv_with_mkdir ("nkd04_playing_cards_index/nkd04_playing_cards_index.ttf", + "$DEST/fonts/truetype/public/$package"); +} + sub POSThustthesis { print "POST$package - move ref-example.bib\n"; &SYSTEM ("$MV $DEST/bibtex/bib/$package/ref-example.bib" diff --git a/Master/tlpkg/tlpsrc/collection-games.tlpsrc b/Master/tlpkg/tlpsrc/collection-games.tlpsrc index fbbe79caea2..a49a6d40316 100644 --- a/Master/tlpkg/tlpsrc/collection-games.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-games.tlpsrc @@ -17,6 +17,7 @@ depend go depend hanoi depend havannah depend hexgame +depend hmtrump depend horoscop depend jigsaw depend labyrinth diff --git a/Master/tlpkg/tlpsrc/hmtrump.tlpsrc b/Master/tlpkg/tlpsrc/hmtrump.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3