2

I'm making a poster using baposter.cls (one can get it here). I wanted to use microtype package to increase the spacing of the letters in my headerbox titles but I've encountered a TikZ error : Package tikz Error: Giving up on this path. Did you forget a semicolon?. }.

I'm using Atom with latexmk for compilation, but I've also tried TeXStudio and the error persists. I'm running a fully up to date version of MikTeX.

Minimal working example

I left all the font packages in since they might be contributing to the error.

\documentclass[portrait,final,a0paper,fontscale=0.277]{baposter}

%% Fonts
\usepackage{bookman}
\usepackage[eulergreek]{sansmath}\sansmath
\usepackage{upgreek}
\usepackage[T1]{fontenc}

\usepackage{anyfontsize}
\usepackage[normalem]{ulem}
\usepackage{lipsum}

% https://tex.stackexchange.com/questions/62346/enlarging-tracking-letter-spacing
\usepackage[letterspace=50]{microtype}

\begin{document}
\begin{poster}%
{% poster options
    grid=false,%
    columns=3,%
    colspacing=1.5em,%
    bgColorOne=white,%
    borderColor=black,%
    headerColorOne=black,%
    headerFontColor=white,%
    boxColorOne=white,%
    textborder=rectangle,%roundedsmall,%
    headerborder=none,%
    headerheight=0.1\textheight,%
    headershape=rectangle,%smallrounded,%
    headershade=plain,%
    headerfont=\fontsize{11}{1}\selectfont\sf\lsstyle,%
    headerheight=0.13\textheight,%
    textfont={\setlength{\parindent}{1.5em}}\fontsize{7.5}{10}\selectfont\sf,%
    boxshade=plain,%
    background=plain,%
    linewidth=1pt%
}{}{Title}{author}{}{}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    %%
    \headerbox{foo}%
    {name=ceas, column=0, row=0, span=3}%
    {
        \vspace{0.5em}
        \lipsum[1-4]
    }

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \headerbox{bar}%
    {name=foo, column=0, span=3, below=ceas}%
    {
        \vspace{0.5em}
        \lipsum[5-8]
    }

\end{poster}
\end{document}

The above code reproduces the error. If one comments out the \lsstyle (which is the microtype command) the error goes away.

  • Instead of \lsstyle in headerfont, apply it in title and author parameters: {\lsstyle{Title}}{\lsstyle{author}}. – Ignasi Mar 21 '17 at 16:04
  • I downloaded the class (2011/11/26 v2.0 baposter class) and tried the example; I get several errors about colors. – egreg Mar 21 '17 at 16:18
  • @Ignasi I do not want to expand the tile or the author. I want to expand the header of each of the textboxes. – MarcinKonowalczyk Mar 21 '17 at 17:09
  • @egreg I believe we have the same file. I'm using the baposter.cls from the link provided. MD5 checksum: be689fb62b90a56c8b0d0c008559b7ff. I have absolutely no errors about the colors. – MarcinKonowalczyk Mar 21 '17 at 17:14
  • @egreg I had errors with colors and replaced them with my own colors. – Ignasi Mar 21 '17 at 17:59
  • @Ignasi That's what I did too. But I expect the example doesn't choke before exhibiting the real issue. – egreg Mar 21 '17 at 18:02
  • Ok, but i think it's the same error. I don't have microtype docs now, but please try to confirm that \lsstype can be applied as a font modifier like you do. Applying it as a command with one argument works. – Ignasi Mar 21 '17 at 18:02
  • @egreg My apologies. I must have pasted a version of the code where I forgot to change the colors of my internal palette to the universal ones. For the record; I've now corrected it in the code above. – MarcinKonowalczyk Mar 21 '17 at 18:24
  • @Ignasi I've checked and I agree that it works when applying \lstype with one argument. However, I've also checked that it does work as a front modifier on a piece of text (in the same document) which makes me think it's a problem with baposter itself. Edit: Based on egreg's answer I think I was correct in my assumption (even though I was unable to do anything about it) – MarcinKonowalczyk Mar 21 '17 at 18:32
  • While @egreg already provided a workaround, this has been fixed in microtype version 2.7 – Robert Jul 24 '17 at 13:10

1 Answers1

2

There are several weakness in the code. Happily, this particular one is easy to fix.

\documentclass[portrait,final,a0paper,fontscale=0.277]{baposter}

%% Fonts
\usepackage{bookman}
\usepackage[eulergreek]{sansmath}\sansmath
\usepackage{upgreek}
\usepackage[T1]{fontenc}

\usepackage{anyfontsize}
\usepackage[normalem]{ulem}
\usepackage{lipsum}
\usepackage{etoolbox}

% https://tex.stackexchange.com/questions/62346/enlarging-tracking-letter-spacing
\usepackage[letterspace=500]{microtype}

\makeatletter
\patchcmd\poster
 {\baposter@box@headerfont{\baposter@box@title}}
 {{\baposter@box@headerfont\baposter@box@title}}
 {}{}
\makeatother




\begin{document}
\begin{poster}%
{% poster options
    grid=false,%
    columns=3,%
    colspacing=1.5em,%
    bgColorOne=red,%
    borderColor=black,%
    headerColorOne=blue,%
    headerFontColor=white,%
    boxColorOne=white,%
    textborder=rectangle,%roundedsmall,%
    headerborder=none,%
    headerheight=0.1\textheight,%
    headershape=rectangle,%smallrounded,%
    headershade=plain,%
    headerfont=\fontsize{11}{13}\sffamily\lsstyle,%
    headerheight=0.13\textheight,%
    textfont={\setlength{\parindent}{1.5em}}\fontsize{7.5}{10}\sffamily,%
    boxshade=plain,%
    background=plain,%
    linewidth=1pt%
}{}{Title}{author}{}{}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    %%
    \headerbox{foo}%
    {name=ceas, column=0, row=0, span=3}%
    {
        \vspace{0.5em}
        \lipsum[1-4]
    }

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \headerbox{bar}%
    {name=foo, column=0, span=3, below=ceas}%
    {
        \vspace{0.5em}
        \lipsum[5-8]
    }

\end{poster}
\end{document}

I used 500 in order to emphasize that the letter spacing is done.

enter image description here

Please, note that \sf has been deprecated for more than 20 years.

egreg
  • 1,121,712