LaTeXing - Professional Typesetting

An extension for Sublime Text which makes your life
easier and more comfortable while creating your documents.

Easy changing of citation comman (e.g. citep to citeyearpar)

Collection of new Ideas and Feature Requests

Easy changing of citation comman (e.g. citep to citeyearpar)

Postby greg » Wed Nov 13, 2013 3:50 pm

Hi,

I often want to change the citation command. For example, I initially use \citep[21]{name2013} and then want to change to \citeyearpar[21]{name2013} (from (name 2013) to (2013)). It would be great if latexing supports these changes. For example, whenever I select citep or citeyearpar latexing shows an autocomplete popup with the options (see attachment). Selecting one of these options replaces the citation command. This should happen whenever I select the name off the citation command without \ because that happens when I double click it. An alternative would be to put the options in the right-click menu.

Thanks for the great package!
Attachments
Screen Shot 2013-11-13 at 4.03.41 PM.png
Screen Shot 2013-11-13 at 4.03.41 PM.png (16.2 KiB) Viewed 11954 times
greg
 
Posts: 14
Joined: Wed Nov 13, 2013 2:59 pm

Re: Easy changing of citation comman (e.g. citep to citeyear

Postby Chris » Thu Nov 14, 2013 9:03 am

I am not sure that this has a high demanding to be honest. Normally you prefer to use the same style for you whole document or not? To adjust this very easily I am always doing this in my preambles:

Code: Select all
\let\cite\parencite


.. so you can also ways use the simple cite command and LaTeX will transform this to parentcite in this example.
Chris
Site Admin
 
Posts: 75
Joined: Fri Nov 08, 2013 12:40 pm

Re: Easy changing of citation comman (e.g. citep to citeyear

Postby greg » Thu Nov 14, 2013 8:17 pm

I always use different 'styles' in the same file. Note that I am referring to things like (Name 1994: 34) or (Name 1994, p.34). Here is an example:
\citep{name2013} -> (Name 2013)
Name and his collaborators \citeyearpar[21]{name2013} -> Name and his collaborators (2013)
(e.g. \citealp{name2013}; or for a review \citealp{other2010}) -> (e.g. Name 2013; or for a review Other 2010)

The third example is not possible with citep. For the second example, there is different command: \citet{name2013} but that would lead to "Name et al (2013)" without the possibility to change the Name et al (or only globally).

So I think there are many reasons to use different commands. Not for journals that are based on numeric citations but certainly for social science journals.
greg
 
Posts: 14
Joined: Wed Nov 13, 2013 2:59 pm

Re: Easy changing of citation comman (e.g. citep to citeyear

Postby Chris » Tue Nov 19, 2013 2:14 pm

Ok then I think the right click menu is the best position for it. Could you post a list of all the required (available) options?
Chris
Site Admin
 
Posts: 75
Joined: Fri Nov 08, 2013 12:40 pm

Re: Easy changing of citation comman (e.g. citep to citeyear

Postby greg » Thu Nov 21, 2013 8:36 am

Great! Here is a table with all the different citation commands (the table is also below): http://en.wikibooks.org/wiki/LaTeX/Bibl ... ent#Natbib

These are the natbib citation commands. So I guess it only makes sense when the user is using natbib. Any of the commands below might be in the text and the idea is the user can easily switch between them when he/she selects the name of the command (e.g. 'citet' from the '\citet{goossens93}' command).




\citet{goossens93} Goossens et al. (1993)
\citep{goossens93} (Goossens et al., 1993)
\citet*{goossens93} Goossens, Mittlebach, and Samarin (1993)
\citep*{goossens93} (Goossens, Mittlebach, and Samarin, 1993)
\citeauthor{goossens93} Goossens et al.
\citeauthor*{goossens93} Goossens, Mittlebach, and Samarin
\citeyear{goossens93} 1993
\citeyearpar{goossens93} (1993)
\citealt{goossens93} Goossens et al. 1993
\citealp{goossens93} Goossens et al., 1993
\citetext{priv.\ comm.} (priv. comm.)
greg
 
Posts: 14
Joined: Wed Nov 13, 2013 2:59 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron