Created
December 26, 2008 15:37
-
-
Save sekido/40081 to your computer and use it in GitHub Desktop.
wget -O - "http://gist.github.com/raw/40081/64677f45125010b402fcb00528f8a072ed41fed4" | nkf -e > atode.sty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% あとでやるマクロ v1.00 | |
% Copyright (c) 2008 Ryosuke SEKIDO <ryosuke@sekido.info> | |
% License: The MIT License | |
% | |
% atode.sty で保存し、プリアンブルへ以下を記述します。 | |
% | |
% \usepackage{atode} | |
% | |
% これで \atode{} マクロを利用可能です。一言がなくても {} を省略できません。 | |
% | |
% \atode{} | |
% \atode{あとでやる一言を書く} | |
% | |
% \atode{} マクロが一カ所でも呼び出されていると、LaTeX 文書の末尾に以下のような | |
% 総計を出してくれます。 | |
% | |
% あとでやる : 5 個 | |
% | |
\makeatletter | |
\newcounter{num@atode} | |
\setcounter{num@atode}{0} | |
\newcommand{\atode}[1]{% | |
\addtocounter{num@atode}{1}% | |
(あとでやる[\arabic{num@atode}]\ifx @#1@\else : #1\fi)} | |
\AtEndDocument{% | |
\ifnum\value{num@atode}>0% | |
あとでやる : \arabic{num@atode}個% | |
\fi} | |
\makeatother |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment