# Cite push command broken

**URL:** <https://discourse.jabref.org/t/cite-push-command-broken/5284>\
**Category:** Help\
**Created:** [October 26, 2024, 6:31pm UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284 "2024-10-26T18:31:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![flo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/flo/32/2077_2.png) [@flo](https://discourse.jabref.org/u/flo)\
**Post date:** [October 26, 2024, 6:31pm UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/1 "2024-10-26T18:31:28Z")

</div>

Hello everyone,

I am using the push command to push my selected source from JabRef to Texstudio.  
I have configured the command to push “\autocite[nach][Seite X]{key1,key2}”.  
This has worked some months ago but today he always push it wrong as: “\cite{\autocite[nach][Seite X]{Schmith2019}}.”  
How to get \cite{ } around my command away?

Thanks!

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [October 28, 2024, 7:42am UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/2 "2024-10-28T07:42:01Z")

</div>

@flo Which version of JabRef are you using and have you checked your settings?  
Did you recently update JabRef?

---

<div class="post-metadata">

**Author:** ![flo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/flo/32/2077_2.png) [@flo](https://discourse.jabref.org/u/flo)\
**Post date:** [October 29, 2024, 11:08pm UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/3 "2024-10-29T23:08:46Z")

</div>

Hi, these are my version information:  
JabRef 5.15–2024-07-10–1eb3493  
Windows 11 10.0 amd64  
Java 21.0.2  
JavaFX 22.0.1+7

I think I have updated it.

The settings are correct: \autocite[nach][Seite X]{key1,key2} The result not.

---

<div class="post-metadata">

**Author:** ![koppor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/koppor/32/5_2.png) [@koppor](https://discourse.jabref.org/u/koppor)\
**Post date:** [October 30, 2024, 7:18pm UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/4 "2024-10-30T19:18:31Z")

</div>

I can confirm that it does not work with 5.15 and TeXstudio 4.8.1 (git 4.8.1).

Which of these two tools did you update? JabRef or TeXstudio?

- I tried with JabRef 5.14 and JabRef 5.15 with TeXstudio 4.8.1. Did not work.
- JabRef 5.14 and TeXsutio 4.8.4 does not work.
- JabRef 5.9 and TeXsutio 4.8.4 does not work.

I tried with the development version.

- Setting \cite{key1,key2}: works both plain (as new \cite) and adding to an existing \cite
- Setting \autocite{key1,key2} works plain
- Setting \autocite[nach][Seite X]{key1,key2} does not work.

---

<div class="post-metadata">

**Author:** ![flo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/flo/32/2077_2.png) [@flo](https://discourse.jabref.org/u/flo)\
**Post date:** [October 30, 2024, 10:54pm UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/5 "2024-10-30T22:54:59Z")

</div>

Great finding that my special way of citing is not working. Thanks! I confirm your observation.  
I have updated for sure TeXstudio but I believe, JabRef, too. I do not believe it is a problem of TeXstudio because this function looks for my like a copy and paste or autotyping function. TeXstudio is not using any intelligence to process this command. But maybe it does. We might see it in the source code of JabRef how JabRef is addressing TeXstudio. Is it visible in the source code?

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [October 31, 2024, 8:23am UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/6 "2024-10-31T08:23:59Z")

</div>

@flo The command is assembled here [jabref/src/main/java/org/jabref/gui/push/PushToTeXstudio.java at 9d9a251b2ccb956e413ed6d9f242c48484db8554 · JabRef/jabref · GitHub](https://github.com/JabRef/jabref/blob/9d9a251b2ccb956e413ed6d9f242c48484db8554/src/main/java/org/jabref/gui/push/PushToTeXstudio.java#L30)

---

<div class="post-metadata">

**Author:** ![koppor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/koppor/32/5_2.png) [@koppor](https://discourse.jabref.org/u/koppor)\
**Post date:** [November 2, 2024, 1:09pm UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/7 "2024-11-02T13:09:23Z")

</div>

@flo What Christoph meant: It would help if you yould open a cmd.exe and execute the `--insert-cite` command manually and check whether it works.

It should be `--insert-cite \autocite[nach][Seite X]{key1,key2}`.

I tried it

```auto
"C:\Program Files\texstudio\texstudio.exe" --insert-cite "\autocite[nach][Seite X]{key1,key2}"

```

Result:

```
\cite{\autocite[nach][Seite X]{key1,key2}}

```

I checked

[https://htmlpreview.github.io/?https://github.com/texstudio-org/texstudio/master/utilities/manual/usermanual\_en.html](https://htmlpreview.github.io/?https://github.com/texstudio-org/texstudio/master/utilities/manual/usermanual_en.html)

```
"C:\Program Files\texstudio\texstudio.exe" --insert-cite "\mycite{key2}"

```

Works

```
"C:\Program Files\texstudio\texstudio.exe" --insert-cite "\mycite[nach]{key2}"

```

Does not.

Thus, please, open an issue at issue tracker of TeXStudio ([Issues · texstudio-org/texstudio · GitHub](https://github.com/texstudio-org/texstudio/issues)).

I searched for “–insert-cite” there - and no relevent issues popped up.

---

<div class="post-metadata">

**Author:** ![flo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/flo/32/2077_2.png) [@flo](https://discourse.jabref.org/u/flo)\
**Post date:** [November 3, 2024, 12:02am UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/8 "2024-11-03T00:02:11Z")

</div>

Hi, ok, CMD is the same situation. Then it might be a problem of TeXstudio?

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [November 3, 2024, 10:24am UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/9 "2024-11-03T10:24:55Z")

</div>

It might be related to the square brackets, they need to be escaped as well at least this would explain it:

```auto
[ \[
] \]

```

[https://www.robvanderwoude.com/escapechars.php](https://www.robvanderwoude.com/escapechars.php)

Can you try this on the command line?  
@koppor

---

<div class="post-metadata">

**Author:** ![koppor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/koppor/32/5_2.png) [@koppor](https://discourse.jabref.org/u/koppor)\
**Post date:** [November 3, 2024, 11:28am UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/10 "2024-11-03T11:28:39Z")

</div>

@Siedlerchr You mean

```
 "C:\Program Files\texstudio\texstudio.exe" --insert-cite "\mycite\[nach\]{key2}"

```

Result:

```
\cite{\mycite\[nach\]{key2}}

```

---

<div class="post-metadata">

**Author:** ![koppor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/koppor/32/5_2.png) [@koppor](https://discourse.jabref.org/u/koppor)\
**Post date:** [November 3, 2024, 11:29am UTC](https://discourse.jabref.org/t/cite-push-command-broken/5284/11 "2024-11-03T11:29:17Z")

</div>

> [@flo](#):
>
> Then it might be a problem of TeXstudio?

Yes. Therefore I wrote

> [@koppor](#):
>
> Thus, please, open an issue at issue tracker of TeXStudio ([Issues · texstudio-org/texstudio · GitHub](https://github.com/texstudio-org/texstudio/issues)).
