#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #tikz-pgf #beamer Spurious shifting of headline when conditionally placing logo on beamer slide using pgfputat

Bounty: 50

I have a macro taken from this question that places a logo on all frames following placelogotrue and on no frame following placelogofalse. It largely works as intended, but it causes headline and foodline of the frames with the logo to be slightly shifted to the left, leaving some spurious whitespace (compare the upper image footline with the lower image headline in the pictures below):

frame with logo
frame without logo

Here’s the code to reproduce:

% !TeX program = lualatex
documentclass{beamer}

usetheme{Malmoe}
% graphics
DeclareGraphicsExtensions{.jpg,.jpeg,.png,.pdf}

% TikZ/PGF
usepackage{pgf}

% customization of beamer style
setbeamertemplate{bibliography item}{}
setbeamertemplate{navigation symbols}{}

% define logo
newififplacelogo
placelogotrue
logo{ifplacelogopgfputat{pgfxy(-0.1,7.72)}{pgfbox[right,base]{%
            includegraphics[height=7mm]{example-image-a}
    }}fi}%

% define custom headline
setbeamertemplate{headline}
{%
    leavevmode%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
        hbox to .5paperwidth{hfilinsertsectionheadhfil}
    end{beamercolorbox}%
    begin{beamercolorbox}[wd=.5paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
        hbox to .5paperwidth{hfilinsertsubsectionheadhfil}
    end{beamercolorbox}%
}

begin{document}

begin{frame}
end{frame}

placelogofalse
begin{frame}
end{frame}


end{document}

Why is that? I would have expected pgfputat not to alter spacing on the frame at all…

I’m compiling with LuaLaTeX Version 1.12.0 (TeX Live 2020) on Arch Linux.


Get this bounty!!!

#StackBounty: #beamer Beamer: designing slide

Bounty: 50

I would like to know if it is possible for all slides in beamer to have a rectangular region of specified dimensions where no text, mathematical expressions, or images can appear. Ideally, any text should wrap around this region automatically. The region I have in mind would be a rectangular region on the top right hand side of each slide.


Get this bounty!!!

#StackBounty: #beamer #babel #arabic #translator How to add and use Arabic dictionary translation for theorem, example,

Bounty: 100

With beamer babel translate strings like Figure, Table, Table of Contents, …. more strings like theorem, example, definition, ….. are translated with translator package for some languages. but Arabic language isn’t supported with translator. how can I add translation of those strings in Arabic?

% lualatex
documentclass{beamer}
usepackage[bidi=basic]{babel}
babelprovide[import=ar-DZ, main]{arabic}
babelfont{sf}{Amiri}
begin{document}
begin{frame}{Test}

todaypar 
contentsnamepar 
figurenamepar

hrulefill

% strings non translated

%
sectionnamepar 
begin{theorem}
end{theorem}

begin{example}
end{example}

begin{corollary}
end{corollary}

begin{definition}
end{definition}

end{frame}
end{document}

enter image description here

My aim is to use translator package, I have created Arabic dictionaries

translator-months-dictionary-Arabic.dict
translator-theorem-dictionary-Arabic.dict
translator-numbers-dictionary-Arabic.dict
translator-basic-dictionary-Arabic.dict
translator-bibliography-dictionary-Arabic.dict
translator-environment-dictionary-Arabic.dict 

For example contents of translator-numbers-dictionary-Arabic.dict file

ProvidesDictionary{translator-numbers-dictionary}{Arabic}

providetranslation{one}{واحد}
providetranslation{two}{اثنان}
providetranslation{three}{ثلاثة}
providetranslation{four}{أربعة}
providetranslation{five}{خمسة}
providetranslation{six}{ستة}
providetranslation{seven}{سبعة}
providetranslation{eight}{ثمانية}
providetranslation{nine}{تسعة}
providetranslation{ten}{عشرة}
providetranslation{eleven}{احدى عشرة}
providetranslation{twelve}{اثنى عشرة}

providetranslation{One}{واحد}
providetranslation{Two}{اثنان}
providetranslation{Three}{ثلاثة}
providetranslation{Four}{أربعة}
providetranslation{Five}{خمسة}
providetranslation{Six}{ستة}
providetranslation{Seven}{سبعة}
providetranslation{Eight}{ثمانية}
providetranslation{Nine}{تسعة}
providetranslation{Ten}{عشرة}
providetranslation{Eleven}{احدى عشرة}
providetranslation{Twelve}{اثنى عشرة}

providetranslation{first}{الأول}
providetranslation{second}{الثاني}
providetranslation{third}{الثالث}
providetranslation{fourth}{الرابع}
providetranslation{fifth}{الخامس}
providetranslation{sixth}{السادس}
providetranslation{seventh}{السابع}
providetranslation{eighth}{الثامن}
providetranslation{ninth}{التاسع}
providetranslation{tenth}{العاشر}
providetranslation{eleventh}{الحادي عشر}
providetranslation{twelfth}{الثاني عشر}

providetranslation{1st}{1.}
providetranslation{2nd}{2.}
providetranslation{3rd}{3.}
providetranslation{4th}{4.}
providetranslation{5th}{5.}
providetranslation{6th}{6.}
providetranslation{7th}{7.}
providetranslation{8th}{8.}
providetranslation{9th}{9.}
providetranslation{10th}{10.}
providetranslation{11th}{11.}
providetranslation{12th}{12.}

Then I have inserted this line to translator.sty to add Arabic option

DeclareOption{arabic}        {trans@use@and@alias{arabic}    {Arabic}}

And I try with this example which does not give the desired result

% lualatex
PassOptionsToPackage{arabic}{translator}
documentclass{beamer}
usepackage[bidi=basic]{babel}
babelprovide[import,main]{arabic}

babelfont{sf}{Amiri}

begin{document}
begin{frame}{Test}

begin{theorem}

end{theorem}

translate[to=Arabic]{one}

end{frame}
end{document}

enter image description here


Get this bounty!!!

#StackBounty: #beamer #header-footer #themes #frame-title #headline Beamertheme-focus insert a graphic (logo) at every frame which cont…

Bounty: 50

I am using the Beamer theme Focus. I’d like to insert a logo in the top-right of every slide (i.e. frame) that contains a frame title (ie. not a plain slide). I have tried a lot of hacks and frustrated at the inflexibility of hand-tuning co-ordinates for placing my image at the desired location. (All that I want is to place the image at the top-right).

For now, we may assume that I’d like to insert a generic cat picture from the www. I’d relly appreciate a solution for this problem.

Here’s an MWE for starters

documentclass{beamer}
usetheme{focus}

title{Focus: \ A Minimalist Beamer Theme}
subtitle{Subtitle}
author{Author 1texorpdfstring{\}{,} Author 2}
titlegraphic{includegraphics[scale=1.25]{focuslogo.pdf}}
institute{Institute Name \ Institute Address}
date{dd mm yyyy}

begin{document}
    begin{frame}
        maketitle
    end{frame}

    % Use starred version (e.g. section*{Section name})
    % to disable (sub)section page.
    section{Section 1}
    subsection{Subsection 1.1}
    begin{frame}{Simple frame}
        This is a simple frame.
    end{frame}

    begin{frame}[plain]{Plain frame}
        This is a frame with plain style and it is numbered.
    end{frame}

    subsection{Subsection 1.2}
    begin{frame}[t]
        This frame has an empty title and is aligned to top.
    end{frame}

    begin{frame}[noframenumbering]{No frame numbering}
        This frame is not numbered and is citing reference cite{knuth74}.
    end{frame}

    begin{frame}{Typesetting and Math}
        The packages texttt{inputenc} and texttt{FiraSans}footnote{url{https://fonts.google.com/specimen/Fira+Sans}}textsuperscript{,}footnote{url{http://mozilla.github.io/Fira/}} are used to properly set the main fonts.
        vfill
        This theme provides styling commands to typeset emph{emphasized}, alert{alerted}, textbf{bold}, textcolor{example}{example text}, dots
        vfill
        texttt{FiraSans} also provides support for mathematical symbols:
        begin{equation*}
            e^{ipi} + 1 = 0.
        end{equation*}
    end{frame}
end{document}


Get this bounty!!!