GeneralMultibib and Natbib issue workaround with renewcommand?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
FredFM
Posts: 1
Joined: Mon Sep 21, 2015 2:05 pm

Multibib and Natbib issue workaround with renewcommand?

Post by FredFM »

0
down vote
favorite
I divided my bibliography into 2 parts: Literature and online sources in this manner:

Code: Select all

\usepackage[table,xcdraw]{xcolor}
\usepackage[square, numbers, comma, sort&compress]{natbib} 
% Use the natbib          reference package - read up on this to edit the    reference style; if you want text (e.g. Smith et al., 2012) for the in-text references (instead of numbers), remove 'numbers' 
\usepackage [labeled,resetlabels]{multibib}
\newcites{O}{Online Sources}
...

Code: Select all

\bibliographystyle{plainnat} 
% Use the "unsrtnat" BibTeX style for formatting the Bibliography

\bibliography{Bibliography,Master}
%For online sources
\bibliographystyleO{plainnat}
\bibliographyO{WWW}
This code has a good result for the bibliography part so the items are Showen as O1 author,title year O2 author,title year

but in the text i have still [1] instead of [O1]

I read a lot of posts considering this issue but nothing solved my issue.

So I tried to make a work around \citeO [O][]{refexample} would result in [O 1] whereas O is not a link!

So i tried to renewcommand but i don't know the syntax. i want to do something like this:

Code: Select all

\renewcommand*{\citeO}[1]{"O"+\citeO{#1}}
Is this possible somehow in Latex? Or can you please help me out with that?

I use Overleaf there it results as [1] in the text, compiled with Texstudio v. 10 I get [?]. I use \cite and \citeO for referencing in the text.
How can I fix this?

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Multibib and Natbib issue workaround with renewcommand?

Post by Johannes_B »

This is a crosspost to TeX.SE.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Multibib and Natbib issue workaround with renewcommand?

Post by Stefan Kottwitz »

Hi FredFM,

welcome to the forum!

It's a bit hard to follow the topic without having compilable code at hand, to verify the problem. If you would be able to provide a Infominimal working example, with .bib file(s), it would be much easier to help.

Stefan
LaTeX.org admin
Post Reply