1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

LaTeXでauthblkとtitlingが衝突する。

Posted at

maketitleの衝突

要旨集を作成するにあたって複数回 maketitle を使いつつ著者などの指定には authblk を使おうと奮闘していました。どうやら titlingauthblk は両方が内部で maketitle を定義しているので usepackage した順番によって maketitle の挙動がおかしくなる、という問題があります。titling を先に usepackage すると There's no line here to end というエラーメッセージが出て、authblk を先に usepacakge すると出力されるタイトルのフォーマットがおかしくなります。

解決方法

titling 内で定義された maketitleauthblk が再定義しているので、それをもとに戻す定義を加えます。

\documentclass[uplatex]{jsarticle}

\usepackage{titling}
\usepackage{authblk}

\makeatletter
\def\maketitle{\AB@maketitle}
\makeatother

\begin{document}
% authorやらaffilやらを指定する
\maketitle
% authorやらaffilやらを指定する
\maketitle
\end{document}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?