Menu

multibib issue

TXS - Help
preben
2013-01-16
2013-01-17
  • preben

    preben - 2013-01-16

    I am going to use multibib package to create two references (my publication and general references).
    I used
    \usepackage{multibib}
    \newcites{pub}{List of Publications}

    \nocitepub{*}
    \bibliographystylepub{unsrt}
    \bibliographypub{MyPub.bib}

    \bibliographystyle{unsrt}
    \bibliography{Refs}

    when I cited the paper in MyPub.bib, I used \citepub{xxx}
    but Texstudio show me a warning" Citation XXX on page x undifined".

    how can I solve this problem?

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-01-16

    This is currently not possible. The semantics of commands with multiple arguments like \newcites{pub}{List of Publications} cannot be described in the present parser. Therefore TSX cannot identify List of Publications as a bibliography ressouce.

    Sorry, I had mistaken the second arguement for the bib file. Benito below is right.

     

    Last edit: Tim Hoffmann 2013-01-16
  • Benito van der Zander

    I do not think that matters much. It could ignore the 2nd argument and
    just create a \citepub and \bibliographypub command, when it sees
    \newcites{pub}

    It should work with these commands, if you add

    \bibliographypub#b
    \citepub#c

    to a loaded cwl file.

     
  • preben

    preben - 2013-01-17

    you mean I need create my own cwl file? if so, where should I put it? I saw some cwl in texstudio/configure/completion. I searched in my computer and didnt find any cwl file.

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-01-17

    you mean I need create my own cwl file?

    yes.

    if so, where should I put it?

    in the config directory next to texstudio.ini (https://sourceforge.net/apps/mediawiki/texstudio/index.php?title=Frequently_Asked_Questions)

    I saw some cwl in texstudio/configure/completion. I searched in my computer and didnt find any cwl file.

    That is because there are directly built into the executable.

     
  • preben

    preben - 2013-01-17

    I found it. all cwl files are there.
    it doesnt work even though I created cwl file and put the \bibliographypub#b
    \citepub#c in it, and i chose my own cwl in Texstudio/configure/completion, then click F11 to compile bib. it still finds only one bib file (in my case is Refs.bib)

    do i need to add more commands in cwl file?

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-01-17

    Try the following commands in your cwl:

    \bibliographypub{%<file%>}#b
    \bibliographystylepub{%<style%>}
    \citepub{%<bibid%>}#c
    

    That worked for me. Note however, that TXS does not have a concept of multiple distinct bibliographies. This means that all entries from \bibliography and \bibliographypub are managed in one database and the checker will accept all ids for both \cite and \citepub.

     
  • preben

    preben - 2013-01-17

    Thanks a lots.

    I found a solution from a website. create a bat file as following
    @ECHO off
    IF (%1)==() GOTO end

    FOR %%f in (%1\*.aux) DO bibtex %%f

    @ECHO on
    :end

    put the bat file to C:\Program Files\MiKTeX 2.9\miktex\bin
    go to Texstudio config, command,bibtex, select the bat file. Ok
    click F11 to compile all bib files.

     

    Last edit: Tim Hoffmann 2013-01-17

Log in to post a comment.