1

It will be very helpful if someone kindly help me fixing the title of the code below:

\documentclass[a0,portrait]{a0poster}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes,arrows,shadows,petri,decorations.markings}
\definecolor{pms286}{RGB}{4,52,177}
\tikzstyle{mybox} = [draw=pms286!80, fill=blue!20, very thick,
rectangle, rounded corners=30pt, inner sep=10pt, inner ysep=30pt,color=blue!20]
\def\Title#1{\noindent{\VeryHuge\color{pms286} #1}}


%\begin{document}
\newcommand{\displaytitle}[3]{%
  \begin{tikzpicture}
    \node [mybox] (box){%
      \begin{minipage}{0.93\textwidth}
    \begin{tabular}{lc}
      \multirow {3}{*}{\includegraphics[width=0.125\textwidth]{some logo}}
      & \baselineskip=3\baselineskip\Title{#1}\\\\
      & \Huge\color{pms286!90}{#2} \\\\
      & \LARGE\color{pms286!80}{#3}\\
    \end{tabular}
      \end{minipage}
    };
  \end{tikzpicture}
}

\begin{document}
\centering
\displaytitle{A very very very very very very \\very very very very very very very very very very
long title. }{Author}{University}
\end{document}

NB: the logo image is missing, so, compilation will give a error. But thats not the problem here.

My problem is, with this displaytitle setting, Title is only for one line. If the title is really lengthy (two line), it can not be broken. A `\' linebreak erases the format(as shown in the picture).

Kindly help.enter image description here

  • Have you looked at tikzposter? It's great for creatihng posters. Just google around a bit and you'll find lots of examples. – user10274 May 29 '14 at 11:39
1

You need to define a newcolumntype from array package for text wrapping. Here two column types were defined, requiring #1 width argument. P is for paragraph column with text vertically aligned at the top while C is for paragraph column with text vertically aligned in the middle. Also, multirow package is required which was not loaded in the OP.

\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

enter image description here

Code

\documentclass[a0,portrait]{a0poster}
\usepackage{array,tikz,multirow}
\usetikzlibrary{shapes,snakes,arrows,shadows,petri,decorations.markings}

\definecolor{pms286}{RGB}{4,52,177}
\tikzstyle{mybox} = [draw=pms286!80, fill=blue!20, very thick,
rectangle, rounded corners=30pt, inner sep=10pt, inner ysep=30pt,color=blue!20]
\def\Title#1{\noindent{\VeryHuge\color{pms286} #1}}

\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

%\begin{document}
\newcommand{\displaytitle}[3]{%
  \begin{tikzpicture}
    \node [mybox] (box){%
      \begin{minipage}{0.93\textwidth}
      \begin{tabular}{l C{0.8\textwidth}}
      \multirow {3}{*}{\includegraphics[width=0.125\textwidth]{example-image-a}}
       &\baselineskip=3\baselineskip\Title{#1}\\\\
       &\Huge\color{pms286!90}{#2} \\\\
       &\LARGE\color{pms286!80}{#3}\\
      \end{tabular}
      \end{minipage}
    };
  \end{tikzpicture}
}

\begin{document}
\displaytitle{A very very very very very very very very very very very very very very very very long title}
{Author}
{University}

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.