Ved hjelp av authblk-pakke automatisert stole på affilkommando
On februar 10, 2021 by adminMin nåværende koding er tilknytningslinknummer sett inn manuelt.
\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 jeg vil at tilknytningslinknummer skal legges inn automatisk som motkonsept. foreslå løsning
For eksempel:
\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 fullstendig endret spørsmålet, fra å be om ikke noen tilknytning til automatisk nummerering. Mitt forslag er å ikke gjøre dette, siden det gjør eksisterende svar fullstendig ugyldige. Snarere still et nytt oppfølgingsspørsmål .
Svar
Jeg er ikke sikker på hvilken logikk du forventer i \affil
.
Det er to former for bruk av authblk
fasiliteter.
Første form
\author{Name1} \affil{Affiliation1} \author{Name2a} \author{Name2b} \affil{Affiliation 2}
(et hvilket som helst antall forfattere kan gå foran en \affil
kommando, som vil referere til den gruppen av forfattere). Det er ditt tilfelle:
\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}
produserer
Andre form
Hvis tilknytning ikke følger rekkefølgen av forfatterne, må man gå med den andre formen, der det valgfrie argumentet blir nødvendig:
\author[1]{Name1a} \author[2]{Name2} \author[1]{Name1b} \affil[1]{Affiliation1} \affil[2]{Affiliation2}
Så hvis Lindsey har samme tilknytning som Liu i ditt tilfelle, bør du legge inn
\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
og du » få
Alternativ måte
Hvis du har tilknytning til hver forfatter og ønsker automatisk nummerering, kan du gjøre det ved å endre hvordan kommandoene fungerer.
\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}
Du ville imidlertid få nøyaktig samme resultat ved å bruke det første skjemaet, som etter min mening er tydeligere input.
\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 annen mulighet (her trenger du det valgfrie argumentet ved siden av \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
- Jeg gir ingen valgfrie argumenter som " \ affil [1] "
- Jeg gir ingen valgfrie argumenter som " \ affil [1 ] " Jeg gir bare " \ affil {text her} ". Hvis den eneste affilen er der, er tallet " 1 " vises ikke " adresse en ". Mer enn en affil er gitt, tallet telles automatisk som " 1 adresse en, 2 adresse to " .. Jeg vil gjerne jobbe denne logiske automatiske tellingen
- @SaravanakkhumarC Vennligst legg til noen avklaringer (og eksempler) på spørsmålet ditt.
- Jeg redigerer og lagrer avklaringen min. Foreslå løsningen.
- @Vetri Jeg la til koden, men for den applikasjonen tror jeg det første skjemaet er bedre, fordi på denne måten blir tilknytningen umiddelbart lagt inn etter den relative forfatteren.
Svar
Hvis du vil at en oppføring ikke skal ha et nummer, kan du bruke \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}
Hvis du vil ha alt \affil
for å være ugyldig for tall kan du legge til følgende i innledningen din:
\usepackage[noblocks]{authblk} \let\oldaffil\affil% Store a copy of \affil in \oldaffil \renewcommand{\affil}{\oldaffil[ ]}% Update \affil to *always* use \affil[ ]
Endringen over gjør \affil
standard til \affil[ ]
så du trenger ikke å sende et valgfritt argument lenger.
\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$
? Virkelig? 😉 - @egreg: Det ' er logisk fornuftig å ha ingen /
\null
tilknytning. Å være\relax
redd om det er like bra. - Nei,
\relax
ville ikke ' fungerer ikke, fordi kommandoen\if\relax#1\relax
. Verken\null
ville fungere, fordi\if
ville sammenligne\relax
og\hbox
. Enklere:\affil[ ]
. Testen skal være\ifx\hfuzz#1\hfuzz
, selvfølgelig (enhver primitiv som ikke forventes i argumentet, vil også være bra).
Legg igjen en kommentar