1

using texcount in the command line interface produces the error 'could not recognise package list'. I'm using

texcount -1 -sum -inc mymainfile.tex

which includes several files in a two different subdirectories with the command \include{mysubdirectory/myfile}. This all compiles with no errors in LaTeX.

Edit: It seems that hyperref and geometry with \usepackage are causing the errors.

Edit: Deleted "The only related information I've found online is that texcount used to have a problem with packages with hyphens in their names (probably fixed since 2013), but I can't see a way around this to check."

7
  • 1
    The error should be produced by \usepackage or a similar macro which TeXcount fails to parse. If you add the option -v for verbose output, it should be more clear which macro produces the error. – Einar Rødland Jul 27 '15 at 21:42
  • @EinarRødland Thanks, but it just gives the same message, twice "ERROR: Could not recognise package list", ignoring it instead" whether I use -v -v1 -v2 etc – Laua Jul 29 '15 at 12:51
  • By looking at the verbose output, you should be able to identify which macro call (\usepackage or \RequirePackage) causes the error. Without knowing that, it's hard to tell exactly what the cause is and what can be done to either fix or bypass it. – Einar Rødland Jul 29 '15 at 16:12
  • @EinarRødland I understood that, but I hadn't understood not to use the other options with it, sorry. Now I can see that usepackage with geometry and hyperref are the packages causing the errors! Any ideas as to why? – Laua Jul 29 '15 at 17:37
  • 1
    I suggest that you write down your own answer in case others come across the same problem. In some cases, running TeXcount with the -relaxed option may help, but TeXcount may be restrictive in allowing options covering multiple lines. – Einar Rødland Jul 29 '15 at 22:46
6

Apparently TeXcount had a problem with the options for these packages being on different lines in the .tex file. The problem was this:

\usepackage[pdftex,
plainpages=false,
pdfpagelabels,
urlcolor=black]{hyperref}

and the solution was this:

\usepackage[pdftex,plainpages=false,pdfpagelabels,urlcolor=black]{hyperref}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.