Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.86 KB | None | 0 0
  1. %%-----------------------------------------------------------------------
  2. %% progress bar in footline
  3. %% http://www.mrunix.de/forums/showpost.php?p=316577&postcount=3
  4. %% -----------------------------------------------------------------------
  5. definecolor{lightgr}{rgb}{0.7 0.7 0.7}
  6. makeatletter
  7. addtobeamertemplate{footline}{%
  8. color{lightgr}% to color the progressbar
  9. hspace*{-beamer@leftmargin}%
  10. rule{beamer@leftmargin}{2pt}%
  11. rlap{rule{dimexpr
  12. beamer@startpageofframedimexpr
  13. beamer@rightmargin+textwidthrelax/beamer@endpageofdocument}{1pt}}
  14. % next 'empty' line is mandatory!
  15.  
  16. vspace{0baselineskip}
  17. {}
  18. }
  19.  
  20. ! Dimension too large.
  21. <argument> ...amer@rightmargin +textwidth relax
  22. /beamer@endpageofdocument
  23. l.517 lyxframeend
  24.  
  25. documentclass{beamer}
  26. usepackage{tikz}
  27. usetikzlibrary{calc}
  28.  
  29. definecolor{pbblue}{HTML}{0A75A8}% filling color for the progress bar
  30. definecolor{pbgray}{HTML}{575757}% background color for the progress bar
  31.  
  32. makeatletter
  33. defprogressbar@progressbar{} % the progress bar
  34. newcountprogressbar@tmpcounta% auxiliary counter
  35. newcountprogressbar@tmpcountb% auxiliary counter
  36. newdimenprogressbar@pbht %progressbar height
  37. newdimenprogressbar@pbwd %progressbar width
  38. newdimenprogressbar@tmpdim % auxiliary dimension
  39.  
  40. progressbar@pbwd=linewidth
  41. progressbar@pbht=1.5ex
  42.  
  43. % the progress bar
  44. defprogressbar@progressbar{%
  45.  
  46. progressbar@tmpcounta=insertframenumber
  47. progressbar@tmpcountb=inserttotalframenumber
  48. progressbar@tmpdim=progressbar@pbwd
  49. multiplyprogressbar@tmpdim by progressbar@tmpcounta
  50. divideprogressbar@tmpdim by progressbar@tmpcountb
  51.  
  52. begin{tikzpicture}[rounded corners=2pt,very thin]
  53.  
  54. shade[top color=pbgray!20,bottom color=pbgray!20,middle color=pbgray!50]
  55. (0pt, 0pt) rectangle ++ (progressbar@pbwd, progressbar@pbht);
  56.  
  57. shade[draw=pbblue,top color=pbblue!50,bottom color=pbblue!50,middle color=pbblue] %
  58. (0pt, 0pt) rectangle ++ (progressbar@tmpdim, progressbar@pbht);
  59.  
  60. draw[color=normal text.fg!50]
  61. (0pt, 0pt) rectangle (progressbar@pbwd, progressbar@pbht)
  62. node[pos=0.5,color=normal text.fg] {textnormal{%
  63. pgfmathparse{insertframenumber*100/inserttotalframenumber}%
  64. pgfmathprintnumber[fixed,precision=2]{pgfmathresult},%%
  65. }%
  66. };
  67. end{tikzpicture}%
  68. }
  69.  
  70. addtobeamertemplate{headline}{}
  71. {%
  72. begin{beamercolorbox}[wd=paperwidth,ht=4ex,center,dp=1ex]{white}%
  73. progressbar@progressbar%
  74. end{beamercolorbox}%
  75. }
  76. makeatother
  77.  
  78. begin{document}
  79.  
  80. begin{frame}
  81. test
  82. end{frame}
  83.  
  84. begin{frame}
  85. test
  86. end{frame}
  87.  
  88. begin{frame}
  89. test
  90. end{frame}
  91.  
  92. begin{frame}
  93. test
  94. end{frame}
  95.  
  96. end{document}
  97.  
  98. documentclass{beamer}
  99. usepackage{tikz}
  100. usetikzlibrary{calc}
  101.  
  102. definecolor{pbblue}{HTML}{0A75A8}% color for the progress bar and the circle
  103.  
  104. makeatletter
  105. defprogressbar@progressbar{} % the progress bar
  106. newcountprogressbar@tmpcounta% auxiliary counter
  107. newcountprogressbar@tmpcountb% auxiliary counter
  108. newdimenprogressbar@pbht %progressbar height
  109. newdimenprogressbar@pbwd %progressbar width
  110. newdimenprogressbar@rcircle % radius for the circle
  111. newdimenprogressbar@tmpdim % auxiliary dimension
  112.  
  113. progressbar@pbwd=linewidth
  114. progressbar@pbht=1pt
  115. progressbar@rcircle=2.5pt
  116.  
  117. % the progress bar
  118. defprogressbar@progressbar{%
  119.  
  120. progressbar@tmpcounta=insertframenumber
  121. progressbar@tmpcountb=inserttotalframenumber
  122. progressbar@tmpdim=progressbar@pbwd
  123. multiplyprogressbar@tmpdim by progressbar@tmpcounta
  124. divideprogressbar@tmpdim by progressbar@tmpcountb
  125.  
  126. begin{tikzpicture}
  127. draw[pbblue!30,line width=progressbar@pbht]
  128. (0pt, 0pt) -- ++ (progressbar@pbwd,0pt);
  129.  
  130. filldraw[pbblue!30] %
  131. (thedimexprprogressbar@tmpdim-progressbar@rcirclerelax, .5progressbar@pbht) circle (progressbar@rcircle);
  132.  
  133. node[draw=pbblue!30,text width=3.5em,align=center,inner sep=1pt,
  134. text=pbblue!70,anchor=east] at (0,0) {insertframenumber/inserttotalframenumber};
  135. end{tikzpicture}%
  136. }
  137.  
  138. addtobeamertemplate{headline}{}
  139. {%
  140. begin{beamercolorbox}[wd=paperwidth,ht=4ex,center,dp=1ex]{white}%
  141. progressbar@progressbar%
  142. end{beamercolorbox}%
  143. }
  144. makeatother
  145.  
  146. begin{document}
  147.  
  148. begin{frame}
  149. test
  150. end{frame}
  151.  
  152. begin{frame}
  153. test
  154. end{frame}
  155.  
  156. begin{frame}
  157. test
  158. end{frame}
  159.  
  160. begin{frame}
  161. test
  162. end{frame}
  163.  
  164. end{document}
  165.  
  166. documentclass{beamer}
  167. usepackage{tikz}
  168. usetikzlibrary{calc}
  169.  
  170. definecolor{pbgray}{HTML}{575757}% background color for the progress bar
  171.  
  172. makeatletter
  173. defprogressbar@progressbar{} % the progress bar
  174. newcountprogressbar@tmpcounta% auxiliary counter
  175. newcountprogressbar@tmpcountb% auxiliary counter
  176. newdimenprogressbar@pbht %progressbar height
  177. newdimenprogressbar@pbwd %progressbar width
  178. newdimenprogressbar@tmpdim % auxiliary dimension
  179.  
  180. progressbar@pbwd=linewidth
  181. progressbar@pbht=1pt
  182.  
  183. % the progress bar
  184. defprogressbar@progressbar{%
  185.  
  186. progressbar@tmpcounta=insertframenumber
  187. progressbar@tmpcountb=inserttotalframenumber
  188. progressbar@tmpdim=progressbar@pbwd
  189. multiplyprogressbar@tmpdim by progressbar@tmpcounta
  190. divideprogressbar@tmpdim by progressbar@tmpcountb
  191.  
  192. begin{tikzpicture}[very thin]
  193. draw[pbgray!30,line width=progressbar@pbht]
  194. (0pt, 0pt) -- ++ (progressbar@pbwd,0pt);
  195. draw[draw=none] (progressbar@pbwd,0pt) -- ++ (2pt,0pt);
  196.  
  197. draw[fill=pbgray!30,draw=pbgray] %
  198. ( $ (progressbar@tmpdim, progressbar@pbht) + (0,1.5pt) $ ) -- ++(60:3pt) -- ++(180:3pt) ;
  199.  
  200. node[draw=pbgray!30,text width=3.5em,align=center,inner sep=1pt,
  201. text=pbgray!70,anchor=east] at (0,0) {insertframenumber/inserttotalframenumber};
  202. end{tikzpicture}%
  203. }
  204.  
  205. addtobeamertemplate{headline}{}
  206. {%
  207. begin{beamercolorbox}[wd=paperwidth,ht=5ex,center,dp=1ex]{white}%
  208. progressbar@progressbar%
  209. end{beamercolorbox}%
  210. }
  211. makeatother
  212.  
  213. begin{document}
  214.  
  215. begin{frame}
  216. test
  217. end{frame}
  218.  
  219. begin{frame}
  220. test
  221. end{frame}
  222.  
  223. begin{frame}
  224. test
  225. end{frame}
  226.  
  227. begin{frame}
  228. test
  229. end{frame}
  230.  
  231. end{document}
  232.  
  233. usemodule[visualcounter]
  234.  
  235.  
  236. definevisualcounter
  237. [pagevisualized] % visualizer
  238. [progressbar] % inherit from
  239. [counter=userpage]
  240.  
  241.  
  242. usevisualcounter{pagevisualizer}
  243.  
  244. documentclass{beamer}
  245. usetheme{Darmstadt}
  246. usepackage{tikz}
  247. usetikzlibrary{calc}
  248. usepackage{xifthen}
  249.  
  250. makeatletter
  251. newcommand{Progressbar@LabelColor}{black}
  252. newcommand{Progressbar@LabelText}{Label}
  253. newcommand{Progressbar@LabelWidth}{5}
  254. % Farbe, Text, Breite des Labels
  255.  
  256. newcommand{Progressbar@BarWidth}{10}
  257. newcommand{Progressbar@BarHeight}{1}
  258. newcommand{Progressbar@BarColor}{yellow}
  259. newcommand{Progressbar@BarBorder}{black}
  260. % Breite, Höhe, Schriftfarbe des Prozentsatzes, Rahmenfarbe des Fortschrittbalkens
  261.  
  262. newcommand{Progressbar@TodoA}{gray}
  263. newcommand{Progressbar@TodoB}{black}
  264. % Farbe 1 und 2 für den unerledigten Teil
  265.  
  266. newcommand{Progressbar@DoneA}{red}
  267. newcommand{Progressbar@DoneB}{blue}
  268. % Farbe 1 und 2 für den erledigten Teil
  269.  
  270. newcommand{Progressbar@Direction}{LTR}
  271. % Modus links nach rechts oder umgekehrt; umgekehrt ist buggy (no support yet)
  272.  
  273. newcommand{Progressbar@Completion}{50}
  274. % Fertigstellung in Prozent
  275.  
  276. define@key{Progressbar}{LabelColor}[Progressbar@LabelColor]{renewcommand{Progressbar@LabelColor}{#1}}
  277. define@key{Progressbar}{LabelText}[Progressbar@LabelText]{renewcommand{Progressbar@LabelText}{#1}}
  278. define@key{Progressbar}{LabelWidth}[Progressbar@LabelWidth]{renewcommand{Progressbar@LabelWidth}{#1}}
  279.  
  280. define@key{Progressbar}{BarWidth}[Progressbar@BarWidth]{renewcommand{Progressbar@BarWidth}{#1}}
  281. define@key{Progressbar}{BarHeight}[Progressbar@BarHeight]{renewcommand{Progressbar@BarHeight}{#1}}
  282. define@key{Progressbar}{BarColor}[Progressbar@BarColor]{renewcommand{Progressbar@BarColor}{#1}}
  283.  
  284. define@key{Progressbar}{BarBorder}[Progressbar@BarBorder]{renewcommand{Progressbar@BarBorder}{#1}}
  285. define@key{Progressbar}{TodoA}[Progressbar@TodoA]{renewcommand{Progressbar@TodoA}{#1}}
  286. define@key{Progressbar}{TodoB}[Progressbar@TodoB]{renewcommand{Progressbar@TodoB}{#1}}
  287.  
  288. define@key{Progressbar}{DoneA}[Progressbar@DoneA]{renewcommand{Progressbar@DoneA}{#1}}
  289. define@key{Progressbar}{DoneB}[Progressbar@DoneB]{renewcommand{Progressbar@DoneB}{#1}}
  290. define@key{Progressbar}{Direction}[Progressbar@Direction]{renewcommand{Progressbar@Direction}{#1}}
  291.  
  292. define@key{Progressbar}{Completion}[Progressbar@Completion]{renewcommand{Progressbar@Completion}{#1}}
  293.  
  294. newcommand{Progressbar}[1]%
  295. { setkeys{Progressbar}{#1}
  296. % Progress Bars --------------------------------------------------
  297. begin{tikzpicture}[overlay, remember picture,shift={($(current page.south west)+(0.1,0.1)$)}]
  298.  
  299. ifthenelse{ ( Progressbar@Completion = 0 ) or ( Progressbar@Completion = 100 ) }
  300. { newcommand{TCA}{Progressbar@TodoA}
  301. newcommand{TCB}{Progressbar@TodoB}
  302. newcommand{DCA}{Progressbar@DoneA}
  303. newcommand{DCB}{Progressbar@DoneB}
  304. }
  305. { newcommand{TCA}{Progressbar@TodoB !Progressbar@Completion !Progressbar@TodoA}
  306. newcommand{TCB}{Progressbar@TodoB}
  307. newcommand{DCA}{Progressbar@DoneA}
  308. newcommand{DCB}{Progressbar@DoneB !Progressbar@Completion !Progressbar@DoneA}
  309. }
  310. ifthenelse{equal{Progressbar@Direction}{LTR}}
  311. { shade[left color=DCA,right color=DCB]%
  312. (0,0) rectangle (Progressbar@Completion * Progressbar@BarWidth / 100,Progressbar@BarHeight);
  313. shade[left color=TCA,right color=TCB]%
  314. (Progressbar@Completion * Progressbar@BarWidth / 100,0)%
  315. rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  316. }
  317. { shade[left color=TCB,right color=TCA]%
  318. (0,0) rectangle (Progressbar@Completion * Progressbar@BarWidth / 100,Progressbar@BarHeight);
  319. shade[left color=DCB,right color=DCA]%
  320. (Progressbar@Completion * Progressbar@BarWidth / 100,0)%
  321. rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  322. }
  323. draw (0,0) rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  324. node[color=Progressbar@BarColor] at%
  325. (Progressbar@BarWidth / 10,Progressbar@BarHeight / 2) {Progressbar@Completion %};
  326. draw[color=white] (- Progressbar@LabelWidth,0) -- %
  327. node[anchor=west,color=Progressbar@LabelColor,text width=Progressbar@LabelWidth]%
  328. {Progressbar@LabelText} (- Progressbar@LabelWidth,Progressbar@BarHeight) ;
  329. % typeout{todo c1 = TCA}
  330. % typeout{todo c2 = TCB}
  331. % typeout{done c1 = DCA}
  332. % typeout{done c2 = DCB}
  333. end{tikzpicture}
  334. }
  335. makeatother
  336.  
  337. logo { pgfmathsetmacro{wid}{thepaperwidth/28.45276-0.2}
  338. pgfmathtruncatemacro{prog}{100*insertpagenumber/insertdocumentendpage}
  339. Progressbar{ LabelColor=yellow,%
  340. LabelText=,%
  341. LabelWidth=0,%
  342. BarWidth=wid,%
  343. BarHeight=0.3,%
  344. BarColor=green,%
  345. BarBorder=black,%
  346. TodoA=orange!20!gray,%
  347. TodoB=orange!80!gray,%
  348. DoneA=blue!80!cyan,%
  349. DoneB=blue!20!cyan,%
  350. Completion=prog%
  351. }
  352. }
  353.  
  354. begin{document}
  355.  
  356. begin{frame}
  357. only<1>{Sha la la.}
  358. only<2>{Shu bi du.}
  359. only<3>{Tri Tra.}
  360. only<4>{Trullala.}
  361.  
  362. page - frame - totalpages : insertpagenumber - insertframenumber - insertdocumentendpage
  363. end{frame}
  364.  
  365. begin{frame}
  366. only<1>{One.}
  367. only<2>{Zwei.}
  368. only<3>{Tri.}
  369. only<4>{Quattro.}
  370. only<5>{Cinq.}
  371. only<6>{Seis.}
  372. only<7>{Siedem.}
  373. only<8>{Kahdeksan.}
  374.  
  375. page - frame - totalpages : insertpagenumber - insertframenumber - insertdocumentendpage
  376. end{frame}
  377.  
  378. end{document}
  379.  
  380. documentclass{beamer}
  381. usetheme{Darmstadt}
  382. usepackage{tikz}
  383. usetikzlibrary{calc}
  384. usepackage{xifthen}
  385.  
  386. makeatletter
  387. newcommand{Progressbar@BarWidth}{10}
  388. newcommand{Progressbar@BarHeight}{1}
  389. newcommand{Progressbar@BarColor}{yellow}
  390. newcommand{Progressbar@BarBorder}{black}
  391. newcommand{Progressbar@BarPosition}{10}
  392. % Breite, Höhe, Schriftfarbe des Prozentsatzes, Rahmenfarbe, Bechriftungsposition des Fortschrittbalkens
  393.  
  394. newcommand{Progressbar@TodoA}{gray}
  395. newcommand{Progressbar@TodoB}{black}
  396. % Farbe 1 und 2 für den unerledigten Teil
  397.  
  398. newcommand{Progressbar@DoneA}{red}
  399. newcommand{Progressbar@DoneB}{blue}
  400. % Farbe 1 und 2 für den erledigten Teil
  401.  
  402. newcommand{Progressbar@Direction}{LTR}
  403. % Modus links nach rechts oder umgekehrt; umgekehrt ist buggy (no support yet)
  404.  
  405. newcommand{Progressbar@Completion}{50}
  406. % Fertigstellung in Prozent
  407.  
  408. define@key{Progressbar}{BarWidth}[Progressbar@BarWidth]{renewcommand{Progressbar@BarWidth}{#1}}
  409. define@key{Progressbar}{BarHeight}[Progressbar@BarHeight]{renewcommand{Progressbar@BarHeight}{#1}}
  410. define@key{Progressbar}{BarColor}[Progressbar@BarColor]{renewcommand{Progressbar@BarColor}{#1}}
  411.  
  412. define@key{Progressbar}{BarBorder}[Progressbar@BarBorder]{renewcommand{Progressbar@BarBorder}{#1}}
  413. define@key{Progressbar}{BarPosition}[Progressbar@BarPosition]{renewcommand{Progressbar@BarPosition}{#1}}
  414. define@key{Progressbar}{TodoA}[Progressbar@TodoA]{renewcommand{Progressbar@TodoA}{#1}}
  415.  
  416. define@key{Progressbar}{TodoB}[Progressbar@TodoB]{renewcommand{Progressbar@TodoB}{#1}}
  417. define@key{Progressbar}{DoneA}[Progressbar@DoneA]{renewcommand{Progressbar@DoneA}{#1}}
  418. define@key{Progressbar}{DoneB}[Progressbar@DoneB]{renewcommand{Progressbar@DoneB}{#1}}
  419.  
  420. define@key{Progressbar}{Direction}[Progressbar@Direction]{renewcommand{Progressbar@Direction}{#1}}
  421. define@key{Progressbar}{Completion}[Progressbar@Completion]{renewcommand{Progressbar@Completion}{#1}}
  422.  
  423. newcommand{Progressbar}[1]%
  424. { setkeys{Progressbar}{#1}
  425. % Progress Bars --------------------------------------------------
  426. begin{tikzpicture}[overlay, remember picture,shift={($(current page.south west)+(0.1,0.1)$)}]
  427. draw[draw=Progressbar@BarBorder,ultra thick] (0,0) rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  428. ifthenelse{equal{Progressbar@Direction}{LTR}}
  429. { shade[left color=Progressbar@TodoA,right color=Progressbar@TodoB]%
  430. (0,0) rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  431. begin{scope}
  432. clip (0,0) rectangle (Progressbar@Completion * Progressbar@BarWidth / 100,Progressbar@BarHeight);
  433. shade[left color=Progressbar@DoneA,right color=Progressbar@DoneB]%
  434. (0,0) rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  435. end{scope}
  436. }
  437. { shade[left color=Progressbar@TodoB,right color=Progressbar@TodoA]%
  438. (0,0) rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  439. begin{scope}
  440. clip ({(100-Progressbar@Completion) * Progressbar@BarWidth / 100},0)%
  441. rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  442. shade[left color=Progressbar@DoneB,right color=Progressbar@DoneA]%
  443. (0,0) rectangle (Progressbar@BarWidth,Progressbar@BarHeight);
  444. end{scope}
  445. }
  446. node[color=Progressbar@BarColor] at%
  447. (Progressbar@BarWidth / 100 * Progressbar@BarPosition,Progressbar@BarHeight / 2) {Progressbar@Completion %};
  448. end{tikzpicture}
  449. }
  450. makeatother
  451.  
  452. logo { pgfmathsetmacro{wid}{thepaperwidth/28.45276-0.2}
  453. pgfmathtruncatemacro{prog}{100*insertpagenumber/insertdocumentendpage}
  454. pgfmathtruncatemacro{mybarpos}{104-prog}
  455. Progressbar{ BarWidth=wid,%
  456. BarHeight=0.3,%
  457. BarColor=green,%
  458. BarBorder=none,%
  459. BarPosition=mybarpos,%
  460. TodoA=orange!20!gray,%
  461. TodoB=orange!80!gray,%
  462. DoneA=blue!80!cyan,%
  463. DoneB=blue!20!cyan,%
  464. Completion=prog,%
  465. Direction=RTL,%
  466. }
  467. }
  468.  
  469. begin{document}
  470.  
  471. begin{frame}
  472. only<1>{Sha la la.}
  473. only<2>{Shu bi du.}
  474. only<3>{Tri Tra.}
  475. only<4>{Trullala.}
  476.  
  477. page - frame - totalpages : insertpagenumber - insertframenumber - insertdocumentendpage
  478. end{frame}
  479.  
  480. begin{frame}
  481. only<1>{One.}
  482. only<2>{Zwei.}
  483. only<3>{Tri.}
  484. only<4>{Quattro.}
  485. only<5>{Cinq.}
  486. only<6>{Seis.}
  487. only<7>{Siedem.}
  488. only<8>{Kahdeksan.}
  489.  
  490. page - frame - totalpages : insertpagenumber - insertframenumber - insertdocumentendpage
  491. end{frame}
  492.  
  493. end{document}
  494.  
  495. makeatletter
  496.  
  497. AtBeginSection[]{frame{sectionpage}}
  498. AtBeginSubsection[]{frame{subsectionpage}}
  499.  
  500. newcommand{my@bigsize}{9}
  501. newcommand{my@medsize}{7}
  502. newcommand{my@smallsize}{5}
  503.  
  504. newlength{my@tempsize}
  505.  
  506. newcounter{my@sectnum}
  507.  
  508. newcommand{my@lastdigit}[1]{%
  509. loopifnumvalue{#1}>9addtocounter{#1}{-10}repeat
  510. arabic{#1}%
  511. }
  512.  
  513. newcommandmy@fixedbox[2]{%
  514. makebox[#1]{rule[-1ex]{0pt}{3.25ex}#2}%
  515. }
  516.  
  517. newcommandmy@colorbox[3]{%
  518. {setlength{fboxsep}{0pt}colorbox{#1}{my@fixedbox{#2}{#3}}}%
  519. }
  520.  
  521. defmy@temptext{}
  522.  
  523. newcommand{my@navbox}[1][]{%
  524. ifrelaxdetokenize{#1}relax
  525. defmy@tempbox{my@fixedbox}%
  526. else
  527. defmy@tempbox{my@colorbox{#1}}%
  528. fi
  529. ifxmy@boxmy@bigbox
  530. defmy@temptext{my@lastdigit{my@sectnum}}%
  531. fi
  532. ifxmy@boxmy@medbox
  533. defmy@temptext{$diamond$}%
  534. fi
  535. ifxmy@boxmy@smallbox
  536. defmy@temptext{$-$}%
  537. fi
  538. my@tempbox{my@tempsize}{my@temptext}%
  539. }
  540.  
  541. defbeamertemplate{navigation box}{home}{%
  542. setlength{my@tempsize}{my@box@size pt}%
  543. my@colorbox{teal!60}{my@tempsize}{$equiv$}%
  544. }
  545.  
  546. defbeamertemplate{navigation box}{done}{%
  547. setlength{my@tempsize}{my@box@size pt}%
  548. my@navbox[teal!60]%
  549. }
  550.  
  551. defbeamertemplate{navigation box}{todo}{%
  552. setlength{my@tempsize}{my@box@size pt}%
  553. my@navbox
  554. }
  555.  
  556. newcommand{my@bigbox}{globalletmy@box@size=my@bigsizeusebeamertemplate{navigation box}}
  557. newcommand{my@medbox}{globalletmy@box@size=my@medsizeusebeamertemplate{navigation box}}
  558. newcommand{my@smallbox}{globalletmy@box@size=my@smallsizeusebeamertemplate{navigation box}}
  559.  
  560. renewcommand{sectionentry}[5]{globalletmy@box=my@bigboxsetcounter{my@sectnum}{#1}}
  561. renewcommand{beamer@subsectionentry}[5]{globalletmy@box=my@medbox}
  562.  
  563. renewcommand{slideentry}[6]{%
  564. defmy@temp@i{1/1}%
  565. defmy@temp@ii{#4}%
  566. ifxmy@temp@imy@temp@ii % title page
  567. setbeamertemplate{navigation box}[home]%
  568. else
  569. setbeamertemplate{navigation box}[done]%
  570. fi
  571. ifnumc@section<#1%
  572. setbeamertemplate{navigation box}[todo]%
  573. else
  574. ifnumc@section=#1ifnumc@subsection<#2%
  575. setbeamertemplate{navigation box}[todo]%
  576. else
  577. ifnumc@subsection=#2ifnumc@subsectionslide<#3%
  578. setbeamertemplate{navigation box}[todo]%
  579. fifi
  580. fifi
  581. fi
  582. ifxmy@temp@imy@temp@ii % title page
  583. beamer@link(#4){my@bigbox}%
  584. else
  585. beamer@link(#4){my@box}%
  586. fi
  587. globalletmy@box=my@smallbox
  588. }
  589.  
  590. defbeamertemplate{footline}{progress}
  591. {%
  592. {color{teal}hrule}hbox{%
  593. begin{beamercolorbox}[wd=.8paperwidth,ht=2.25ex,dp=1ex,left]{footline}%
  594. kern2emdohead
  595. end{beamercolorbox}%
  596. begin{beamercolorbox}[wd=.2paperwidth,ht=2.25ex,dp=1ex,right]{footline}%
  597. insertframenumber{}/inserttotalframenumberkern2em
  598. end{beamercolorbox}%
  599. }%
  600. }
  601.  
  602. setbeamertemplate{navigation symbols}{}
  603. setbeamertemplate{footline}[progress]
  604.  
  605. makeatother
  606.  
  607. documentclass{beamer}
  608.  
  609. useoutertheme{progress}
  610. setbeamercolor{background canvas}{bg=lightgray}
  611.  
  612. begin{document}
  613.  
  614. title{Beamer Theme Math}
  615. author{Author Name}
  616.  
  617. begin{frame}
  618. titlepage
  619. end{frame}
  620.  
  621. section{Name One}
  622.  
  623. subsection{Subname One}
  624.  
  625. begin{frame}{Frame Title}
  626. Frame insertframenumber
  627. end{frame}
  628.  
  629. begin{frame}{Frame Title}
  630. Frame insertframenumber
  631. end{frame}
  632.  
  633. begin{frame}{Frame Title}
  634. Frame insertframenumber
  635. end{frame}
  636.  
  637. begin{frame}{Frame Title}
  638. Frame insertframenumber
  639. end{frame}
  640.  
  641. subsection{Subname Two}
  642.  
  643. begin{frame}{Frame Title}
  644. Frame insertframenumber
  645. end{frame}
  646.  
  647. begin{frame}{Frame Title}
  648. Frame insertframenumber
  649. end{frame}
  650.  
  651. begin{frame}{Frame Title}
  652. Frame insertframenumber
  653. end{frame}
  654.  
  655. subsection{Subname Three}
  656.  
  657. begin{frame}{Frame Title}
  658. Frame insertframenumber
  659. end{frame}
  660.  
  661. begin{frame}{Frame Title}
  662. Frame insertframenumber
  663. end{frame}
  664.  
  665. begin{frame}{Frame Title}
  666. Frame insertframenumber
  667. end{frame}
  668.  
  669. begin{frame}{Frame Title}
  670. Frame insertframenumber
  671. end{frame}
  672.  
  673. begin{frame}{Frame Title}
  674. Frame insertframenumber
  675. end{frame}
  676.  
  677. section{Name Two}
  678.  
  679. subsection{Subname One}
  680.  
  681. begin{frame}{Frame Title}
  682. Frame insertframenumber
  683. end{frame}
  684.  
  685. begin{frame}{Frame Title}
  686. Frame insertframenumber
  687. end{frame}
  688.  
  689. begin{frame}{Frame Title}
  690. Frame insertframenumber
  691. end{frame}
  692.  
  693. begin{frame}{Frame Title}
  694. Frame insertframenumber
  695. end{frame}
  696.  
  697. subsection{Subname Two}
  698.  
  699. begin{frame}{Frame Title}
  700. Frame insertframenumber
  701. end{frame}
  702.  
  703. begin{frame}{Frame Title}
  704. Frame insertframenumber
  705. end{frame}
  706.  
  707. begin{frame}{Frame Title}
  708. Frame insertframenumber
  709. end{frame}
  710.  
  711. subsection{Subname Three}
  712.  
  713. begin{frame}{Frame Title}
  714. Frame insertframenumber
  715. end{frame}
  716.  
  717. begin{frame}{Frame Title}
  718. Frame insertframenumber
  719. end{frame}
  720.  
  721. begin{frame}{Frame Title}
  722. Frame insertframenumber
  723. end{frame}
  724.  
  725. begin{frame}{Frame Title}
  726. Frame insertframenumber
  727. end{frame}
  728.  
  729. section{Name Three}
  730.  
  731. subsection{Subname One}
  732.  
  733. begin{frame}{Frame Title}
  734. Frame insertframenumber
  735. end{frame}
  736.  
  737. begin{frame}{Frame Title}
  738. Frame insertframenumber
  739. end{frame}
  740.  
  741. begin{frame}{Frame Title}
  742. Frame insertframenumber
  743. end{frame}
  744.  
  745. begin{frame}{Frame Title}
  746. Frame insertframenumber
  747. end{frame}
  748.  
  749. subsection{Subname Two}
  750.  
  751. begin{frame}{Frame Title}
  752. Frame insertframenumber
  753. end{frame}
  754.  
  755. begin{frame}{Frame Title}
  756. Frame insertframenumber
  757. end{frame}
  758.  
  759. begin{frame}{Frame Title}
  760. Frame insertframenumber
  761. end{frame}
  762.  
  763. subsection{Subname Three}
  764.  
  765. begin{frame}{Frame Title}
  766. Frame insertframenumber
  767. end{frame}
  768.  
  769. begin{frame}{Frame Title}
  770. Frame insertframenumber
  771. end{frame}
  772.  
  773. end{document}
  774.  
  775. setbeamercolor{progress bar progress}{use=progress bar,bg=progress bar.fg}
  776. defbeamertemplate{footline}{progress bar}{
  777. dimen0=paperwidth
  778. multiplydimen0 by insertframenumber
  779. dividedimen0 by inserttotalframenumber
  780. edefprogressbarwidth{thedimen0}
  781.  
  782. leavevmode%
  783. begin{beamercolorbox}[wd=paperwidth,ht=1.75ex,dp=1ex]{progress bar}
  784. begin{beamercolorbox}[wd=progressbarwidth,ht=1.75ex,dp=1ex]{progress bar progress}
  785. end{beamercolorbox}%
  786. end{beamercolorbox}%
  787. }
  788.  
  789. setbeamertemplate{footline}[progress bar]
  790. setbeamercolor{progress bar}{fg=blue!50!black,bg=white!50!black}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement