texlive[63746] Master: hideanswer (28jun22)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 28 23:06:54 CEST 2022


Revision: 63746
          http://tug.org/svn/texlive?view=revision&revision=63746
Author:   karl
Date:     2022-06-28 23:06:54 +0200 (Tue, 28 Jun 2022)
Log Message:
-----------
hideanswer (28jun22)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/hideanswer/
    trunk/Master/texmf-dist/doc/latex/hideanswer/README.md
    trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md
    trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md
    trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex
    trunk/Master/texmf-dist/tex/latex/hideanswer/
    trunk/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty
    trunk/Master/tlpkg/tlpsrc/asternote.tlpsrc
    trunk/Master/tlpkg/tlpsrc/hideanswer.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/hideanswer/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hideanswer/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hideanswer/README.md	2022-06-28 21:06:54 UTC (rev 63746)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/hideanswer/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md	2022-06-28 21:06:54 UTC (rev 63746)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-en.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md	2022-06-28 21:06:54 UTC (rev 63746)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer-ja.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex	2022-06-28 21:06:54 UTC (rev 63746)
@@ -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


Property changes on: trunk/Master/texmf-dist/doc/latex/hideanswer/hideanswer_example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty	2022-06-28 21:06:54 UTC (rev 63746)
@@ -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 at hdans@hideswitch
+\newif\if at hdans@hideswitch
+\@hdans at hideswitchfalse
+%
+%% \sethideanswer
+%% \unsethideanswer
+\DeclareRobustCommand{\sethideanswer}{\@hdans at hideswitchtrue}
+\DeclareRobustCommand{\unsethideanswer}{\@hdans at hideswitchfalse}
+%
+%% \hideanswer{<text>}
+%% \hideanswer*{<text>}
+\DeclareRobustCommand{\hideanswer}{\@ifstar{\@hdans at hideanswer@star}{\@hdans at hideanswerh@nostar}}
+\DeclareRobustCommand{\@hdans at hideanswer@star}[1]{\if at hdans@hideswitch\else\color{white}\fi{#1}\if at hdans@hideswitch\else\color{black}\fi}
+\DeclareRobustCommand{\@hdans at hideanswerh@nostar}[1]{\if at hdans@hideswitch\color{white}\else\fi{#1}\if at hdans@hideswitch\color{black}\else\fi}
+%
+%% \begin{hideanswerdiv}
+%% \begin{hideanswerdiv*}
+\newenvironment{hideanswerdiv}%
+{\if at hdans@hideswitch\color{white}\else\fi}%
+{\if at hdans@hideswitch\color{black}\else\fi}
+\newenvironment{hideanswerdiv*}%
+{\if at hdans@hideswitch\else\color{white}\fi}%
+{\if at hdans@hideswitch\else\color{black}\fi}
+%
+%% \smashanswer{<text>}
+%% \smashanswer*{<text>}
+\DeclareRobustCommand{\smashanswer}{\@ifstar{\@hdans at smashanswer@star}{\@hdans at smashanswer@nostar}}
+\DeclareRobustCommand{\@hdans at smashanswer@star}[1]{\if at hdans@hideswitch{#1}\else\fi}
+\DeclareRobustCommand{\@hdans at smashanswer@nostar}[1]{\if at hdans@hideswitch\else{#1}\fi}
+%
+%% \begin{smashanswerdiv}
+%% \begin{smashanswerdiv*}
+\NewDocumentEnvironment{smashanswerdiv}{+b}
+{\if at hdans@hideswitch\else #1\fi}{}
+\NewDocumentEnvironment{smashanswerdiv*}{+b}
+{\if at hdans@hideswitch #1\else\fi}{}
+%
+%% \hidegraphics[<includegraphics>]{<includegraphics>}
+%% \hidegraphics*[<includegraphics>]{<includegraphics>}
+\DeclareRobustCommand{\hidegraphics}{\@ifstar{\@hdans at hidegraphics@star}{\@hdans at hidegraphics@nostar}}
+\DeclareRobustCommand{\@hdans at hidegraphics@star}[2][]{\if at hdans@hideswitch\includegraphics[#1]{#2}\else\phantom{\includegraphics[#1]{#2}}\fi}
+\DeclareRobustCommand{\@hdans at hidegraphics@nostar}[2][]{\if at hdans@hideswitch\phantom{\includegraphics[#1]{#2}}\else\includegraphics[#1]{#2}\fi}
+%
+%% \smashgraphics[<includegraphics>]{<includegraphics>}
+%% \smashgraphics*[<includegraphics>]{<includegraphics>}
+\DeclareRobustCommand{\smashgraphics}{\@ifstar{\@hdans at smashgraphics@star}{\@hdans at smashgraphics@nostar}}
+\DeclareRobustCommand{\@hdans at smashgraphics@star}[2][]{\if at hdans@hideswitch\includegraphics[#1]{#2}\else\fi}
+\DeclareRobustCommand{\@hdans at smashgraphics@nostar}[2][]{\if at 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 at switchanswer@star}{\@hdans at switchanswerh@nostar}}
+\DeclareRobustCommand{\@hdans at switchanswer@star}[2]{\if at hdans@hideswitch{#1}\else{#2}\fi}
+\DeclareRobustCommand{\@hdans at switchanswerh@nostar}[2]{\if at hdans@hideswitch{#2}\else{#1}\fi}
+%
+%% EOF
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/hideanswer/hideanswer.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-06-28 21:05:49 UTC (rev 63745)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-06-28 21:06:54 UTC (rev 63746)
@@ -56,7 +56,7 @@
     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 @@
     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

Added: trunk/Master/tlpkg/tlpsrc/asternote.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2022-06-28 21:05:49 UTC (rev 63745)
+++ trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2022-06-28 21:06:54 UTC (rev 63746)
@@ -5,6 +5,7 @@
 depend collection-langcjk
 #
 depend ascmac
+depend asternote
 depend babel-japanese
 depend bxbase
 depend bxcjkjatype

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2022-06-28 21:05:49 UTC (rev 63745)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2022-06-28 21:06:54 UTC (rev 63746)
@@ -630,6 +630,7 @@
 depend hep-text
 depend hep-title
 depend hhtensor
+depend hideanswer
 depend highlightlatex
 depend histogr
 depend hitec

Added: trunk/Master/tlpkg/tlpsrc/hideanswer.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.