summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-28 21:06:54 +0000
committerKarl Berry <karl@freefriends.org>2022-06-28 21:06:54 +0000
commit6f5428186a6ad3f0b941dc73971ae1209315b6cd (patch)
tree10e1c6d7a36b49f0e9595a363ef27fc5082b5432 /Master
parent7c749388669381a6bb3c5da4fd71306613545864 (diff)
hideanswer (28jun22)
git-svn-id: svn://tug.org/texlive/trunk@63746 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/hideanswer/README.md30
-rw-r--r--Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md77
-rw-r--r--Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md79
-rw-r--r--Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex38
-rw-r--r--Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty76
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check4
-rw-r--r--Master/tlpkg/tlpsrc/asternote.tlpsrc0
-rw-r--r--Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/hideanswer.tlpsrc0
10 files changed, 304 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/hideanswer/README.md b/Master/texmf-dist/doc/latex/hideanswer/README.md
new file mode 100644
index 00000000000..4fff4489aef
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hideanswer/README.md
@@ -0,0 +1,30 @@
+# Hideanswer Package
+
+This package can generate documents with and without answers from a single file by toggling a switch. However, it can only be used to create documents to be printed on paper.
+
+
+## System Requirements
+
++ TeX format: LaTeX
++ Prerequisite package: color and graphicx
+
+
+## Installation
+
+Move hideanswer.sty file to $TEXMF/tex/latex/hideanswer.
+
+
+## License
+
+This package released under [the MIT license](https://ctan.org/license/mit).
+
+
+## Revision History
+
++ Version 1.0 2022-06-28
+ + The first public version.
+
+
+---
+
+[Yukoh KUSAKABE](https://twitter.com/metaphysicainfo) (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md b/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md
new file mode 100644
index 00000000000..0f165a079cc
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md
@@ -0,0 +1,77 @@
+# Hideanswer Package 1.0
+
+This package can generate documents with and without answers from a single file by toggling a switch. However, it can only be used to create documents to be printed on paper.
+
+
+## System Requirements
+
++ TeX format: LaTeX
++ Prerequisite package: color and graphicx
+
+
+## Installation
+
+Move hideanswer.sty file to $TEXMF/tex/latex/hideanswer.
+
+
+## Usage
+
+### \sethideanswer
+
+After this command, the answer is hidden. Usually, this instruction is used to switch the generation of question and answer sheets, depending on whether or not this instruction is written at the beginning of the document.
+
+
+### \unsethideanswer
+
+After this command, the answer appears.
+
+
+### \hideanswer{<text>}
+
+<text> is hidden. In \hideanswer*{<text>}, the hidden and visible parts are reversed.
+
+
+### environment hideanswerdiv
+
+The written part inside the environment is hidden. It may be used to hide long answers. In hideanswerdiv*, the hidden and visible parts are reversed.
+
+
+### \smashanswer{<text>}
+
+<text> is hidden and the next sentence is placed as if it were not there. In \smashanswer*{<text>}, the hidden and visible parts are reversed.
+
+
+### environment smashanswerdiv
+
+The written part inside the environment is hidden and the next sentence is placed as if it were not there. It may be used to hide long answers. In smashanswerdiv*, the hidden and visible parts are reversed.
+
+
+### \hidegraphics[<includegraphics option>]{<file>}
+
+The graphic is hidden. The options are the same as for \includegraphics since \includegraphics is loaded internally. In \hidegraphics*[<includegraphics option>]{<file>}, the hidden and visible parts are reversed.
+
+
+### \smashraphics[<includegraphics option>]{<file>}
+
+The graphic is hidden and the next sentence is placed as if it were not there. The options are the same as for \includegraphics since \includegraphics is loaded internally. In \hidegraphics*[<includegraphics option>]{<file>}, the hidden and visible parts are reversed.
+
+
+### \switchanswer{<text when sethide>}{<text when unsethide>}
+
+Switching between hidden and visible sentences. Since \switchanswer does not remember the length of the sentence, the position of the next sentence moves. In \switchanswer*{<text when unsethide>}{<text when sethide>}, the hidden and visible parts are reversed.
+
+
+## License
+
+This package released under [the MIT license](https://ctan.org/license/mit).
+
+
+## Revision History
+
++ Version 1.0 2022-06-28
+ + The first public version.
+
+
+---
+
+Yukoh KUSAKABE (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md b/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md
new file mode 100644
index 00000000000..3de48be8caa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md
@@ -0,0 +1,79 @@
+# Hideanswer パッケージ
+
+このパッケージは,スイッチ切り替えによって単一のファイルから答えが書かれている文書と答えが書かれていない文書を生成することができます。ただし,紙に印刷する文書を作成するときにしか使えません。
+
+
+## 前提条件
+
++ TeX format: LaTeX
++ Prerequisite package: color and graphicx
+
+
+## インストール
+
+hideanswer.sty を $TEXMF/tex/latex/hideanswer (TeXが見つけられる場所)に置いてください。
+
+
+## 使用方法
+
+### \sethideanswer
+
+この命令以降では答えが隠されます。ふつう,文書の最初にこの命令を書くか否かで問題用紙と解答用紙の生成を切り替えるために使います。
+
+
+### \unsethideanswer
+
+この命令以降では答えが現れます。
+
+
+### \hideanswer{<text>}
+
+<text> と書かれた部分が隠されます。\hideanswer*{<text>} では,隠されるときと現れるときが逆になります。
+
+
+### hideanswerdiv 環境
+
+環境の内側に書かれた部分が隠されます。長い答えを隠すために用いるとよいでしょう。
+hideanswerdiv* では,隠されるときと現れるときが逆になります。
+
+
+### \smashanswer{<text>}
+
+<text> と書かれた部分が隠され,それがないかのように次の文が置かれます。\smashanswer*{<text>} では,隠されるときと現れるときが逆になります。
+
+
+### smashanswerdiv 環境
+
+環境の内側に書かれた部分が隠され,それがないかのように次の文が置かれます。長い答えを隠すために用いるとよいでしょう。
+smashanswerdiv* では,隠されるときと現れるときが逆になります。
+
+
+### \hidegraphics[<includegraphics option>]{<file>}
+
+読み込んだ画像が隠されます。\includegraphics を内部で読み込みますので,オプションは \includegraphics のものと同様です。\hidegraphics*[<includegraphics option>]{<file>} では,隠されるときと現れるときが逆になります。
+
+
+### \smashraphics[<includegraphics option>]{<file>}
+
+読み込んだ画像が隠され,それがないかのように次の文が置かれます。\includegraphics を内部で読み込みますので,オプションは \includegraphics のものと同様です。\smashraphics*[<includegraphics option>]{<file>} では,隠されるときと現れるときが逆になります。
+
+
+### \switchanswer{<text when sethide>}{<text when unsethide>}
+
+隠されているときと現れているときで文章を切り替えます。\switchanswer は文章の長さを覚えませんから,次の文の位置が動きます。\switchanswer*{<text when unsethide>}{<text when sethide>} では,隠されるときと現れるときが逆になります。
+
+
+## ライセンス
+
+このパッケージは[MITライセンス](https://ctan.org/license/mit)のもとで配布しています。
+
+
+## 更新履歴
+
++ Version 1.0 2022-06-28
+ + The first public version.
+
+
+---
+
+Yukoh KUSAKABE (screen-name) at [metaphysica.info](https://www.metaphysica.info/) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex b/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex
new file mode 100644
index 00000000000..5e35031c560
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex
@@ -0,0 +1,38 @@
+\documentclass[uplatex]{article}
+\usepackage{hideanswer}
+\begin{document}
+\sethideanswer
+\unsethideanswer
+
+A\hideanswer{B}A
+
+C\hideanswer*{D}C
+
+E%
+\begin{hideanswerdiv}
+$$F$$
+\end{hideanswerdiv}%
+E
+
+G%
+\begin{hideanswerdiv*}
+$$H$$
+\end{hideanswerdiv*}%
+G
+
+I\smashanswer{J}I
+
+K\smashanswer*{L}K
+
+M%
+\begin{smashanswerdiv}
+$$N$$
+\end{smashanswerdiv}%
+M
+
+O%
+\begin{smashanswerdiv*}
+$$P$$
+\end{smashanswerdiv*}%
+O
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty b/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty
new file mode 100644
index 00000000000..25a6264b501
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty
@@ -0,0 +1,76 @@
+%%
+%% hideanswer.sty
+%%
+%% Copyright (C) 2022 Yukoh KUSAKABE (screen-name)
+%% https://www.metaphysica.info/
+%% https://twitter.com/metaphysicainfo
+%%
+%% This package released under
+%% [the MIT license](https://ctan.org/license/mit).
+%%
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hideanswer}[2022/06/28 v1.0]
+%
+%% for \color
+\RequirePackage{color}
+%
+% for \NewDocumentEnvironment
+\RequirePackage{xparse}
+%
+%% \if@hdans@hideswitch
+\newif\if@hdans@hideswitch
+\@hdans@hideswitchfalse
+%
+%% \sethideanswer
+%% \unsethideanswer
+\DeclareRobustCommand{\sethideanswer}{\@hdans@hideswitchtrue}
+\DeclareRobustCommand{\unsethideanswer}{\@hdans@hideswitchfalse}
+%
+%% \hideanswer{<text>}
+%% \hideanswer*{<text>}
+\DeclareRobustCommand{\hideanswer}{\@ifstar{\@hdans@hideanswer@star}{\@hdans@hideanswerh@nostar}}
+\DeclareRobustCommand{\@hdans@hideanswer@star}[1]{\if@hdans@hideswitch\else\color{white}\fi{#1}\if@hdans@hideswitch\else\color{black}\fi}
+\DeclareRobustCommand{\@hdans@hideanswerh@nostar}[1]{\if@hdans@hideswitch\color{white}\else\fi{#1}\if@hdans@hideswitch\color{black}\else\fi}
+%
+%% \begin{hideanswerdiv}
+%% \begin{hideanswerdiv*}
+\newenvironment{hideanswerdiv}%
+{\if@hdans@hideswitch\color{white}\else\fi}%
+{\if@hdans@hideswitch\color{black}\else\fi}
+\newenvironment{hideanswerdiv*}%
+{\if@hdans@hideswitch\else\color{white}\fi}%
+{\if@hdans@hideswitch\else\color{black}\fi}
+%
+%% \smashanswer{<text>}
+%% \smashanswer*{<text>}
+\DeclareRobustCommand{\smashanswer}{\@ifstar{\@hdans@smashanswer@star}{\@hdans@smashanswer@nostar}}
+\DeclareRobustCommand{\@hdans@smashanswer@star}[1]{\if@hdans@hideswitch{#1}\else\fi}
+\DeclareRobustCommand{\@hdans@smashanswer@nostar}[1]{\if@hdans@hideswitch\else{#1}\fi}
+%
+%% \begin{smashanswerdiv}
+%% \begin{smashanswerdiv*}
+\NewDocumentEnvironment{smashanswerdiv}{+b}
+{\if@hdans@hideswitch\else #1\fi}{}
+\NewDocumentEnvironment{smashanswerdiv*}{+b}
+{\if@hdans@hideswitch #1\else\fi}{}
+%
+%% \hidegraphics[<includegraphics>]{<includegraphics>}
+%% \hidegraphics*[<includegraphics>]{<includegraphics>}
+\DeclareRobustCommand{\hidegraphics}{\@ifstar{\@hdans@hidegraphics@star}{\@hdans@hidegraphics@nostar}}
+\DeclareRobustCommand{\@hdans@hidegraphics@star}[2][]{\if@hdans@hideswitch\includegraphics[#1]{#2}\else\phantom{\includegraphics[#1]{#2}}\fi}
+\DeclareRobustCommand{\@hdans@hidegraphics@nostar}[2][]{\if@hdans@hideswitch\phantom{\includegraphics[#1]{#2}}\else\includegraphics[#1]{#2}\fi}
+%
+%% \smashgraphics[<includegraphics>]{<includegraphics>}
+%% \smashgraphics*[<includegraphics>]{<includegraphics>}
+\DeclareRobustCommand{\smashgraphics}{\@ifstar{\@hdans@smashgraphics@star}{\@hdans@smashgraphics@nostar}}
+\DeclareRobustCommand{\@hdans@smashgraphics@star}[2][]{\if@hdans@hideswitch\includegraphics[#1]{#2}\else\fi}
+\DeclareRobustCommand{\@hdans@smashgraphics@nostar}[2][]{\if@hdans@hideswitch\else\includegraphics[#1]{#2}\fi}
+%
+%% \switchanswer{<text when sethide>}{<text when unsethide>}
+%% \switchanswer*{<text when unsethide>}{<text when sethide>}
+\DeclareRobustCommand{\switchanswer}{\@ifstar{\@hdans@switchanswer@star}{\@hdans@switchanswerh@nostar}}
+\DeclareRobustCommand{\@hdans@switchanswer@star}[2]{\if@hdans@hideswitch{#1}\else{#2}\fi}
+\DeclareRobustCommand{\@hdans@switchanswerh@nostar}[2]{\if@hdans@hideswitch{#2}\else{#1}\fi}
+%
+%% EOF \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 764e839de24..b32a3888859 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -56,7 +56,7 @@ my @TLP_working = qw(
arvo arydshln articleingud
asaetr asana-math asapsym ascelike ascii-chart ascii-font asciilist ascmac
askinclude askmaps asmeconf asmejour aspectratio
- assignment association-matrix assoccnt astro asyfig
+ assignment association-matrix assoccnt asternote astro asyfig
asymptote-faq-zh-cn asymptote-by-example-zh-cn asymptote-manual-zh-cn
asypictureb atbegshi atenddvi atendofenv atkinson atveryend
attachfile attachfile2
@@ -391,7 +391,7 @@ my @TLP_working = qw(
hep-math hep-math-font hep-paper hep-text hep-title hepnames
hepparticles hepthesis hepunits here heuristica hexboard hexgame
hf-tikz hfbright hfoldsty
- hhtensor highlightlatex hindawi-latex-template hindmadurai
+ hhtensor hideanswer highlightlatex hindawi-latex-template hindmadurai
histogr historische-zeitschrift hitec hitreport
hitszthesis hitszbeamer hithesis
hletter hlist
diff --git a/Master/tlpkg/tlpsrc/asternote.tlpsrc b/Master/tlpkg/tlpsrc/asternote.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/asternote.tlpsrc
diff --git a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
index 5784e3f7f05..358b9366659 100644
--- a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
@@ -5,6 +5,7 @@ longdesc Support for Japanese; additional packages are in collection-langcjk.
depend collection-langcjk
#
depend ascmac
+depend asternote
depend babel-japanese
depend bxbase
depend bxcjkjatype
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 869b55d007f..6e903872077 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -630,6 +630,7 @@ depend hep-math
depend hep-text
depend hep-title
depend hhtensor
+depend hideanswer
depend highlightlatex
depend histogr
depend hitec
diff --git a/Master/tlpkg/tlpsrc/hideanswer.tlpsrc b/Master/tlpkg/tlpsrc/hideanswer.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/hideanswer.tlpsrc