I want to create a certain cite command that is pretty similar to the original one:


The problem is that when I only write \mycite{test}. Then there will be

[Test, ]

but it should be


because I omitted the optional argument. I tried it with the package xparse. But there I got the same result with the following code


What do I do wrong? Could you help me?

  • Please be aware that some of the \cite - related packages do redefine \cite to provide more optional arguments already.
    – user31729
    Sep 30, 2015 at 13:41

1 Answer 1


There's no check if the optional argument of \mycite is present or not. So \mycite{#2} will still call \cite[]{#2} with an empty optional argument for \cite, meaning to typeset , in the list.

I added the 'traditional' way to check for the optional argument and the xparse method (much easier!)

Note: Bibliography related packages might change the \cite command already. This is not covered here.












Now with options:

\mycite[Ms. Ann Elk]{Lam94}

\myothercite[Ms. Ann Elk]{Lam94}




enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .