Verwenden des automatischen Zählens des Authblk-Pakets beim Zugehörigkeitsbefehl
On Februar 10, 2021 by adminMeine aktuelle Codierung ist das manuelle Einfügen der Verknüpfungsnummer.
\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}
Ich möchte jedoch, dass die Nummer des Zugehörigkeitslinks automatisch wie bei counter concept.suggest solution
eingegeben wird. Beispiel:
\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}
Kommentare
- Sie ' haben die Frage vollständig geändert, von der Anforderung einer Aufzählung der Zugehörigkeit zur automatischen Nummerierung. Mein Vorschlag ist, nicht dies zu tun, da dadurch vorhandene Antworten vollständig ungültig werden. Stellen Sie lieber eine neue Folgefrage .
Antwort
Ich bin nicht sicher, welche Logik Sie in \affil
erwarten.
Es gibt zwei Formen für die Verwendung von authblk
Einrichtungen.
Erste Form
\author{Name1} \affil{Affiliation1} \author{Name2a} \author{Name2b} \affil{Affiliation 2}
(eine beliebige Anzahl von Autoren kann einer Befehl, der sich auf diese Gruppe von Autoren bezieht). Es ist Ihr 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}
erzeugt
Zweite Form
Wenn Zugehörigkeiten nicht der Reihenfolge der Autoren folgen, muss man sich für die zweite Form entscheiden, bei der das optionale Argument erforderlich wird:
\author[1]{Name1a} \author[2]{Name2} \author[1]{Name1b} \affil[1]{Affiliation1} \affil[2]{Affiliation2}
Wenn Lindsey in Ihrem Fall dieselbe Zugehörigkeit wie Liu hat, sollten Sie
\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
und Sie „eingeben. d get
Alternative Methode
Wenn Sie für jeden Autor und eine Zugehörigkeit haben Wenn Sie eine automatische Nummerierung wünschen, können Sie die Funktionsweise der Befehle ändern.
\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}
Sie würden jedoch genau das gleiche Ergebnis erzielen, wenn Sie das erste Formular verwenden, das meiner Meinung nach eine klarere Eingabe darstellt.
\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}
Eine andere Möglichkeit (hier benötigen Sie das optionale Argument neben \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}
Kommentare
- Ich gebe keine optionalen Argumente wie " \ Affil [1] "
- Ich gebe keine optionalen Argumente wie " \ Affil [1 ] " Ich gebe nur " \ Affil {Text hier} ". Wenn nur ein Partner vorhanden ist, lautet die Nummer " 1 " wird nicht angezeigt " Adresse eins ". Es wird mehr als ein Partner angegeben. Die Nummer wird automatisch gezählt wie " 1 Adresse eins, 2 Adresse zwei ". Ich würde gerne arbeiten Diese Logik zählt automatisch.
- @SaravanakkhumarC Bitte fügen Sie Ihrer Frage einige Erläuterungen (und Beispiele) hinzu.
- Ich bearbeite und speichere meine Erläuterungen. Schlagen Sie Ihre Lösung vor.
- @Vetri Ich habe den Code hinzugefügt, aber für diese Anwendung halte ich das erste Formular für besser, da auf diese Weise die Zugehörigkeit unmittelbar nach dem jeweiligen Autor eingegeben wird.
Antwort
Wenn ein Eintrag keine Nummer haben soll, können Sie \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}
Wenn Sie alle \affil
Um keine Zahlen zu erhalten, können Sie Ihrer Präambel Folgendes hinzufügen:
\usepackage[noblocks]{authblk} \let\oldaffil\affil% Store a copy of \affil in \oldaffil \renewcommand{\affil}{\oldaffil[ ]}% Update \affil to *always* use \affil[ ]
Die obige Änderung bewirkt, dass \affil
ist standardmäßig \affil[ ]
, sodass Sie kein optionales Argument mehr übergeben müssen.
\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}
Kommentare
-
$\null$
? Wirklich? 😉 - @egreg: ' ist logisch sinnvoll, keine zu haben /
\null
Zugehörigkeit. Es ist genauso gut,\relax
darüber zu sein. - Nein,
\relax
würde nicht ' funktioniert nicht, da der Befehl\if\relax#1\relax
ausführt. Weder\null
würde funktionieren, da\if
\relax
und . Einfacher:\affil[ ]
. Der Test sollte natürlich\ifx\hfuzz#1\hfuzz
sein (jedes im Argument nicht erwartete Grundelement wäre auch gut).
Schreibe einen Kommentar