last day (15 days later) » 

2:08 PM
If you have time, could you help me understand why my attempt to develop an answer for a Beamer question did not work?
 
@aeroNotAuto Hi. I can try :) Can you please provide a link to the question/answer?
 
Sure...I didn't submit an answer yet, but the question is here
I was dumb enough to comment before trying anything since I thought I knew the answer...and now I regret that : /
I can show you code that I've tried though.
 
The answer to that question is not easy, I am afraid. Some internal redefinitions will be needed. Is your code too long?
 
Nah, not terribly long I don't think
All I added to the preamble was this:
\makeatletter
\newbox\secheadsize
\patchcmd{\slideentry}{
\multiply\beamer@tempdim by\beamer@xpos
\advance\beamer@tempdim by -\beamer@boxsize
\advance\beamer@tempdim by 1pt}{
\multiply\beamer@tempdim by\beamer@xpos
\advance\beamer@tempdim by -\beamer@boxsize
\advance\beamer@tempdim by 1pt
\setbox\secheadsize=\hbox{\usebeamerfont{section in head/foot}\insertsectionhead}
\advance\beamer@tempdim by \wd\secheadsize}{success?}{patched command failed}
\makeatother
Essentially, I thought I could recalculate the placement of the mini frames, so all that does is add two lines (the last two) to where I thought the calculation was
I expected it to move the mini frames to the right by the length of the corresponding section title, but it appears to either move the whole line of mini frames, or move all the mini frames by the length of the first section title (I was testing to make sure it worked, and hadn't gotten as far as centering them yet, just was trying to move each group of mini frames separately)
 
2:33 PM
A quick test shows that it is moving the miniframes according to the width of the second section title.
 
Oh? The second one only?
How did you discover that?
 
Add \insertsectionhead in your code:
\makeatletter
\newbox\secheadsize
\patchcmd{\slideentry}
  {\multiply\beamer@tempdim by\beamer@xpos
  \advance\beamer@tempdim by -\beamer@boxsize
  \advance\beamer@tempdim by 1pt}
  {\multiply\beamer@tempdim by\beamer@xpos
\advance\beamer@tempdim by -\beamer@boxsize
\advance\beamer@tempdim by 1pt
\setbox\secheadsize=\hbox{\usebeamerfont{section in head/foot}\insertsectionhead}%
\advance\beamer@tempdim by \wd\secheadsize\insertsectionhead%
}
  {}
  {}
\makeatother
Do a test with three sections and you will see that it's typesetting the title for the second section and moving the miniframes by an ammount equal to the width of that section title.
 
I show that it's using "Experimental Set-Up"
Isn't that the first section?
Regardless, do you know why it continues to use the same section, and doesn't update it?
 
@aeroNotAuto I used this code, taken from the question:
\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[demo]{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,shadows}
\usepackage[bars]{beamerthemetree}%Beamer theme v 2.2
\usepackage{beamerthemebars}
\usepackage{ifthen}
\usepackage{multimedia}
\mode<presentation>
\usepackage{ragged2e}
\usepackage{etoolbox}
\apptocmd{\frame}{\justifying}{}{}
\usepackage{multicol}
\addtobeamertemplate{block begin}{}{\justifying}

%Theme commands
\setbeamerfont{headline}{size=\footnotesize}
\setbeamerfont{section in head/foot}{size=\tiny}
 
Yea I get the same thing, for me it says it's using "Introduction"
Not "kjsdkljasdhjkashdguhg"
Oh wait, I see what you mean
If I take your example and my example...it looks like it's just using the longest section title that exists, and shifting by that
So does that mean the lengths are not being overwritten, and are ignored if they are smaller?
Oh, no just kidding. When I use your code, it appears to be moving it a distance that's twice the width of the first section title
I'm guessing 1x for \wd\secheadsize and 1x for \insertsectionhead
So back to the question...do you know why it only defines the box once, and doesn't do it for each section? Do I need to release the variable after using it?
 
2:51 PM
@aeroNotAuto Yes.
@aeroNotAuto Not right now. I'd have to take a look of the original code where the patching is done. But I can't promise I'll do it soon.
 
Oh okay, how might I scrub that variable from memory?
Oh, okay, no worries.
 
I'll leave a message here if I come to something.
Bye.
 

last day (15 days later) »