First Name First After First Author ใน apalike

Aug 20 2020

ฉันใช้apalikeการปรับเปลี่ยนเพื่อแสดงชื่อครั้งแรกในการอ้างอิง เวอร์ชันนี้ใช้งานได้ดี แต่ฉันต้องการค้นหาชื่อก่อนสำหรับผู้เขียนทุกคนหลังจากชื่อแรก ตัวอย่างเช่นฉันต้องการมีDoe, John and Jane Doeมากกว่าDoe, John and Doe, Janeในการอ้างอิง ฉันสามารถเปลี่ยนapalikeลำดับการตั้งชื่อของผู้แต่งคนที่สองและสามได้หรือไม่? นี่คือ MWE

\documentclass{article}
\begin{document}
\bibliographystyle{apalike}
\cite{asdf}
\bibliography{asdf}
\end{document}

และasdf.bibประกอบด้วยข้อมูลต่อไปนี้

@article{asdf,
    title={asdf},
    author={Doe, John and Doe, Jane},
    journal={asdf},
    volume={1},
    number={1},
    pages={1--2},
    year={1111}
}

คำตอบ

1 AlanMunn Aug 21 2020 at 03:42

ฟังก์ชันที่เกี่ยวข้องที่จะเปลี่ยนแปลงใน.bstไฟล์ที่แก้ไขของคุณคือฟังก์ชัน

FUNCTION {format.names}

ซึ่งอยู่ในบรรทัด 209 ของ.bstไฟล์ต้นฉบับ ในเวอร์ชันแก้ไขของคุณคุณอาจมีสคีมาการจัดรูปแบบต่อไปนี้ซึ่งระบุว่าให้ใส่ชื่อเต็มเป็นอันดับแรก

s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=   % last name first

เปลี่ยนสิ่งนี้เป็น:

s nameptr 
    duplicate$ #1 > 
        { "{ff~}{vv~}{ll}{, jj}" }
        { "{vv~}{ll}{, jj}{, ff}" }
    if$ format.name$ 't :=   % last name first

ซึ่งจะใส่ชื่อเต็มก่อนในชื่อที่ไม่ใช่ชื่อย่อทั้งหมด

เช่นเดียวกับการแก้ไข.bstไฟล์ใด ๆตรวจสอบให้แน่ใจว่าคุณเปลี่ยนชื่อไฟล์และทำงานกับสำเนาต้นฉบับ (ซึ่งฉันคิดว่าจากคำถามของคุณที่คุณทำอยู่แล้ว)

นี่คือเอกสารตัวอย่างที่มี.bstไฟล์ที่เปลี่ยนแปลง

\documentclass{article}
\begin{filecontents}{\jobname.bib}

@article{BerwickPietroskiYankama2011,
    Author = {Robert Berwick and Paul Pietroski and Beracah Yankama and Noam Chomsky},
    Journal = {Cognitive Science},
    Pages = {1207-1242},
    Title = {Poverty of the stimulus revisited},
    Volume = {35},
    Year = {2011}}

@article{Chomsky1977,
    Author = {Noam Chomsky and Howard Lasnik},
    Journal = {Linguistic Inquiry},
    Pages = {425-504},
    Title = {Filters and Control},
    Volume = {8},
    Year = {1977}}

@article{HauserChomskyFitch2002,
    Author = {Hauser, Marc and Chomsky, Noam and Fitch, W. Tecumseh},
    Journal = {Science},
    Number = {5598},
    Pages = {1569--1579},
    Title = {The Faculty of Language: What Is It, Who Has It, and How Did It Evolve?},
    Volume = {298},
    Year = {2002}}
\end{filecontents}

\usepackage{natbib}
\bibliographystyle{apalike-lastname}
\begin{document}
\cite{BerwickPietroskiYankama2011,Chomsky1977,HauserChomskyFitch2002}
\bibliography{\jobname}
\end{document}