Coder Social home page Coder Social logo

aa-bibstyle-with-hyperlink's Introduction

A&A-bibstyle-with-hyperlink

  • modified aa.bst with clickable url links in the bibliography
  • bst file for Astronomy & Astrophysical Journal
  • modified based on the aa.bst file from http://ftp.edpsciences.org/pub/aa/readme.html
  • it is recommended to use the bibtex record generated from NASA/ADS in order to include doi and adsurl properly

For making the links and colors work, you should also add something like the following in the preamble of the .TeX file

%---------- Add the clickable link function ----------
\usepackage{color}
\usepackage{natbib,twoopt}
\usepackage[hyphenbreaks]{breakurl}
\usepackage[breaklinks]{hyperref}      %% to avoid \citeads line fills, add "draft" 
                                       %% to avoid the PDFTK error (broken links)
\bibpunct{(}{)}{;}{a}{}{,}             %% natbib format for A&A and ApJ
\definecolor{cobalt}{rgb}{0.06, 0.2, 0.65}
\hypersetup{
  colorlinks,
  citecolor=cobalt,
  linkcolor=[rgb]{0.8, 0.2, 1.0},
  urlcolor=cobalt,
}
\makeatletter
  \newcommandtwoopt{\citeads}[3][][]{\href{http://adsabs.harvard.edu/abs/#3}%
    {\def\hyper@linkstart##1##2{}%
     \let\hyper@linkend\@empty\citealp[#1][#2]{#3}}}
  \newcommandtwoopt{\citepads}[3][][]{\href{http://adsabs.harvard.edu/abs/#3}%
    {\def\hyper@linkstart##1##2{}%
     \let\hyper@linkend\@empty\citep[#1][#2]{#3}}}
  \newcommandtwoopt{\citetads}[3][][]{\href{http://adsabs.harvard.edu/abs/#3}%
    {\def\hyper@linkstart##1##2{}%
     \let\hyper@linkend\@empty\citet[#1][#2]{#3}}}
  \newcommandtwoopt{\citeyearads}[3][][]%
    {\href{http://adsabs.harvard.edu/abs/#3}
    {\def\hyper@linkstart##1##2{}%
     \let\hyper@linkend\@empty\citeyear[#1][#2]{#3}}}
\makeatother

See an example below

example

Notes:

  • Some users report that the color package generates some warning and switch to xcolor might help.

aa-bibstyle-with-hyperlink's People

Contributors

yangcht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aa-bibstyle-with-hyperlink's Issues

adsurl and adsnote in PhDthesis

I was having

Extra }, or forgotten \endgroup.

errors and was not sure why. Then I found the PhD thesis entry, which was not from the ADS, was the problem.

Original (gave error):

@PHDTHESIS{2010PhDT.Macke,
author = {{Macke}, Robert J.},
title = "{Survey of meteorite physical properties density, porosity and magnetic susceptibility}",
school = {University of Central Florida},
year = 2010,
}

which generated

\bibitem[{{Macke}(2010)}]{2010PhDT.Macke}
{Macke}, R.~J. 2010, }{{Survey of meteorite physical properties density,
  porosity and magnetic susceptibility}}, PhD thesis, University of Central
  Florida

(Note the } in the second line after the year)

Changed (no error):

@PHDTHESIS{2010PhDT.Macke,
author = {{Macke}, Robert J.},
title = "{Survey of meteorite physical properties density, porosity and magnetic susceptibility}",
school = {University of Central Florida},
year = 2010,
       adsurl = {},
      adsnote = {}
}

which generated:

\bibitem[{{Macke}(2010)}]{2010PhDT.Macke}
{Macke}, R.~J. 2010, \href{}{{Survey of meteorite physical properties density,
  porosity and magnetic susceptibility}}, PhD thesis, University of Central
  Florida

After changing this, I don't see the warnings I reported in #2 .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.