LyXDefault Format for Citation Style

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
PetteriTei
Posts: 1
Joined: Tue Jan 31, 2012 1:42 am

Default Format for Citation Style

Post by PetteriTei »

Dear all,

I am slightly a beginner for LaTeX and LyX and wrote my thesis with LyX using the style template "classicthesis" provided by André Miede (http://www.miede.de/index.php?page=classicthesis)

I wanted to tune the way to cite from text but couldn't find a way from documentation how to do the following for all citations (need to add for preamble probably?)

I cited all my references by the "Cite in LyX" of LyZ-plugin for Zotero (used with Firefox) so the default format for all my citations was the: (citet)

\citet{roenneberg2008modelling} , i.e. Roenneberg et al. (2008)

and I figured out the way to manually change it to the format that I wanted without the brackets around the year and with a comma: (citealp)

\citealp{roenneberg2008modelling}, i.e. Roenneberg et al., 2008

But as I have so many citations that changing them manually one-by-one would be pure insanity, I was wondering if there is way to apply to changes to all the files?

So the classicthesis uses natbib:

Code: Select all

\PassOptionsToPackage{square,comma}{natbib}
\RequirePackage{natbib}
But I couldn't find from there for example a way to add some parameters specifying the formatting of citation style.
http://en.wikibooks.org/wiki/LaTeX/More_Bibliographies


Best wishes,
Petteri

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

NoIdeaNickanme
Posts: 13
Joined: Wed Nov 09, 2011 5:41 pm

Default Format for Citation Style

Post by NoIdeaNickanme »

Why do it manually and one by one?
You can use the ''replace all'' option in your editor and substitute all

Code: Select all

\citet{
with

Code: Select all

\citealp{
with a single click (see attached image).
Attachments
replaceall.PNG
replaceall.PNG (14.61 KiB) Viewed 6150 times
shailesh
Posts: 1
Joined: Thu Dec 18, 2014 1:48 pm

Re: Default Format for Citation Style

Post by shailesh »

Hi,

I have been searching on the net about setting a default citation style in Lyx and found that most of the solutions were either:

(1) Open in a text editor and do replace of the citation tags (as above)
or
(2) Set for one citation, and that style would be remembered by Lyx for the rest of the document.

I am not too much in favor of (1) above as I am still in the process of making my document and each compile would reset citation changes (I believe). I am fine with method (2), but it does not seem to work for me. Lyx just does not 'remember' my last set citation style.

What could be the issue here? I am using LyX Version 2.1.1 with natbib (author-year) for my citation style. Thanks for any help.
Post Reply