I'm following the example in Use Titlecaps package with achemso.bst, but couldn't get it to work. Below is the code I tried
myfile.tex
(copied from the answer linked above)
\begin{filecontents*}[overwrite]{example.bib}
@article{Mattern2022,
abstract = {We study the ultrafast electronic transport of energy in a photoexcited nanoscale Au/Fe hetero-structure by modeling the spatiotemporal profile of energy densities that drives transient strain, which we quantify by femtosecond x-ray diffraction. This flow of energy is relevant for intrinsic demagnetization and ultrafast spin transport. We measured lattice strain for different Fe layer thicknesses ranging from few atomic layers to several nanometers and modeled the spatiotemporal flow of energy densities. The combination of a high electron-phonon coupling coefficient and a large Sommerfeld constant in Fe is found to yield electronic transfer of nearly all energy from Au to Fe within the first hundreds of femtoseconds.},
author = {Mattern, M. and von Reppert, A. and Zeuschner, S. P. and Pudell, J.-E. and K{\"{u}}hne, F. and Diesing, D. and Herzog, M. and Bargheer, M.},
doi = {10.1063/5.0080378},
issn = {0003-6951},
journal = {Appl. Phys. Lett.},
month = {feb},
number = {9},
pages = {092401},
title = {Electronic energy transport in nanoscale Au/Fe hetero-structures in the perspective of ultrafast lattice dynamics},
url = {https://aip.scitation.org/doi/10.1063/5.0080378},
volume = {120},
year = {2022}
}
@article{Uwada2012,
author = {Uwada, Takayuki and Fujii, Sho and Sugiyama, Teruki and Usman, Anwar and Miura, Atsushi and Masuhara, Hiroshi and Kanaizuka, Katsuhiko and Haga, Masa-aki},
doi = {10.1021/am201799b},
issn = {1944-8244},
journal = {ACS Appl. Mater. Interfaces},
month = {mar},
number = {3},
pages = {1158--1163},
title = {Glycine Crystallization in Solution by CW Laser-Induced Microbubble on Gold Thin Film Surface},
url = {https://pubs.acs.org/doi/10.1021/am201799b},
volume = {4},
year = {2012}
}
\end{filecontents*}
\documentclass[]{achemso}
\usepackage{titlecaps}
\title[]{Simple Example}
%\bibliographystyle{achemso}
\begin{document}
We have reviewed the studies \cite{Mattern2022,Uwada2012}.
\bibliography{example}
\end{document}
achemso.bst
(only showing my modifications)
...
FUNCTION { format.title.article } {
ctrl.article.title.bool
{
title empty$
{ }
{
title titlecap
output
next.punct.period 'next.punct.int :=
}
if$
}
{ }
if$
}
...
FUNCTION {titlecap}
{ duplicate$ empty$
{ pop$ "" }
{ "\titlecap{" swap$ * "}" * }
if$
}
The first title does not show capitalization. I checked the bbl and there was no \titlecap in it as well.
output.bbl
\providecommand{\latin}[1]{#1}
\makeatletter
\providecommand{\doi}
{\begingroup\let\do\@makeother\dospecials
\catcode`\{=1 \catcode`\}=2 \doi@aux}
\providecommand{\doi@aux}[1]{\endgroup\texttt{#1}}
\makeatother
\providecommand*\mcitethebibliography{\thebibliography}
\csname @ifundefined\endcsname{endmcitethebibliography}
{\let\endmcitethebibliography\endthebibliography}{}
\begin{mcitethebibliography}{3}
\providecommand*\natexlab[1]{#1}
\providecommand*\mciteSetBstSublistMode[1]{}
\providecommand*\mciteSetBstMaxWidthForm[2]{}
\providecommand*\mciteBstWouldAddEndPuncttrue
{\def\EndOfBibitem{\unskip.}}
\providecommand*\mciteBstWouldAddEndPunctfalse
{\let\EndOfBibitem\relax}
\providecommand*\mciteSetBstMidEndSepPunct[3]{}
\providecommand*\mciteSetBstSublistLabelBeginEnd[3]{}
\providecommand*\EndOfBibitem{}
\mciteSetBstSublistMode{f}
\mciteSetBstMaxWidthForm{subitem}{(\alph{mcitesubitemcount})}
\mciteSetBstSublistLabelBeginEnd
{\mcitemaxwidthsubitemform\space}
{\relax}
{\relax}
\bibitem[Mattern \latin{et~al.}(2022)Mattern, von Reppert, Zeuschner, Pudell,
K{"{u}}hne, Diesing, Herzog, and Bargheer]{Mattern2022}
Mattern,~M.; von Reppert,~A.; Zeuschner,~S.~P.; Pudell,~J.-E.; K{"{u}}hne,~F.;
Diesing,~D.; Herzog,~M.; Bargheer,~M. Electronic energy transport in
nanoscale Au/Fe hetero-structures in the perspective of ultrafast lattice
dynamics. \emph{Appl. Phys. Lett.} \textbf{2022}, \emph{120}, 092401\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Uwada \latin{et~al.}(2012)Uwada, Fujii, Sugiyama, Usman, Miura,
Masuhara, Kanaizuka, and Haga]{Uwada2012}
Uwada,~T.; Fujii,~S.; Sugiyama,~T.; Usman,~A.; Miura,~A.; Masuhara,~H.;
Kanaizuka,~K.; Haga,~M.-a. Glycine Crystallization in Solution by CW
Laser-Induced Microbubble on Gold Thin Film Surface. \emph{ACS Appl. Mater.
Interfaces} \textbf{2012}, \emph{4}, 1158--1163\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\end{mcitethebibliography}
I'm compiling with Overleaf, and the files structure is as follows.
|
|--myfile.tex
|--achemso.bst
Any help would be appreciated, thanks.