How do I cite the title of an article in LaTeX? - latex

I'm using LaTeX and BibTeX for an article, and I want to able to cite the title of an article I reference. What is the command to do this?
I'm using \bibliographystyle{chicago} and it does not appear to be \citeT{}, \citetitle{} or \citeTitle{}

#Norman, and the various commenters, are correct in that it would be difficult to do this with bibtex and other tools. But, there is an alternative. Biblatex does allow this through the command \citetitle. Also, if you really want to, the formatting drivers in biblatex are easily readable and modifiable, but only if you feel the need. Unfortunately, it is not part of any distribution, yet, so it has to be downloaded and installed.

Just type in the title. Even natbib, the most powerful widespread BibTeX package, is not powerful enough to do what you want out of the box. Trying to get BibTeX to extract the title for you, by means of a LateX command, is possible, but it would require that you
Design a new format for bibliography items that is incompatible with existing formats.
Write your own custom .bst file, using the very strange postfix language that is used only by BibTeX, to be compatible with your new format.
Write a new LaTeX command to pull the title information out of the new format.
Speaking as someone who has written several custom bst files as well as a replacement for BibTeX, it's just not worth fooling with. After all, if you are citing the paper, you probably know the title anyway.
EDIT: If you have to do this with multiple papers, I would try to cheat. Extend the bst file so that it writes into the bbl file a command that writes into the aux file the title associated with each bibkey. You can model the bbl command on \label and the actual title-citing command on \ref.

This is how I solve the title issue for cited papers:
In the preamble
include Natbib:
\usepackage[sort&compress]{natbib}
If you want to cite a TITLE instead of an author in the text you define the title like this in the preamble:
\defcitealias{Weiser1996designingcalm}{Designing Calm Technology}
Note:
You need to have a bibtex item (for the title ''Designing Calm Technology'') with the key {Weiser1996designingcalm}.
In the paper where you want to write the cited paper's title
\citetalias{Weiser1996designingcalm}
this results in => Designing Calm Technology (i.e. the text you specified with the \defcitealias command above)
or
\citepalias{Weiser1996designingcalm}
that results in => (Designing Calm Technology) (i.e. title with parenthesis)

This question is old and maybe \citefield was not around back in the days, but now it works like charm for this kind of problems:
\documentclass[varwidth]{standalone}
\usepackage{biblatex}
\begin{filecontents}{\jobname.bib}
#article{example,
title = {NAME OF PAPER},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\citefield{example}{title}
\end{document}
Got it from this question.

Thanks to Anders for the hint. \defcitealias seems to be the way to go.
Bibtex produces a .bbl file which contains the bibliography entries. something like that
\bibitem[\protect\citeauthoryear{Andrienko
{\itshape{et~al.}}}{2003}]{Andrienko2003}
Andrienko, G., Andrienko, N., and Voss, H., 2003. {GIS for Everyone: The
CommonGIS Project and Beyond}. {\itshape {In}}: {\itshape {Maps and the
Internet}}., 131--146 Elsevier.
I use Eclipse, which is free and that you may already have to apply regular expressions in this file when needed. '\R' acts as platform independent line delimiter. Here is an example of multi-line search:
search:
\\bibitem.*(\R.*)?\R?\{([^{]*)\}\R^[^\\].*\d\d\d\d\.\s([^\.]*\R?[^\.]*)\R?.*\R?.*
and replace:
\\defcitealias{$2}{$3}
(For myself I use \\bibitem.*(\R.*)?\R?\{([^{]*)\}$\R^([^\\].*[^\}]$\R.*$\R.*) to get all the item text)
Et produces a series of \defcitealias that can be copypasted elsewhere:
\defcitealias{Andrienko2003}{{GIS for Everyone: The
CommonGIS Project and Beyond}}
Finally, this can be used to build a custom command such as:
\newcommand{\MyCite}[1]{\citet*{#1}. \citetalias{#1}.}
Used as \MyCite{Andrienko2003} and producing: Andrienko et al. (2003). GIS for Everyone: The CommonGIS Project and Beyond.

Related

How can I use org-mode to write LaTeX for scientific journals?

I write most text using org-mode nowadays, and I often use it to generate PDF via LaTeX (xelatex, specifcally). But now I want to use it to write scientific articles, and journals often want me to use a specific style. This includes a .cls-file, which is easy enough using org-latex-classes, but quite often, they require a specific setup following \begin{document} (i.e. a specific abstract section, funky author and affiliation, etc, and I don't see how to do that. That is, I now do this within a #+begin/end_latex section - but this needs to be completely rewritten if I switch style.
I realize I probably need to fiddle with the LaTeX code at some point, but I'd like to minimize this fiddling as far as possible, and I'd like to be able to switch from one journal to another with a minimum of fuss, and keeping my org-mode source as intact as possible.
See item 3 at http://kitchingroup.cheme.cmu.edu/blog/2014/08/08/What-we-are-using-org-mode-for/
There is a list of papers there we have written in org-mode and exported to LaTeX. We have probably 8 more since that post.
In the SI you can find the org-source embedded in the PDF, and here: Spencer D. Miller, Vladimir V. Pushkarev, Andrew J. Gellman and John R. Kitchin, Simulating Temperature Programmed Desorption of Oxygen on Pt(111) Using DFT Derived Coverage Dependent Desorption Barriers, Topics In Catalysis, 57(1), 106-117 (2013). http://link.springer.com/article/10.1007%2Fs11244-013-0166-3 you can even find our manuscript embedded.
You may also want to checkout https://github.com/jkitchin/org-ref for citation management and https://github.com/jkitchin/jmax/blob/master/ox-manuscript.el for how we do our exports.
Depending on the amount of latex polishing you need to do, you may find it simpler to just add some things to your org file, and use a little bit of babel directly. Here is a snippet of how the start of one my files might look. Some of things are in there, because I will also have the R code for the statistical analyses in the org file in order to be able to have a more reproducible work flow:
# -*- mode: org; org-export-babel-evaluate: nil -*-
#+Title: This is my title
#+Author: An Author, Another Author, and Last Author
#+Options: toc:nil ':t *:nil -:nil ::nil <:nil ^:t author:t d:t H:5 |:t
#+Property: header-args:R :session *myarticlessection* :results output :exports both :cache yes
#+Latex_Class: article
#+Latex_Class_Options: [12pt]
#+Latex_Header: \usepackage{amsmath}
#+Latex_Header: \usepackage[T1]{fontenc}
#+Latex_Header: \usepackage{mathptmx}
#+Latex_Header_Extra: \linespread{1.5}
#+LATEX_HEADER: \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear, hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true] {biblatex}
#+Latex_header: \addbibresource{myarticles.bib}
#+BEGIN_SRC latex :results output
\begin{abstract}
Here is where I put the abstract.
\end{abstract}
#+END_SRC
#+RESULTS:
#+BEGIN_LaTeX
\begin{abstract}
And this is where it ended up after evaluating the babel block.
\end{abstract}
#+END_LaTeX
I used org-mode to write several papers, including my PhD thesis. It helped me greatly to keep track of open problems, priorities, annotations etc.
I use a small custom converter that reads the .org file and exports parts of it to a .tex file. Note that "normal" org-mode text (including headings, text, priorities, keywords etc.) is not exported, just the stuff between #BEGIN_LaTeX and #END_LaTeX tags. This way, you can make annotations as you see fit, which won't appear in the published text.

Exclude entry from glossary?

I'm using the glossaries package in LaTeX. I've got \gls{foo} in my document, but I don't want the entry for "foo" to appear in the glossary. How can I keep a working (i.e. expanding) \gls{foo} in the body of my document, but exclude the entry for "foo" from the glossary?
EDIT: I want to use \gls{foo} to indicate "as used here, 'foo' has its specific meaning within this document." In a few cases, though, I've ended up with a "foo" whose definition is too obvious--or difficult--to articulate in the glossary.
So I want \gls{foo} to be expanded as usual, but I don't want the "foo" entry to appear in the glossary.
I hope this adds a little more information about what I'm trying to accomplish. It may be an abuse of glossaries, but I find it helpful to make sure I'm always using the same words and the right words while writing technical documents.
If you are using the glossaries package you can create an "ignored" glossary like
\documentclass{article}
\usepackage{glossaries}
\newglossary[glignoredl]{ignored}{glignored}{glignoredin}{Ignored Glossary}
\makeglossaries
\newglossaryentry{foofoo}{name={FOOFOO},description={foofoo stuff}}
\newglossaryentry{foo}{name={FOO},type={ignored},description={no good description}}
\newglossaryentry{bar}{name={BAR},description={bar of stuff}}
\begin{document}
Here is a \gls{foo} that is also a \gls{bar}, but of course it's also a \gls{foofoo}.
Why not consider buying a \gls{foo}?
\printglossary
% \printglossary[type={ignored}]
\end{document}
I have no idea why you'd want to do this, but the following should work:
\let\oldgls\gls% store the original meaning of \gls in a new command named \oldgls
\let\gls\relax$ make \gls do nothing
Some text with \gls{foo} no links to the glossary,
and no ``foo'' entry in the glossary.
\let\gls\oldgls% restore the original meaning of \gls
Some more text with \gls{bar} that links to the glossary,
and with a ``bar'' entry in the glossary.
This can be accomplished by adding the terms to a special common dictionary. It's actually a built-in feature of the glossaries package and it's even exemplified by the package author. From said example:
\documentclass{article}
\usepackage{glossaries}
\newignoredglossary{common}
\makeglossaries
\newglossaryentry{sample}{name={sample},description={an example}}
\newglossaryentry{commonex}{type=common,name={common term}}
\begin{document}
\gls{sample}. \gls{commonex}.
\printglossaries
\end{document}
Note the use of the \newignoredglossary command.

Showing labels in BibTex [LaTeX]

I'm currently using the apalike style for my bibliography, using natbib for author-year, however when I generate the bibliography I lose the labels that normally precede the reference,
i.e. [S. Rostami, 2010] Shahin Rostami (2010) https://stackoverflow.com/questions/ask etc etc..
I read apalike.bst and it seems this is intended, my quesiton is, how do I get them back? Something I can include in the preamble? Otherwise is there a similar style that shows labels?
Also, I'm doing this all in Lyx.
OK, a real answer!
Advice: don't use homebrew citation styles in scientific articles. If your university recommends a specific style (e.g., APA, Chicago), use the existing matching style. Otherwise, you can get a feel for what is the dominant citation/reflist style by looking at what styles used by the articles you cite.
If you really do want to create such a homebrew cite/reflist style, then the easy option is to copy the .bbl file into your article and edit that: with luck, you can devise a regex that will create all or most of the labels you want. But rerunning Bibtex will not respect the changes you have made. The "right" thing is to clone apalike.bst and change the way it generates the author/date sentence to include the label information as well. BST hacking is a bit of a black art —time-consuming, fiddly, and poorly documented— but the language is not essentially difficult. Look at btxhak, Designing Bibtex styles and Nicolas Markey's tutorial to get started. Alternatively, there are some bst-hackery-avoiding suggestions in this SO Q&A.

MLA-style bibliography with BibLaTeX: How to organise by section?

I'm using the MLA authoring style. I would like to print out a bibliography subdivided into different sections. I also want annotations on each source. Is this possible with BibLaTeX? Should I just do it manually?
Yes, I think you can do that with Biblatex, but I think you should still just do it manually.
Note, though, that you are probably wanting to craft your notes differently for each citation from one paper to the next, which leads to the question: why use Bibtex at all? You can generate a Bibtex file the usual way, until all the references are there, then cut&paste the .bbl file into place in your Latex file, and annotate and reformat away to your heart's content.
So I think that Bibtex makes sense as a standard repository of the basic facts about citations you might make again and again: in particular you can get it error-free; my experience as a scientific editor is that most authors are sure that their bibliographies are error-free, most have between 10% and 60% of entries having errors in them. Latex users tend to be better that Word users in this respect, and I think that it is because of Bibtex.
Caveat: you will need to mess about with the thebibliography environment to do this. But that is another question... Also, if there are errors in your Bibtex file, you will need to correct them in two places.
Why I don't like Biblatex: the Bibtex prepresentation is a standard, and is accepted by all kinds of other document processors. You shouldn't put special Latex formatting into your bibliographic database: that will reduce the utility of that database. For m in particular, I use both Latex and Context: both use Bibtex, but only Latex uses Biblatex.
I managed to write a quite nice MLA-style bibliography with bibtex and the style provided by the Reed College (which is based on Natbib), and BibUnits to subdivide the entries in sections (as discussed here)
(let me know if you have any tips with MLA styles, my paper is not finished yet)
EDIT: my answer was for standard bibtex, not biblatex, sorry
yes, you can do it easily with biblatexwith the headings:
For instance:
\defbibheading{general}{\section*{General Architecture}}
\defbibheading{european}{\section*{European Architecture}}
\printbibliography[heading=general,keyword=general]
\printbibliography[heading=european,keyword=european]
and add the relevant keywords={architecture} keywords={general} in your *.bib files
Here is a biblatex MLA-style, if you need biblatex-mla (and a related question, you may also face this problem)

Is there a way to override a bibtex style file for a particular entry?

My preferred bibtex style file cites via author's initials. However, there are various texts which should be cited differently (for example, Elements Geometrie Algebrique should always be cited as [EGA]). I know how to modify this in the .bbl file that bibtex outputs, but then I have to do this for every file. Is there a way to do this from my .bib file?
My preferred bibtex style file cites via author's initials. However, there are various texts which should be cited differently...
I hope I don't get flamed for this, but your preferred bibtex style file does not serve your readers very well. Part of my job is to review papers, and a jumble of initials like [GKS] is not nearly as helpful as a full author-date citation like [Guibas, Knuth, and Sharir 1990]. For a knowledgeable reader, the authors and date often make it unneccessary to refer to the bibliography. For a naïve reader, a group of names is much easier to remember then a group of letters, especially when one or more of the names may be familiar. These issues are discussed in detail by, e.g., the Chicago Manual of Style, which explains the proper way to cite from the professional literature.
I go on at such length because I believe you are solving the wrong problem. Although I believe your readers will quickly recognize [EGA], I would hope they would also recognize (Grothendieck 1960) or (Grothendieck and Dieudonné 1967).
Can I [modify the way a work is cited] by changing my .bib file?
Not if you want to use any of the standard BibTeX styles. BibTeX uses one of the world's worst programming languages, and the standard programs are very firm about using the author or editor of a work for form the citation key. If you really want to do this, I recommend the following procedure:
Clone and modify something like the plainnat.bst file. This will enable you to create a new "bibliography style."
Create a new type of BibTeX entry which will enable you to specify the citation key using a special field (key is a popular choice).
Alter the calc.label function to do the right thing with your new type of entry. If you're lucky, changing calc.label will be enough to be sure the thing is sorted properly.
Use your nonstandard type in your .bib file and use your nonstandard \bibliographystyle{...} in all your LaTeX documents.
The gods really don't want you to do this—and neither do your coauthors...
You can modify the .bst program so that it looks for an additional field, say shown-key, and if it is set uses that rather than the usual.
If you are willing to use a different bib style there is a way pointed out by this answer. Using the abstract style, the bibtex key is used as the cite key. Then, you edit each key in the bib file anyway you want it.
A straightforward disadvantage of this approach is that you will have to edit every item in your bib file, however I believe that it is a fair price to pay for such flexibility.
I've seen other possible solutions involving natbib or biblatex, but I wanted to avoid those packages as I sometimes get compilation problems when using them.

Resources