Med hjälp av authblk-paket automatiskt räkna med affilkommando
On februari 10, 2021 by adminMin nuvarande kodning är anslutningslänknummer infoga manuellt.
\title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author[1]{Junli Liu} \author[2]{James Rowe} \author[3]{Keith Lindsey} \affil[1]{address one} \affil[2]{address two} \affil[3]{address three}
Men jag vill att anslutningslänknummer ska anges automatiskt som motkoncept. föreslå lösning
Till exempel:
\title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author[1]{Junli Liu} \author[2]{James Rowe} \author[3]{Keith Lindsey} \affil{address one} \affil{address two} \affil{address three}
Kommentarer
- Du ' har helt ändrat frågan från att inte begära någon anslutning till automatisk numrering. Mitt förslag är att inte göra detta, eftersom det gör befintliga svar helt ogiltiga. Snarare ställa en ny uppföljningsfråga .
Svar
Jag är inte säker på vilken logik du förväntar dig i \affil
.
Det finns två former för att använda authblk
faciliteter.
Första formen
\author{Name1} \affil{Affiliation1} \author{Name2a} \author{Name2b} \affil{Affiliation 2}
(valfritt antal författare kan föregå en \affil
kommando, som kommer att hänvisa till den gruppen av författare). Det är ditt fall:
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author{Junli Liu} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \author{James Rowe} \author{Keith Lindsey} \affil{Some other laboratory, Elsewhere} \maketitle \end{document}
producerar
Andra formen
Om anslutningar inte följer författarens ordning måste man gå med den andra formen, där det valfria argumentet blir nödvändigt:
\author[1]{Name1a} \author[2]{Name2} \author[1]{Name1b} \affil[1]{Affiliation1} \affil[2]{Affiliation2}
Så om Lindsey i ditt fall har samma tillhörighet som Liu, ska du mata in
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author[1]{Junli Liu} \author[2]{James Rowe} \author[1]{Keith Lindsey} \affil[1]{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \affil[2]{Some other laboratory, Elsewhere} \maketitle
och du ” få
Alternativt sätt
Om du har en koppling till varje författare och vill ha automatisk numrering kan du göra det genom att ändra hur kommandona fungerar.
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \usepackage{letltxmacro,xpatch} \newcounter{affiliations} \LetLtxMacro{\authblkauthor}{\author} \LetLtxMacro{\authblkaffil}{\affil} \renewcommand{\author}[1]{% \authblkauthor[\theauthors]{#1}% } \renewcommand{\affil}[1]{% \stepcounter{affiliations}% \authblkaffil[\theaffiliations]{#1}% } \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author{Junli Liu} \author{James Rowe} \author{Keith Lindsey} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \affil{Some other laboratory, Elsewhere} \affil{Another laboratory, Somewhere Else} \maketitle \end{document}
Men du skulle få exakt samma resultat genom att använda den första formuläret, som enligt min mening är tydligare.
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author{Junli Liu} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \author{James Rowe} \affil{Some other laboratory, Elsewhere} \author{Keith Lindsey} \affil{Another laboratory, Somewhere Else} \maketitle \end{document}
En annan möjlighet (här behöver du det valfria argumentet bredvid \author
):
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \usepackage{letltxmacro,xpatch} \newcounter{affiliations} \LetLtxMacro{\authblkaffil}{\affil} \renewcommand{\affil}[1]{% \stepcounter{affiliations}% \authblkaffil[\theaffiliations]{#1}% } \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author[1]{Junli Liu} \author[2]{James Rowe} \author[3]{Keith Lindsey} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \affil{Some other laboratory, Elsewhere} \affil{Another laboratory, Somewhere Else} \maketitle \end{document}
Kommentarer
- Jag ger inga valfria argument som " \ affil [1] "
- Jag ger inga valfria argument som " \ affil [1 ] " Jag ger bara " \ affil {text här} ". Om den enda affilen är där är numret " 1 " visas inte " adressera en ". Mer än en affil ges numret räknas automatiskt som " 1 adress en, 2 adress två " .. Jag skulle vilja arbeta den här automatiska räkningen för logik
- @SaravanakkhumarC Snälla lägg till några förtydliganden (och exempel) på din fråga.
- Jag redigerar och sparar mitt förtydligande. Föreslå din lösning.
- @Vetri Jag lade till koden, men för den applikationen tycker jag att den första formen är bättre, för på det här sättet matas in direkt efter den relativa författaren.
Svar
Om du vill att en post inte ska ha ett nummer kan du använda \affil[ ]{<stuff>}
:
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author[1]{Junli Liu} \author[2]{James Rowe} \author[2]{Keith Lindsey} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \affil[$\relax$]{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \maketitle \end{document}
Om du vill ha alla \affil
för att vara ogiltig för siffror kan du lägga till följande i ingressen:
\usepackage[noblocks]{authblk} \let\oldaffil\affil% Store a copy of \affil in \oldaffil \renewcommand{\affil}{\oldaffil[ ]}% Update \affil to *always* use \affil[ ]
Ändringen ovan gör \affil
standard till \affil[ ]
så att du inte behöver skicka ett valfritt argument längre.
\documentclass[twocolumn]{article} \usepackage[noblocks]{authblk} \let\oldaffil\affil \renewcommand{\affil}{\oldaffil[ ]} \begin{document} \title{Hormonal crosstalk for root development: a combined experimental and modeling perspective} \author[1]{Junli Liu} \author[2]{James Rowe} \author[2]{Keith Lindsey} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \affil{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK} \maketitle \end{document}
Kommentarer
-
$\null$
? Verkligen? 😉 - @egreg: Det ' s är logiskt logiskt att inte ha /
\null
tillhörighet. Att vara\relax
redo om det är lika bra. - Nej,
\relax
skulle inte ' fungerar inte, eftersom kommandot\if\relax#1\relax
. Varken\null
skulle fungera, eftersom\if
skulle jämföra\relax
och\hbox
. Enklare:\affil[ ]
. Testet bör naturligtvis vara\ifx\hfuzz#1\hfuzz
(alla primitiva som inte förväntas i argumentet skulle också vara bra).
Lämna ett svar