私はlatexの数を調べるために使用する関数を持っていて、通常はbrief
というコマンドを使うのが好きです。 "-inc" "-brief"
で実行する代わりに、これを入力オプションに変更する方法を教えてください。ミニバッファに自分のパラメータセットを入力して、texcountコマンドで実行することができました。ほとんどの場合、コマンドがコンマで区切られ、次に、以下の形式に変換された方がよいでしょう。または、私は自分ですべてを入力することができます"-inc" "-brief"
必要な場合。Emacsでtexcountを使ってLatexやtexファイルの単語数を調べる(オプションのパラメータが必要な場合)
(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))))