[過去ログ]
\chapter{\TeX} % 第八章 (983レス)
\chapter{\TeX} % 第八章 http://peace.5ch.net/test/read.cgi/unix/1323615979/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
240: 名無しさん@お腹いっぱい。 [sage] 2012/02/24(金) 21:59:10.97 面白そうだから作ってみたよ。 でもマルチポストなので肝心なところは秘密です。 あー、みんなにお披露目したかったのに、残念。 クラスオプションに draft を指定したときだけカウントして、 単語ごとに小さく通し番号を印字するようにしてみた。 %\documentclass{article} \documentclass[draft]{article} \newenvironment{countwords}{ #### ここは秘密 #### }{\par There are \thewords\ words. } \def\shownumbers{% \stepcounter{words}% \vbox to 0pt {\kern1pt \hbox to 0pt{\hss\tiny\thewords} \vss}} \newcounter{words} \begin{document} \begin{countwords} The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog, The quick brown fox jumps over the lazy dog. \end{countwords} % 結果は There are 27 words. と出た。 \end{document} http://peace.5ch.net/test/read.cgi/unix/1323615979/240
241: 240 [sage] 2012/02/24(金) 22:02:36.23 マルチなのは別のやつだった。 orz めんご http://peace.5ch.net/test/read.cgi/unix/1323615979/241
243: 240 [sage] 2012/02/24(金) 23:03:27.59 \documentclass[draft]{article} \def\fixcatcode#1{#1} \begingroup \catcode`\ =13 \expandafter\endgroup \fixcatcode{% \newenvironment{countwords}{ \endlinechar=32 \catcode`\ =13 \let \countspace }}{% \par There are \thewords\ words. } \makeatletter \@expandtwoargs\in@{,draft,}{,\@classoptionslist,} \ifin@ \def\countspace{\shownumbers\ } \else \def\countspace{\ } \fi \makeatother \def\shownumbers{% 以下略 http://peace.5ch.net/test/read.cgi/unix/1323615979/243
244: 名無しさん@お腹いっぱい。 [sage] 2012/02/24(金) 23:06:39.86 >>240 まぁ、秘密のところは、そんなに難しくないんだけど、 「単語」の定義はどうします? * $y = x$ といった数式は 1 word と数える? * \TeX や \LaTeX などの control sequence はどうする? \def\hogehoge{hoge hoge} だったら、2 words だけど…。 http://peace.5ch.net/test/read.cgi/unix/1323615979/244
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.035s