I want to avoid all reference quoting in my work. That is replace all [num] with null string. Deleting thousands of that manually is painstaking. Could a code be written for it.? NB: i copy pasted the text and [num] came along with it. I want to remove those. Texmaker is the editor I’m using.

Its looks like this


I just copied and pasted here and[2] came along with it. 
I want to remove that. I have created my work and it was in 
the end that it occurred to me there were unintended citations[3].

There’s a lot of \chapters, \sections and \subsections and to manually remove it by reading every para is tedious. So i was wondering if there’d be a code to help me solve this issue.

  • 1
    1) You are really citing yourself thousands times? 2) Can't you just change the bibtex entry corresponding to your work to blank entries? 3) I don't get it, you're citing work actually writing, for example, [4]? 4) If 3) is true, most text editors allow for "find and replace" functionalities. Example, in texstudio (and most of editors), give a shot to CTRL + R
    – G. Gare
    Nov 29, 2018 at 6:34
  • Welcome to the site. This seems not difficult. Can you please add a minimale example of your code.
    – touhami
    Nov 29, 2018 at 6:59
  • Does that mean that the text in your .tex document (not only in the PDF output) already only contains [4] etc. and not \cite{sigfridsson}?
    – moewe
    Nov 29, 2018 at 7:37
  • @moewe yes exactly. Dec 1, 2018 at 2:35

2 Answers 2


With texmaker you can use regular expression search/replace feature. Initiate the replace via CNTL+R or select Edit/Replace from the pull down menu

enter image description here

Click the + button on the right and select Regular Expression.

enter image description here

In the Find dialog box enter \[[0-9]*\] and select Replace All.

enter image description here

This should delete all occurrences of text such as [8], [75], etc.



You can use \def\cite#1{\null} to avoid all cite reference in the text but use \nocite{*}, otherwise your reference list will be empty.

\nocite{*} will show all the reference you have (cited/uncited)

Hopes this helps

  • Thanks. But i copy pasted the text and [num] was with it. I was wondering if there’d be a way remove those. Nov 29, 2018 at 7:15
  • then you can use some regex to remove those. which editor are you using?
    – Samjith
    Nov 29, 2018 at 7:22
  • okay. But the thing is I have zero knowledge about latex and worse I have literally zero seconds before my deadline . So if it’d be fine could you tell me the whole code Nov 29, 2018 at 7:25
  • which editor (fte/notepad/vim/ms word etc..) are you using, i will tell you the regex command to replace
    – Samjith
    Nov 29, 2018 at 7:27
  • texmaker that’s what your asking right? Nov 29, 2018 at 7:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .