On Tue, Jun 18, 2013 at 8:20 AM, Bruce Pourciau <
[email protected]> wrote:

>
> On Jun 17, 2013, at 5:21 PM, stefano franchi wrote:
>
>
>
>
> On Mon, Jun 17, 2013 at 1:46 PM, Steve Litt <[email protected]>wrote:
>
>> On Mon, 17 Jun 2013 12:07:57 -0400
>> Maria Gouskova <[email protected]> wrote:
>>
>> > On Mon, Jun 17, 2013 at 11:27 AM, Csikos Bela
>> > <[email protected]>wrote:
>> >
>> > > stefano franchi <[email protected]> írta:
>> > > >On Fri, Jun 14, 2013 at 2:08 PM, Alex Vergara Gil [email protected]>
>> > > wrote:
>> > >
>> > > >>>Hello:
>> > > >>>Occasionally it is necessary to count the total word or character
>> > > number in
>> > > >>>a document.
>> > > >>>Lyx has Tools->Statistics option for the document, but how can I
>> > > >>>make statistics that includes the text in the Bibliography which
>> > > >>>is not
>> > > edited in
>> > > >>l>yx?
>> > >
>> > > >>If is not edited in LyX there is no way LyX can count the words,
>> > > >>so I use Okular to do this kind of things once the document is
>> > > >>ready.
>> > >
>> > > >Alex,I never knew Okular could do document statistics. Is it a
>> > > >plugin/ extension/whatever? My version of okular does not seem to
>> > > >have any facility of the kind. I use pdftotxt | wc -w when I need
>> > > >to obtain final figures. I&#39;d be glad to skip a step or two and
>> > > >use okular directly.
>> > >
>> > > Thanks.
>> > >
>> > > bcsikos
>> > >
>> > >
>> > >
>> > Any decent text editor will count up words for you, as will Open
>> > Office/Libre Office. I usually use TextWrangler.app (Mac OS,
>> > freeware). Take your PDF, copy and paste the contents into a text
>> > file, and you'll have an estimate. All estimates of word counts are
>> > imprecise because of variable definitions of what a  "word" is.
>> >
>> > Maria
>>
>> Hi Maria,
>>
>> The one caveat with editor word counting, or for that matter piping the
>> file into wc, is that you need to find a way to not count markup like
>> \begin{standard}.
>>
>
>
> You can use the detex utility for that:
>
> $ man detex
> NAME
>        detex - a filter to strip TeX commands from a .tex file.
>
> That will not help you with the bibliography, however, if (as it sometimes
> happens) you need to include references in the word count.
>
>
> Cheers,
>
> Stefano
>
>
> Couldn't one replace the inserted bibtex bibliography with the .bbl file
> that it generates and then do the word count?
>

I suppose one could---never tried though. I don't know if detex is smart
enough to handle references. I must say, though, that Maria's solution
starts to be more appealing if you have to go through: export to latex/run
latex and bibtex / open latex and bbl file in editor / append  latter to
former / detex and word count. If and when the "append bbl option" will be
automated (see other threads), if could be relatively painless to implement
a small utility that would count words in the final tex output.

Cheers,

Stefano


-- 
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas A&M University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

[email protected]
http://stefano.cleinias.org

Reply via email to