Articles
authblkパッケージの自動カウントオンアフィールコマンド
On 2月 10, 2021 by admin現在のコーディングは、アフィリエーションリンク番号を手動で挿入することです。
\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}
ただし、カウンターの概念のようにアフィリエーションリンク番号を自動的に入力したい。解決策を提案する
例:
\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}
コメント
- ' 完全に、所属の列挙を要求しないことから自動番号付けに質問を変更しました。私の提案は、既存の回答が完全に無効になるため、これをしないことです。むしろ、新しいフォローアップの質問をします。
回答
\affil
で期待しているロジックがわかりません。
機能。
最初のフォーム
\author{Name1} \affil{Affiliation1} \author{Name2a} \author{Name2b} \affil{Affiliation 2}
(コマンド、その作成者のグループを参照します)。それはあなたの場合です:
\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}
生成
第2の形式
所属が著者の順序に従わない場合は、オプションの引数が必要になる第2の形式を使用する必要があります。
\author[1]{Name1a} \author[2]{Name2} \author[1]{Name1b} \affil[1]{Affiliation1} \affil[2]{Affiliation2}
したがって、あなたの場合、リンジーが劉と同じ所属を持っている場合は、
\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
とあなたを入力する必要があります。 d get
別の方法
各作成者に所属している場合、自動番号付けが必要な場合は、コマンドの動作を変更することで実行できます。
\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}
ただし、最初のフォームを使用してもまったく同じ結果が得られます。これは、私の意見ではより明確な入力です。
\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}
別の可能性(ここでは、\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}
コメント
- " \ affil [1] "
- " \ affil [1のようなオプションの引数は指定していません] " " \ affil {text here} "のみを提供しています。アフィールが1つしかない場合、番号は" 1 "は表示されません"アドレス1 "。複数のアフィールが与えられると、番号は自動的に" 1アドレス1、2アドレス2 "のようにカウントされます。このロジックの自動カウント
- @SaravanakkhumarC質問にいくつかの説明(および例)を追加してください。
- 説明を編集して保存します。解決策を提案してください。
- @Vetriコードを追加しましたが、そのアプリケーションでは、最初の形式の方が優れていると思います。このように、所属は相対的な作成者の直後に入力されるためです。
回答
1つのエントリに番号を付けないようにする場合は、\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}
すべての
数字を無効にするには、プリアンブルに次を追加できます。
\usepackage[noblocks]{authblk} \let\oldaffil\affil% Store a copy of \affil in \oldaffil \renewcommand{\affil}{\oldaffil[ ]}% Update \affil to *always* use \affil[ ]
上記の変更により\affil
デフォルトは\affil[ ]
であるため、オプションの引数を渡す必要はありません。
\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}
コメント
-
$\null$
?本当に?;-) - @egreg:'は、論理的に意味があります。 /
\null
所属。\relax
についても同様に良いです。 - いいえ、
\relax
は'コマンドは\if\relax#1\relax
を実行するため、機能しません。\if
は\relax
とivid = “6e487d4a3dを比較するため、\null
は機能しません。 “>
。よりシンプル:\affil[ ]
。もちろん、テストは\ifx\hfuzz#1\hfuzz
である必要があります(引数で予期されていないプリミティブも同様に適切です)。
コメントを残す