문서의 그림, 표, 인용 횟수 세기

문서의 그림, 표, 인용 횟수 세기

내 생각은 사용하는 것입니다TeXcount 내 문서를 스캔하고 단어, 그림, 표, 방정식 및 인용 수를 출력합니다.

TeXcount에 대한 문서를 살펴본 결과 단어와 방정식이 기본적으로 처리되는 것 같지만 다른 환경에 고유한 카운터를 제공하는 방법을 알 수 없습니다(인용은 다른 문제입니다). 누구든지 나를 도와줄 수 있나요?

답변1

계산하고 싶은 다른 개체가 있는지는 모르겠지만 언급하신 개체에 대해 제가 계산한 방법은 다음과 같습니다.

  • 단어:사용텍스트카운트(아래 예 참조)
  • 수치:기본 LaTeX 카운터 사용figure
  • 테이블:기본 LaTeX 카운터 사용table
  • 방정식:기본 LaTeX 카운터 사용equation
  • 인용:사용마지막 턱받이패키지

를 사용하여 모든 카운터의 현재 값을 표시할 수 있습니다 \arabic{NameOfTheCounter}. 문서 어디에서나 카운터에 할당된 최대값을 표시하려면총계패키지가 도움이 될 것입니다.

다음은 제가 최근에 사용하기 시작한 콜로폰입니다. 귀하의 편의를 위해 제공된 의견

% characters count: the value is printed in the ancillary file char-count.tex
\bash[ignoreStderr=true,stdoutFile=char-count.tex]
echo `texcount -quiet -merge -1 -char cub-ant-sys-lit-sur.tex`|sed -e 's/\([0-9]*\).*/\1/'
\END
% word count: the value is printed in the ancillary file word-count.tex
\bash[ignoreStderr=true,stdoutFile=word-count.tex]
echo `texcount -quiet -merge -1 insert-name-of-file-here.tex`|sed -e 's/\([0-9]*\).*/\1/'
\END
\section{Colophon}
Document data: \thepage{} pages; % display number of pages
\input{word-count} words; % display number of words
\input{char-count}characters; % display number of characters
\arabic{figure} figures; % display number of figures
\LastBib{} references; % display number of references in the bibliography (not the number of citations)
\arabic{footnote} numbered notes; % display number of footnotes
\arabic{glossaryentry} glossary entries. % display number of glossary entries (using package glossaries)

이 예에서는 package 가 필요하지 않았습니다 totcount. 왜냐하면 콜로폰은 문서에 나타나는 마지막 텍스트이기 때문입니다.

관련 정보