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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- 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