ラテックスのカウントを決定するために使用する関数があり、通常はコマンドを使用するのが好きbrief
です。で実行する代わりに、これを入力オプションに変更するにはどうすればよいですか"-inc" "-brief"
。コマンド texcount で実行するために、ミニバッファーに独自のパラメーター セットを入力できます。コマンドをコンマで区切ってから、以下の形式に変換するのが最善の方法です。または、必要に応じて自分ですべてを入力することもでき"-inc" "-brief"
ます。
(defun latex-word-count ()
(interactive)
(let* ((this-file (buffer-file-name))
(word-count
(with-output-to-string
(with-current-buffer standard-output
(call-process "texcount" nil t nil "-inc" "-brief" this-file)))))
(string-match "\n$" word-count)
(message (replace-match "" nil nil word-count))))