BibTeX, biblatex and biber ⇒ Getting citations in ( ) instead of [ ]! Help?
Getting citations in ( ) instead of [ ]! Help?
I'm using a new thesis template which I came across on the Internet. Everything is great, however I'm getting my citations numbers in my text between normal brackets ( ) rather than square brackets regardless of the style used. It is working well (numbering appears between square brackets) in the bibliography list at the end but I can't get my head around fixing it within the text.
Example
Currently: As we see from (1), the method is...
Desired: As we see from [1], the method is...
Any help?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Getting citations in ( ) instead of [ ]! Help?
welcome to the board!
If you are using natbib you could set the square option:
Code: Select all
\usepackage[square]{natbib}
Getting citations in ( ) instead of [ ]! Help?
without natbib you will have to add something like the following to the preamble of your document:
Code: Select all
\usepackage{ifthen}
\makeatletter
\renewcommand\@cite[2]{%
[{#1\ifthenelse{\boolean{@tempswa}}{,\nolinebreak[3] #2}{}}]}
\makeatother
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Getting citations in ( ) instead of [ ]! Help?
It is extremely helpful if you give a link where to find this template.moatox wrote:[...] I'm using a new thesis template which I came across on the Internet. [...]
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Getting citations in ( ) instead of [ ]! Help?
I reckon am not using natbib.. or at least am not specifying this! .. Tried both solutions but didn't work.
Gmedina's change nothing while Stephan's give a LaTeX error: Option clash for package natlib.
You can tell I don't know what am doing

btw, I snatched the template from here
http://www-h.eng.cam.ac.uk/help/tpl/tex ... esisStyle/
Advice?
Many thanks
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Getting citations in ( ) instead of [ ]! Help?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Getting citations in ( ) instead of [ ]! Help?
And Stephan's tip was correct, but as the package was defined in the class file, defining it again in the main file created a clash.
Cheers
M