Tuesday, June 22, 2010

How to Activate \subsubsubsection in LaTeX

The equivalent to \subsubsubsection is \paragraph. To have that numbered simply use:
\setcounter{secnumdepth}{5}
then:
\section{} % level 1
\subsection{} % level 2
\subsubsection{} % level 3
\paragraph{} % level 4 - equivalent to subsubsubsection
\subparagraph{} % level 5
Voila!

Cite as:
Saad, T. "How to Activate \subsubsubsection in LaTeX". Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2010/06/how-to-activate-subsubsubsection-in.html

Thursday, June 17, 2010

Deleting duplicate BibTeX entries from Mendeley

I've recently moved to using Mendeley as my main reference management tool. It has some pretty neat features except for a few that keep bugging me. One of those is that Mendeley seems to maintain record of deleted entries in its database and those end up in its BibTeX export. Worst of all is that I am always getting duplicate entries in the BibTeX file.

Today I found a neat solution based on the post by Simon Greenhill. Here's how it works for the citation key:
  1. Locate your Mendeley SQLite Library (~/Library/Application Support/Mendeley Desktop/youremail@www.mendeley.com.sqlite)
  2. from your terminal type:
    sqlite3 your-email-address\@www.mendeley.com.sqlite
  3. Type:
    SELECT COUNT(*) as entries, citationkey FROM Documents GROUP BY citationkey HAVING entries > 1;
    This basically queries the table "Documents" for all duplicate citation keys.
  4. Then,
    DELETE FROM Documents WHERE id NOT IN (SELECT MAX(id) FROM Documents GROUP BY citationkey);
Voila!

Cite as:
Saad, T. "Deleting duplicate BibTeX entries from Mendeley". Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2010/06/deleting-duplicate-bibtex-entries-from.html