2

MWE:

\documentclass{tikzposter}

\usepackage{microtype}
\usepackage{hyperref}
% Ref: https://tex.stackexchange.com/questions/254257/tikzposter-and-doi-package-conflict
\def\HyperFirstAtBeginDocument#1{#1}

\title{Title}
\institute{Inst}
\author{Auth}

\begin{document}

\maketitle

\block{Blocktitle}{Text}

\end{document}

Error messages:

./test.tex:18: Undefined control sequence.
\pdfstringdefPreHook ->\MT@ltx@pickupfont
                                          \let \textmicrotypecontext \@secon...
l.18 \end{document}

This is different than incompatibility between tikzposter class and microtype package

How should I fix it?

xucheng
  • 529

1 Answers1

5

tikzposter inserts with \AtBeginDocument and \AtEndDocument a center and tikzpicture enviroment, and this introduce groups. This is not a good idea and one of the bad side effects is that this breaks the microtype. You can get similar error with this simpler example:

\documentclass{article}
\AtBeginDocument{\begingroup}
\AtEndDocument{\endgroup}

\usepackage{microtype}
\usepackage{hyperref}

\begin{document}
 text
\end{document}

I don't see a sensible workaround, it doesn't help to use \center and \tikzpicture in the code, as \tikzpicture creates a group in any case. I suggest to use something else for the poster, e.g. the poster library from tcolorbox.

Ulrike Fischer
  • 327,261