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?

1 Answer 1

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.

2
  • Thanks for the information. But I don't understand why having groups in \AtBeginDocument and \AtEndDocument is bad. Commented Mar 28, 2019 at 12:19
  • 1
    It is bad as it breaks things as you can see in your example. Commented Mar 28, 2019 at 12:40

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.