How do you force a citation to appear before a comma in LaTeX?

  • LaTeX
  • Thread starter philip041
  • Start date
  • Tags
    Force Latex
In summary, The conversation discusses how to format a citation in a superscript manner with the use of \usepackage[superscript]{cite}. The issue is that the citation currently appears with a superscript after the comma instead of after the name. Suggestions are made to put a space or {} between the citation and comma, but the desired result is achieved by using ({}) as an intervening command.
  • #1
philip041
107
0
I have a sentence reading:

\usepackage[superscript]{cite}

Someone said something super important\cite{someone20}, and it was super interesting.

1) Someone, science journal, 2020.

Except it actually comes out with the ^1 AFTER the comma. I want it to appear superscript to the name not a comma. How?

Cheers
 
Physics news on Phys.org
  • #2
Put a space between \cite{someone20} and the comma after it.
 
  • #3
cristo said:
Put a space between \cite{someone20} and the comma after it.

but when i did this there is now a space netween the citation and the comma. I want it to read

thing^ref,

not

thing^ref ,
 
  • #4
philip041 said:
but when i did this there is now a space netween the citation and the comma. I want it to read

thing^ref,

not

thing^ref ,

It's presumably not designed to work like that (because the comma should be after the word, and not after the superscript citation). Try forcing the comma back with some \! between the \cite and the comma.
 
  • #5
Does putting an intervening {} work? That's the usual method for these sorts of things.
 
  • #6
yes that, ({}) worked, cheers
 

1. How do I force a citation to appear before a comma in LaTeX?

To force a citation to appear before a comma in LaTeX, you can use the "\citep" command instead of the "\cite" command. This will automatically place the citation within parenthesis, making it appear before the comma.

2. Can I manually move a citation in LaTeX?

Yes, you can manually move a citation in LaTeX by using the "\cite" command and adding a negative space before the comma. For example, "\cite{citation}\hspace{-0.1em}, text" will place the citation before the comma.

3. What happens if I don't specify the location of a citation in LaTeX?

If you don't specify the location of a citation in LaTeX, it will appear after the punctuation mark. This is the default behavior of the "\cite" command.

4. How can I make sure my citations are consistent in LaTeX?

To ensure consistency in your citations in LaTeX, you can use the "\cite" command consistently throughout your document. You can also use packages such as "natbib" or "biblatex" to format your citations in a consistent manner.

5. Is there a way to automatically place citations before punctuation in LaTeX?

Yes, you can use the "natbib" or "biblatex" packages in LaTeX to automatically place citations before punctuation. These packages have options to customize the citation style and placement.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • General Discussion
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
13K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Special and General Relativity
Replies
9
Views
1K
  • Biology and Medical
Replies
21
Views
2K
Replies
1
Views
195
Back
Top