0

I found this template and want to be able to change between two languages .

I used the following commands in the poster.tex and baposter.cls files, respectively, but I have some strange letters.

[EDIT by KJO to illustrate problem] using this class file https://github.com/anriseth/baposter/blob/master/baposter.cls OP gets this unexpected result

enter image description here

In poster.tex file:

\documentclass[a0paper,portrait]{baposter}
\usepackage{mwe}
\usepackage{graphicx}
\usepackage{relsize}        % For \smaller
\usepackage{url}            % For \url
% \usepackage{epstopdf} % Included EPS files automatically converted to PDF to include with pdflatex

%%% Global Settings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\graphicspath{{pix/}}   % Root directory of the pictures 
% \tracingstats=2           % Enabled LaTeX logging with conditionals

%% My code
\usepackage[english,greek]{babel}
\newcommand{\gr}{\selectlanguage{greek}}
\newcommand{\en}{\selectlanguage{english}}

%%% Color Definitions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor{bordercol}{RGB}{40,40,40}
\definecolor{headercol1}{RGB}{186,215,230}
\definecolor{headercol2}{RGB}{80,80,80}
\definecolor{headerfontcol}{RGB}{0,0,0}
\definecolor{boxcolor}{RGB}{186,215,230}
%%% Utility functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Save space in lists. Use this after the opening of the list %%%%%%%%%%%%%%%%
\newcommand{\compresslist}{
   \setlength{\itemsep}{1pt}
   \setlength{\parskip}{0pt}
   \setlength{\parsep}{0pt}
}


%%% Document Start %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}
\typeout{Poster rendering started}

%%% Setting Background Image %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\background{
   \begin{tikzpicture}[remember picture,overlay]%
    \draw (current page.north west)+(-2em,2em) node[anchor=north west]
    {\includegraphics[height=1.1\textheight]{background}};
    \end{tikzpicture}
}

%%% General Poster Settings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% Eye Catcher, Title, Authors and University Images %%%%%%%%%%%%%%%%%%%%%%
\begin{poster}{
      grid=false,
      % Option is left on true though the eyecatcher is not used. The reason is
      % that we have a bit nicer looking title and author formatting in the 
%headercol
% this way
%eyecatcher=false, 
borderColor=bordercol,
headerColorOne=headercol1,
headerColorTwo=headercol2,
headerFontColor=headerfontcol,
% Only simple background color used, no shading, so boxColorTwo isn't necessary
boxColorOne=boxcolor,
headershape=roundedright,
headerfont=\Large\sf\bf,
textborder=rectangle,
background=user,
headerborder=open,
boxshade=plain
}
%%% Eye Cacther %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
     Eye Catcher, empty if option eyecatcher=false - unused
}
%%% Title %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\sf\bf
    \gr  Αλγεβρική Θεωρία Γράφων
}
%%% Authors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
      \vspace{1em} {\en Richard O. Legendi, Laszlo Gulyas, George Kampis}\\
      {\en \smaller legendi@inf.elte.hu, lgulyas@colbud.hu, gkampis@colbud.hu}
}
%%% Logo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 {
% The logos are compressed a bit into a simple box to make them smaller on the result
% (Wasn't able to find any bigger of them.)
\setlength\fboxsep{0pt}
\setlength\fboxrule{0.5pt}
\fbox{
    \begin{minipage}{14em}
        \includegraphics[width=10em,height=4em]{example-image-a}
        \includegraphics[width=4em,height=4em]{example-image-b} \\
        \includegraphics[width=10em,height=4em]{example-image-c}
        \includegraphics[width=4em,height=4em]{example-image}
    \end{minipage}
     }
  }

 \headerbox{\en Problem}{name=problem,column=0,row=0}{\en
  Sampling networks always involves the act of aggregation (e.g., when collecting longitudinal samples of networks). We sutdy how the cumulation window length effects the properties of the aggregated network.
 %%% change to greek language 
 {\gr Αλγεβρική Θεωρία Γράφων}


}


 \end{poster}
 \end{document}

Does anyone know what commands I need for this effect and in which file they must be placed?

  • 2
    Welcome to TeX.se. Please don't post code fragments. Instead edit your question to provide a minimal compilable document that shows what you are doing. – Alan Munn May 17 at 15:40
-1

In order to be able to use Greek characters, you should use the inputenc package:

\usepackage[utf8]{inputenc}

Also, the order of languages in the arguments of the babel package is important. The last language must be the primary language of your document.

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.