2

Is it possible to make the DOI into a link with achemso, as it is with biblatex-chem? I'm going to assume no, or that would be done already, but thought I'd check. I know I'd have to turn that option off before submitting it, but it is useful when editing the paper after a while, as then when I want to check out a specific reference I can just click the link instead of having to go hunting for it.

1

My solution is to copy the achemso.bst file and place it in my latex document folder as achemso_edit.bst

Inspired by the rsc.bst file, I have commented the format.doi function in the achemso_edit.bst file

% FUNCTION { format.doi } {
%   doi empty$
%     'skip$
%     {
%       bbl.doi add.space
%       "\doi{" * doi * "}" *
%       output
%     }
%   if$
% }

and replaced it by

FUNCTION {format.doi}
{ ctrl.doi.bool
    { doi empty$
        'skip$
        {
          link.doi
            {
              "\href{http://dx.doi.org/"
              doi *
              "}{" *
              bbl.doi doi tie.or.space.connect *
              "}" *
            }
            { bbl.doi doi tie.or.space.connect }
          if$
          output
        }
      if$
    }
    'skip$
  if$
}

To get this to work, some booleans are necessary.

I've added the link.doi boolean to the INTEGERS list

INTEGERS {
  ctrl.article.title.bool
  ctrl.chapter.title.bool
  ctrl.doi.bool
  ctrl.etal.firstonly.bool
  ctrl.etal.number.int
  link.doi
}

and enabled it in the FUNCTIONS list

FUNCTION { initialize.control.values } {
  #1 'link.doi :=
  #1 'ctrl.article.title.bool :=
  #0 'ctrl.chapter.title.bool :=
  #1 'ctrl.doi.bool :=
  #1 'ctrl.etal.firstonly.bool :=
  #15 'ctrl.etal.number.int :=
}

I've copied the complete achemso_edit.bst file to https://pastebin.com/5hZni8rb

The bibliography style is used by issuing the command before the \bibliography command

\bibliographystyle{achemso_edit.bst}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.