0

Below is the minimal working example reproducing my tikzposter, which looks like this:

enter image description here

I would like to put a QR code on the right and one on the left of the title. Doesn't need to be very large, just slightly smaller than the height of the blue title box. How can I do that?

\documentclass[20pt, a0paper, portrait, margin=0mm, innermargin=5mm, blockverticalspace=5mm, subcolspace=-.5cm]{tikzposter}
\title{Title}
\author{Author}
\date{\today}
\institute{University}

\usepackage{blindtext} \usepackage{comment} \usepackage{wrapfig} \usepackage{pgfplots} \usepackage{floatrow}

\usetheme{Desert} \begin{document}

\maketitle

\block[bodyoffsety=1.5cm, titleoffsety=1.5cm]{Abstract}{Abstract goes here}

\begin{columns} \column{0.5} % left column \block{Block 1}{Block 1 text} \block{Block 2}{Block 2 text} \block{Block 3}{Block 3 text} \column{0.5} % right column \block{Block 4}{Block 4 text} \block{Block 5}{Block 5 text} \block{Bibliography}{Bibliography goes here} \end{columns} \end{document}

Update after comment

I have updated the code following the Stackexchange post suggested in the comment:

\documentclass[20pt, a0paper, portrait, margin=0mm, innermargin=5mm, blockverticalspace=5mm, subcolspace=-.5cm]{tikzposter}
\title{Title}
\author{Author}
\date{\today}
\institute{University}

\makeatletter \newcommand\insertlogoi[2][]{\def@insertlogoi{\includegraphics[#1]{#2}}} \newcommand\insertlogoii[2][]{\def@insertlogoii{\includegraphics[#1]{#2}}} \newlength\LogoSep \setlength\LogoSep{-70pt}

\insertlogoi[width=6cm]{qrcode} \insertlogoii[width=6cm]{qrcode}

\renewcommand\maketitle[1][]{ % #1 keys \normalsize \setkeys{title}{#1} % Title dummy to get title height \node[transparent,inner sep=\TP@titleinnersep, line width=\TP@titlelinewidth, anchor=north, minimum width=\TP@visibletextwidth-2\TP@titleinnersep] (TP@title) at ($(0, 0.5\textheight-\TP@titletotopverticalspace)$) {\parbox{\TP@titlewidth-2\TP@titleinnersep}{\TP@maketitle}}; \draw let \p1 = ($(TP@title.north)-(TP@title.south)$) in node { \setlength{\TP@titleheight}{\y1} \setlength{\titleheight}{\y1} \global\TP@titleheight=\TP@titleheight \global\titleheight=\titleheight };

% Compute title position
\setlength{\titleposleft}{-0.5\titlewidth}
\setlength{\titleposright}{\titleposleft+\titlewidth}
\setlength{\titlepostop}{0.5\textheight-\TP@titletotopverticalspace}
\setlength{\titleposbottom}{\titlepostop-\titleheight}

% Title style (background)
\TP@titlestyle

% Title node
\node[inner sep=\TP@titleinnersep, line width=\TP@titlelinewidth, anchor=north, minimum width=\TP@visibletextwidth-2\TP@titleinnersep]
    at (0,0.5\textheight-\TP@titletotopverticalspace)
    (title)
    {\parbox{\TP@titlewidth-2\TP@titleinnersep}{\TP@maketitle}};

\node[inner sep=0pt,anchor=west] 
  at ([xshift=-\LogoSep]title.west)
  {\@insertlogoi};

\node[inner sep=0pt,anchor=east] 
  at ([xshift=\LogoSep]title.east)
  {\@insertlogoii};

% Settings for blocks
\normalsize
\setlength{\TP@blocktop}{\titleposbottom-\TP@titletoblockverticalspace}

} \makeatother

\usepackage{blindtext} \usepackage{comment} \usepackage{wrapfig} \usepackage{pgfplots} \usepackage{floatrow} \usepackage{qrcode} % Add this to your preamble

\usetheme{Desert} \begin{document}

\maketitle

\block[bodyoffsety=1.5cm, titleoffsety=1.5cm]{Abstract}{Abstract goes here}

\begin{columns} \column{0.5} % left column \block{Block 1}{Block 1 text} \block{Block 2}{Block 2 text} \block{Block 3}{Block 3 text} \column{0.5} % right column \block{Block 4}{Block 4 text} \block{Block 5}{Block 5 text} \block{Bibliography}{Bibliography goes here} \end{columns} \end{document}

1 Answers1

1

With TikZPoster's \settitle command it is possible to redefine the title layout.

The example below is based on the default setting (see TikZPoster manual) and inserts QR codes at the outer ends of the title block, both automatically scaled to fit within the predefined margins of the title block (to be adjusted with option innersep if desired, see manual):

\makettitle[innersep=...]

Package pst-barcode should be preferred over qrcode for its better output quality (see: https://tex.stackexchange.com/a/710114), but here, we use qrcode as in the question.

enter image description here

MWE:

\documentclass[20pt, a0paper, portrait, margin=0mm, innermargin=5mm, blockverticalspace=5mm, subcolspace=-.5cm]{tikzposter}
\title{Title}
\author{Author}
\date{\today}
\institute{University}

\usepackage{blindtext} \usepackage{comment} \usepackage{wrapfig} \usepackage{pgfplots} \usepackage{floatrow}

\usetheme{Desert}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % define left and right title graphics (two QR codes), at their default size %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{qrcode} %\usepackage{pst-barcode} \newcommand\titlegraphicLeft{% \qrcode{https://ctan.org/tex-archive/graphics/pstricks/contrib/pst-barcode}% % \makebox[1in][l]{\rule{0pt}{1in}% % \psbarcode{https://ctan.org/tex-archive/graphics/pstricks/contrib/pst-barcode}{width=1 height=1}{qrcode}% % }% } \newcommand\titlegraphicRight{% \qrcode{https://tex.stackexchange.com/q/710219}% % \makebox[1in][l]{\rule{0pt}{1in}% % \psbarcode{https://tex.stackexchange.com/q/710219}{width=1 height=1}{qrcode}% % }% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % redefine poster title based on default implementation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeatletter \settitle{% %rescale and insert left QR \raisebox{-0.5\totalheight+\depth}{\makebox[0pt][l]{\resizebox{!}{\titleheight-2\titleinnersep}{\titlegraphicLeft}}}% %insert title matter \raisebox{-0.5\totalheight+\depth}{\makebox[\linewidth]{% \vbox{% \centering% \color{titlefgcolor}% {\bfseries\Huge\sc@title\par}% \vspace{1em}% {\huge @author\par}% \vspace{1em}% {\LARGE @institute}% }% }}% %rescale and insert right QR \raisebox{-0.5\totalheight+\depth}{\makebox[0pt][r]{\resizebox{!}{\titleheight-2\titleinnersep}{\titlegraphicRight}}}% }% \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\maketitle

\block[bodyoffsety=1.5cm, titleoffsety=1.5cm]{Abstract}{Abstract goes here}

\begin{columns} \column{0.5} % left column \block{Block 1}{Block 1 text} \block{Block 2}{Block 2 text} \block{Block 3}{Block 3 text} \column{0.5} % right column \block{Block 4}{Block 4 text} \block{Block 5}{Block 5 text} \block{Bibliography}{Bibliography goes here} \end{columns} \end{document}

AlexG
  • 54,894