Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there any way for me to easily and reversibly remove in-text citations from LaTeX output? I need to provide an accurate character count for my senior thesis that excludes citations (and figures and figure captions, but there are few enough of those that I'm willing to remove them by hand).

Right now I'm just exporting to plain text and running the result through sed, but this is not as nice as just being able to set a flag in the preamble or somesuch.

If it makes it any simpler (or harder!), I'm using LyX.

share|improve this question
Do you still need to include the bibliography? You could just add \renewcommand{\cite}[1]{\unskip} in your document preamble. –  Werner Mar 2 '13 at 22:47
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. –  Peter Jansson Mar 2 '13 at 23:08
In LyX, does Tools > Statistics do what you want? I don't think it counts references or citations. –  scottkosty Mar 3 '13 at 5:58
@scottkosty, you are entirely correct. I don't know why I hadn't thought of that myself! If you'd like to post that as an answer, I'll accept it. –  Bacon Mar 3 '13 at 19:38
add comment

1 Answer

up vote 0 down vote accepted

Use Tools > Statistics.

You can make a shortcut for this by going to Tools > Preferences > Editing > Shortcuts (the command name is just statistics).

I don't know if this function is well tested (I don't think it's used often). Please report any inconsistencies here or at www.lyx.org/trac.

Also not that when LyX 2.1 is released, you will be able to run

buffer-forall statistics

To get statistics (by document still) of all open documents.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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