Page Layoutunwanted space before citation

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Kiwipor
Posts: 1
Joined: Wed Jan 12, 2011 4:29 pm

unwanted space before citation

Post by Kiwipor »

Hi
I am a new TeX user and currently fighting with a problem regarding citations. I use a very simple citation formal:

Input:
... as discussed by author1 \cite{author1_2009}.
Output:
... as discussed by author1 [1].

Unfortunately I get problems as soon as I want to give references of 2nd order:

Input:
... has never been reported (\cite{author1}, as cited by \cite{author2}).

Output:
... has never been reported ( [1], as cited by [2]).

There is always this SPACE between "(" and "[1]"! Does anyone know how I can get rid of it?

Thanks,

Daniel

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

unwanted space before citation

Post by frabjous »

In order to help solve a problem like this, we need to be able to reproduce it, which I cannot do.

Could you produce a minimal working example which shows this misbehavior?

The code:

Code: Select all

\documentclass{article}
\begin{document}
\ldots\ has never been reported (\cite{author1}, as cited by \cite{author2})
\bibliographystyle{plain}
\bibliography{sample}
\end{document}
produces the following output for me:
cite.png
cite.png (2.43 KiB) Viewed 7906 times
There is no space there.

If yours has a space, there must be something different about your document, and without knowing that is, it is impossible to solve.
ChrisDanger
Posts: 13
Joined: Tue Dec 07, 2010 5:25 pm

unwanted space before citation

Post by ChrisDanger »

Using the cite package does this.

Code: Select all

\documentclass{article}
\usepackage{cite}
\begin{document}
Example of space when cite is used: (\cite{empty} and \cite{empty})
\end{document}
Using the [noadjust] option solves it.

Code: Select all

\documentclass{article}
\usepackage[noadjust]{cite}
\begin{document}
Example of no space when cite's noadjust is used: (\cite{empty} and \cite{empty})
\end{document}
It was in the cite package documentation, under the Customization section.
http://tug.ctan.org/tex-archive/macros/ ... e/cite.pdf
Post Reply