Met behulp van authblk-pakket geautomatiseerd tellen op affil commando
Geplaatst op februari 10, 2021 door adminMijn huidige codering is het handmatig invoegen van het nummer van de aansluitingslink.
\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}
Maar ik wil dat het aansluitingslinknummer automatisch wordt ingevoerd, zoals counter concept.suggest solution
Bijvoorbeeld:
\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}
Reacties
- U ' ve volledig veranderde de vraag, van het aanvragen van geen opsomming van het lidmaatschap naar automatische nummering. Mijn suggestie is om dit niet te doen, aangezien het bestaande antwoorden volledig ongeldig maakt. In plaats daarvan stel een nieuwe, vervolgvraag .
Antwoord
Ik “weet niet zeker welke logica u” verwacht in \affil
.
Er zijn twee vormen voor het gebruik van authblk
faciliteiten.
Eerste vorm
\author{Name1} \affil{Affiliation1} \author{Name2a} \author{Name2b} \affil{Affiliation 2}
(elk aantal auteurs kan voorafgaan aan een \affil
commando, dat naar die groep auteurs verwijst). Het is jouw geval:
\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}
produceert
Tweede vorm
Als affiliaties niet de volgorde van de auteurs volgen, moet men kiezen voor de tweede vorm, waar het optionele argument nodig wordt:
\author[1]{Name1a} \author[2]{Name2} \author[1]{Name1b} \affil[1]{Affiliation1} \affil[2]{Affiliation2}
Dus als Lindsey in jouw geval dezelfde band heeft als Liu, moet je
\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
invoeren en jij ” d get
Alternatieve manier
Als je een affiliatie hebt voor elke auteur en automatische nummering wilt, kunt u dit doen door de manier waarop de opdrachten werken te wijzigen.
\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}
U “zou echter exact hetzelfde resultaat krijgen door het eerste formulier te gebruiken, dat naar mijn mening duidelijkere invoer is.
\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}
Een andere mogelijkheid (hier heb je het optionele argument naast \author
nodig):
\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}
Reacties
- Ik geef geen optionele argumenten zoals " \ affil [1] "
- Ik geef geen optionele argumenten zoals " \ affil [1 ] " Ik geef alleen " \ affil {tekst hier} ". Als de enige aansluiting daar is, is het nummer " 1 " wordt niet weergegeven " adres één ". Er worden meer dan één aansluiting gegeven, het nummer wordt automatisch geteld als " 1 adres één, 2 adres twee " .. Ik zou graag willen werken deze logica automatisch tellen
- @SaravanakkhumarC Voeg alsjeblieft wat verduidelijkingen (en voorbeelden) toe aan je vraag.
- Ik bewerk en bewaar mijn verduidelijking. Stel je oplossing voor.
- @Vetri Ik heb de code toegevoegd, maar voor die toepassing denk ik dat de eerste vorm beter is, omdat op deze manier de aansluiting direct achter de betreffende auteur wordt ingevoerd.
Answer
Als u wilt dat een item geen nummer heeft, kunt u \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}
Als je alle \affil
om geen nummers meer te hebben, kunt u het volgende aan uw preambule toevoegen:
\usepackage[noblocks]{authblk} \let\oldaffil\affil% Store a copy of \affil in \oldaffil \renewcommand{\affil}{\oldaffil[ ]}% Update \affil to *always* use \affil[ ]
De bovenstaande wijziging maakt \affil
standaard ingesteld op \affil[ ]
zodat u geen optioneel argument meer hoeft door te geven.
\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}
Reacties
-
$\null$
? Echt waar? 😉 - @egreg: Het is ' s logisch om geen /
\null
aansluiting.\relax
ed erover zijn is net zo goed. - Nee,
\relax
zou niet ' werkt niet, omdat het commando\if\relax#1\relax
doet. Noch\null
zou werken, omdat\if
\relax
en . Eenvoudiger:\affil[ ]
. De test moet natuurlijk\ifx\hfuzz#1\hfuzz
zijn (elke primitief die niet in het argument wordt verwacht, zou ook goed zijn).
Geef een reactie