What is the most bizarre thing you have seen done with TeX












144















I think the questions says it all! :)



By TeX, I mean any derivative of TeX as long as the code is clearly a derivative of TeX, i.e. that it could belong on TeX.SX (and not pure Lua for example).



I'll give two answers myself so you see what I mean.










share|improve this question




















  • 8





    Fully-related: What can't TeX do?

    – Werner
    Mar 25 '13 at 18:55






  • 14





    We tried to elect the Pope. Maybe next time. :)

    – Paulo Cereda
    Mar 25 '13 at 19:05






  • 3





    Related, or somewhat similar: tex.stackexchange.com/questions/53082/…

    – zeroth
    Mar 25 '13 at 19:31






  • 3





    Related:Self-replicating (La)TeX document

    – texenthusiast
    Mar 25 '13 at 20:43






  • 4





    Related Are there other “fun” packages like the “coffee stains” package?

    – texenthusiast
    Mar 25 '13 at 21:07


















144















I think the questions says it all! :)



By TeX, I mean any derivative of TeX as long as the code is clearly a derivative of TeX, i.e. that it could belong on TeX.SX (and not pure Lua for example).



I'll give two answers myself so you see what I mean.










share|improve this question




















  • 8





    Fully-related: What can't TeX do?

    – Werner
    Mar 25 '13 at 18:55






  • 14





    We tried to elect the Pope. Maybe next time. :)

    – Paulo Cereda
    Mar 25 '13 at 19:05






  • 3





    Related, or somewhat similar: tex.stackexchange.com/questions/53082/…

    – zeroth
    Mar 25 '13 at 19:31






  • 3





    Related:Self-replicating (La)TeX document

    – texenthusiast
    Mar 25 '13 at 20:43






  • 4





    Related Are there other “fun” packages like the “coffee stains” package?

    – texenthusiast
    Mar 25 '13 at 21:07
















144












144








144


76






I think the questions says it all! :)



By TeX, I mean any derivative of TeX as long as the code is clearly a derivative of TeX, i.e. that it could belong on TeX.SX (and not pure Lua for example).



I'll give two answers myself so you see what I mean.










share|improve this question
















I think the questions says it all! :)



By TeX, I mean any derivative of TeX as long as the code is clearly a derivative of TeX, i.e. that it could belong on TeX.SX (and not pure Lua for example).



I'll give two answers myself so you see what I mean.







fun big-list






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 1 '14 at 3:21


























community wiki





2 revs, 2 users 100%
Xavier









  • 8





    Fully-related: What can't TeX do?

    – Werner
    Mar 25 '13 at 18:55






  • 14





    We tried to elect the Pope. Maybe next time. :)

    – Paulo Cereda
    Mar 25 '13 at 19:05






  • 3





    Related, or somewhat similar: tex.stackexchange.com/questions/53082/…

    – zeroth
    Mar 25 '13 at 19:31






  • 3





    Related:Self-replicating (La)TeX document

    – texenthusiast
    Mar 25 '13 at 20:43






  • 4





    Related Are there other “fun” packages like the “coffee stains” package?

    – texenthusiast
    Mar 25 '13 at 21:07
















  • 8





    Fully-related: What can't TeX do?

    – Werner
    Mar 25 '13 at 18:55






  • 14





    We tried to elect the Pope. Maybe next time. :)

    – Paulo Cereda
    Mar 25 '13 at 19:05






  • 3





    Related, or somewhat similar: tex.stackexchange.com/questions/53082/…

    – zeroth
    Mar 25 '13 at 19:31






  • 3





    Related:Self-replicating (La)TeX document

    – texenthusiast
    Mar 25 '13 at 20:43






  • 4





    Related Are there other “fun” packages like the “coffee stains” package?

    – texenthusiast
    Mar 25 '13 at 21:07










8




8





Fully-related: What can't TeX do?

– Werner
Mar 25 '13 at 18:55





Fully-related: What can't TeX do?

– Werner
Mar 25 '13 at 18:55




14




14





We tried to elect the Pope. Maybe next time. :)

– Paulo Cereda
Mar 25 '13 at 19:05





We tried to elect the Pope. Maybe next time. :)

– Paulo Cereda
Mar 25 '13 at 19:05




3




3





Related, or somewhat similar: tex.stackexchange.com/questions/53082/…

– zeroth
Mar 25 '13 at 19:31





Related, or somewhat similar: tex.stackexchange.com/questions/53082/…

– zeroth
Mar 25 '13 at 19:31




3




3





Related:Self-replicating (La)TeX document

– texenthusiast
Mar 25 '13 at 20:43





Related:Self-replicating (La)TeX document

– texenthusiast
Mar 25 '13 at 20:43




4




4





Related Are there other “fun” packages like the “coffee stains” package?

– texenthusiast
Mar 25 '13 at 21:07







Related Are there other “fun” packages like the “coffee stains” package?

– texenthusiast
Mar 25 '13 at 21:07












15 Answers
15






active

oldest

votes


















103














I think that Steve Hicks controller for a Mars Rover programmed in TeX is a good candidate: ICFP Contest 2008 - Mars rover in TeX.






share|improve this answer





















  • 4





    The writeup for this one is epic, as such tales usually are.

    – Ryan Reich
    Mar 25 '13 at 20:09






  • 1





    Sadly the link is not accessible at least from my area :(

    – JouleV
    Mar 26 at 15:18











  • @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

    – Martin Heller
    Mar 26 at 19:38











  • @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

    – JouleV
    Mar 27 at 4:48



















84














Adding coffee stains to your documents



If my documents don't have those stains, my boss / students think(s) I don't drink coffee. If he or they think I am not drinking coffee, they believe I am slacking. Thanks Hanno!






share|improve this answer





















  • 8





    Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

    – knut
    Mar 25 '13 at 20:05



















64














David Carlisle's Christmas 'card' at http://www.ctan.org/pkg/xii.
In fact, here it is: run this through plain TeX:



let~catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
:76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye


A good collection of Enjoy TeX pearls diving! at GUST, Polish TeX Users Group



For more Pearls of TeX programming at TUGboat ,Volume 26 (2005), No. 3.






share|improve this answer





















  • 7





    Could anyone please explain how it works?

    – Uwe Ziegenhagen
    Mar 25 '13 at 20:11






  • 13





    @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

    – Xavier
    Mar 25 '13 at 20:17








  • 17





    @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

    – David Carlisle
    Mar 25 '13 at 20:55






  • 10





    If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

    – David Carlisle
    Mar 25 '13 at 21:21






  • 2





    For something similar, and a detailed explanation of the code, see Can you explain how this code works?

    – Werner
    Mar 29 '13 at 19:53



















49














a basic interpreter written in tex.



see the tugboat article.






share|improve this answer





















  • 2





    Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

    – Canageek
    Mar 25 '13 at 18:59



















46














Our own Bruno LeFloch who wrote a Reversi game which runs in the console:



(Please don't try to reformat the code displayed below unless you really know what you are doing; if you do attempt a reformat, try to compile the resulting code before replacing the code here.)



% !TEX TS-program = tex
longdef3#1#2#3{}vsize5cmhsize4cmnewlinechar`*def~#1{catcode`#113~}
~QSU_VWJKLMNO@XY(|+Z'"z:qj^;/)!, ${*133}
def~#1#2{let#1#2~}~*cr[ifnum(ifcaseOor|else]fiNnumber@advanceX
expandafterZglobalYmessage~defj{[0<Q[9>Q[0<J[9>J^|_]|_]|_]|_]}
~+{count1}+1=9~_#1{@+1 1countdef#1+1_}_QJVSKWUL,'"$H!_-1'1"2+44'+55'+45"+54"~^{+NQNJ}
~:#1{#11#12#13#14#15#16#17#18}
~M#1{Y{#1}#1}~h#1#2{M#2:{ q#1}&M#2&M{*}}~q#1#2{&M{(+#1#2 O-O0]}}
~/{Y{Row and column? e.g. E6*}read_toMXjmeaningM ;}
~j#1->#2#3#4;{Q`#2@Q-`@J`#3@J-`0;(VY{Invalid move.}
/]}~;{V0 (jS1z1z0z_S0z1z_S_z1z0z_]}~_{@,('O-]}
~z#1{{H0K#1!1{H1q}(!q]}}~q{@QS@JK[j="(HZ^'Z_2]&q|[j='ZVV($(H|Z!0]]]]}~,#1{Q#1:.}
~.#1{J#1;[0<V&[V>WWVUQLJ]]}~^#1{(#1O0O1O2O2O2O2O1O0]}
~&{!^Qmultiply!3@!^J@V(!9O1O6O1O1O2O6O2O4] }~Z{M :{&M}&M{*}}
~){'X"X"N'halign{&## *M{*}
Zh1Ah2Bh3Ch4Dh5Eh6Fh7Gh8HZ}
vfilbreak$1W(W_|0] :,$0 [0<W[1='QUJL|/];^'_1][_=WM
{(,Tie| Player [0>,-|0] wins by N[0>,-],].}Xend])})





share|improve this answer





















  • 1





    It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

    – Speravir
    Mar 26 '13 at 16:47






  • 3





    I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

    – Sean Allred
    Dec 30 '13 at 12:45



















40














I once spent hours learning enough TeX to format my ex-gf's resume for printing on the computing center laser printer (back when laser printing was magical) and used up most of my monthly laser printing quota printing copies of it -- all under the mistaken belief that she'd see that she was crazy to break up with me.



Not surprisingly, it turned out to be a useless waste of my time (and in retrospect, it was me that should have broken up with her). Worse, word got around that I was a "TeX expert" and I ended up spending the rest of my computer center operator job helping grad students format their theses






share|improve this answer





















  • 4





    Sorry, but this not an answer to the spirt of the question.

    – Speravir
    Mar 26 '13 at 17:26






  • 7





    Maybe I misunderstood the {fun} tag

    – Johnny
    Mar 26 '13 at 17:40






  • 47





    @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

    – mbork
    Mar 26 '13 at 18:57






  • 69





    Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

    – Xavier
    Mar 26 '13 at 21:12








  • 4





    @Xavier Shouldn't there be a word for it... like "TeXpert"?

    – Mario S. E.
    Jul 7 '13 at 20:53



















30














Solving a non-linear equation



Not typesetting the solution (actually, also typesetting the solution of course :)), but more bizarrely implementing the bisection and secant non-linear solvers in TeX!






share|improve this answer


























  • You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

    – Ryan Reich
    Mar 25 '13 at 20:11













  • @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

    – AlexG
    May 21 '13 at 11:30



















22














This one is probably my best:





  • Is there a documentclass that produces 'endless' pages? (please take a look at percusse's comment - pure genius! :))


But there are a few of them scattered around on this site. Here are my picks:




  • Shortest code causing "Emergency stop." error


  • Stop LaTeX compile with a command?


  • Selectively suppress generation of typeset output


  • Typesetting the entire Song That Never Ends


  • Malicious code and/or PDF generation


  • Forcing LaTeX to produce a different PDF on each compile (never reaching a stable output)



... and, as a bonus:




  • How should I convert my beamer slides to PowerPoint according to these odd specifications?


I really don't see why someone would go back to MS Office after using LaTeX... Now that's weird! ;)



EDIT: and i just remembered this one (Why facebook implemented it? But why recreate it in LaTeX? ;)):




  • Text upside-down, characters rotated along baseline?






share|improve this answer


























  • I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

    – Matthew Leingang
    Mar 27 '13 at 2:16











  • @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

    – Count Zero
    Mar 29 '13 at 21:49






  • 1





    and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

    – ivo Welch
    Mar 13 '17 at 21:55



















21














Calculating π with TeX



Gen­er­ates π, us­ing the for­mula



pi=16*arc­tan(1/5)-4*arc­tan(1/239)


and leaves the re­sult in an ar­ray xr, print­ing what it’s cal­cu­lated as it goes along.






share|improve this answer

































    20














    Well, as made famous by a question of mine I have used LaTeX to make to make props for a Call of Cthulhu game. I also posted the finished product on my blog.



    Then later on I used the same technique to make my teaching assistant's life a bit more interesting






    share|improve this answer

































      19














      Implementing the bisection method (and other numerical methods) in TikZ,

      for exposition purposes.



      EDIT: Great thanks to percusse for helping me improve my ifg command.



      enter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description here



      documentclass[dvipsnames]{beamer}

      usepackage{lmodern}
      usepackage{pgfplots}

      usefonttheme[onlymath]{serif}
      setbeamertemplate{navigation symbols}{}

      % 'if #1 greater than #2 then #3 else #4' construct (compatible with pgfmath)
      newcommand{ifg}[4]{
      pgfmathparse{(#1)>(#2)?int(1):int(0)}
      ifnumpgfmathresult=1relax%
      #3%
      else%
      #4%
      fi%
      }

      begin{document}

      begin{frame}[fragile]
      begin{center}
      begin{tikzpicture}[scale=6]
      pgfmathsetmacro{extendxaxis}{.1}
      pgfmathsetmacro{extendyaxis}{.3}
      colorlet{acolor}{red}
      colorlet{bcolor}{OliveGreen}
      colorlet{ccolor}{orange}
      colorlet{fcolor}{blue}
      pgfmathdeclarefunction{f}{1}{pgfmathparse{.5*(exp(-#1)-#1)}} % continuous function
      pgfmathsetmacro{ao}{.2} % lower-bound of initial bracket
      pgfmathsetmacro{bo}{1} % upper-bound of initial bracket
      pgfmathsetmacro{co}{0} % midpoint of inital bracket (initialised at 0)
      pgfmathtruncatemacro{n}{3} % number of iterations

      ifxaobo % check that ao and bo are distinct
      node[red] (0,0) {Bisection impossible: singleton initial bracket.};
      else%
      ifg{ao}{bo}{ % if ao > bo, swop them
      pgfmathsetmacro{temp}{bo}
      pgfmathsetmacro{bo}{ao}
      pgfmathsetmacro{ao}{temp}
      }{}
      % code in here
      ifg{{f(ao)*f(bo)}}{0}{%
      node[red] (0,0) {Bisection impossible: no root in initial bracket.};
      }{%
      onslide<1->{%
      pgfmathsetmacro{xmin}{ao-.5*extendxaxis*(bo-ao)}
      pgfmathsetmacro{xmax}{bo+.5*extendxaxis*(bo-ao)}
      draw[->] (xmin,0) node[left] {$0$} --
      (xmax,0) node[right] {$x$};
      pgfmathsetmacro{ymin}{min(f(ao),f(bo))-.5*extendyaxis*abs(f(bo)-f(ao))}
      pgfmathsetmacro{ymax}{max(f(ao),f(bo))+.5*extendyaxis*abs(f(bo)-f(ao))}
      draw[->] (xmin,ymin) -- (xmin,ymax) node[left] {$f(x)$};
      draw[fcolor] plot[domain=xmin:xmax] (x,{f(x)});
      }
      pgfplotsforeachungrouped k in {1,2,...,n}{%
      pgfmathtruncatemacro{k}{k}
      pgfmathsetmacro{co}{0.5*(ao+bo)}
      pgfmathtruncatemacro{j}{k-1}
      pgfmathtruncatemacro{fromslide}{3*(k-1)+2}
      pgfmathtruncatemacro{toslide}{fromslide+2}
      onslide<fromslide-toslide>{
      draw[thick,acolor] (ao,.1ex) --
      (ao,-.1ex) node[below] {$a_{j}$}; % a0
      draw[thick,bcolor] (bo,.1ex) --
      (bo,-.1ex) node[below] {$b_{j}$}; % b0
      }
      pgfmathtruncatemacro{fromslide}{fromslide+1}
      onslide<fromslide-toslide>{%
      draw[thick,ccolor] (co,.1ex) --
      (co,-.1ex) node[below] {$c_{j}$};
      }
      onslide<toslide>{%
      coordinate (a0) at (ao,{f(ao)});
      draw[dashed,thin,red] (a0 |- xmin,0) -- (a0)
      -- (a0 -| xmin,0) node[left] {$f(a_{j})$};% dashed lines
      draw[fill,red] (a0) circle (.05ex);
      coordinate (c0) at (co,{f(co)});
      draw[dashed,thin,orange] (c0 |- xmin,0) -- (c0)
      -- (c0 -| xmin,0) node[left] {$f(c_{j})$};% dashed lines
      draw[fill,orange] (c0) circle (.05ex);
      }
      ifg{f(ao)*f(co)}{0}{ % bisection iteration
      pgfmathsetmacro{ao}{co}
      }{%
      pgfmathsetmacro{bo}{co}
      }
      ifxnk%
      pgfmathtruncatemacro{toslide}{toslide+1}
      pgfmathtruncatemacro{j}{j+1}
      onslide<toslide>{%
      draw[thick,acolor] (ao,.1ex) --
      (ao,-.1ex) node[below] {$a_{j}$}; % a0
      draw[thick,bcolor] (bo,.1ex) --
      (bo,-.1ex) node[below] {$b_{j}$}; % b0
      }
      fi
      }
      }
      fi
      end{tikzpicture}
      end{center}
      end{frame}
      end{document}





      share|improve this answer


























      • Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

        – Xavier
        Mar 25 '13 at 19:28











      • Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

        – jubobs
        Mar 25 '13 at 19:35






      • 2





        @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

        – Qrrbrbirlbel
        Mar 25 '13 at 19:56













      • @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

        – Xavier
        Mar 25 '13 at 20:00











      • @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

        – jubobs
        Mar 28 '13 at 14:53



















      14














      Providing an excuse for slacking off



      Just let (La)TeX burn some CPU cycles while you are relaxing.






      share|improve this answer





















      • 4





        The #1 programmers excuse for legitimately slacking off: xkcd.com/303

        – Martin Thoma
        Jul 10 '13 at 17:18



















      13














      Implementing a Turing machine simulator

      (TeX is Turing complete)



      Hail to the busy beaver!






      share|improve this answer


























      • Link is broken (domain for sale).

        – Paŭlo Ebermann
        Jul 27 '17 at 14:07



















      13














      Enrico “egreg” Gregorio posted this into our TeX.sx chat:





      1. Let me name it xcix.tex, because it’s in the manner of David Carlisle’s xii.tex, cf. Peter Flynn’s answer



        let~catcode~`x13~`q~`x~`z~`q~`H~`q~`B~`H~`j0~`jA009
        jlet~jlet~Hjpar ~Bjmscount~~jdef~x{q bottlez of beer}
        ~jw{x on the wall}~jt{jadvanceAB-1ATake one down Aand
        pass it around,H}B99~ji{jifnumB}~q{ji=0Nojelsejnumber
        Bjfi}~z{ji>1sjfiA }jloop jifnumB>0 jw, x,Hjtjw.jvskip
        8ptplus1ptjrepeat Time to buy some more beerjdotsjend


        (source link)




      2. The same as LaTeX3 version



        documentclass{article}
        usepackage{xparse}

        setlength{parindent}{0pt}
        setlength{parskip}{1.5ex}

        ExplSyntaxOn
        % user level command
        NewDocumentCommand{beers} { O{99} }
        {
        manual_beers_sing:n { #1 }
        }
        % variables
        int_new:N l_manual_beers_count_int
        % functions
        cs_new_protected:Npn manual_beers_sing:n #1
        {
        int_set:Nn l_manual_beers_count_int { #1 }
        prg_replicate:nn { l_manual_beers_count_int }
        {
        manual_beers_print:
        int_decr:N l_manual_beers_count_int
        }
        Time ~ to ~ buy ~ some ~ more ~ beer ~ dots
        }
        cs_new_protected:Npn manual_beers_print:
        {
        manual_beer_text:nn { ~ on ~ the ~ wall }{ 0 }, ~
        manual_beer_text:nn { } { 0 }, \
        Take ~ one ~ down ~ and ~ pass ~ it ~ around, \
        manual_beer_text:nn { ~ on ~ the ~ wall } { -1 }.par
        }
        cs_new:Npn manual_beer_text:nn #1 #2
        {
        int_case:nnF { l_manual_beers_count_int + #2 }
        {
        { 0 } { No ~ bottle ~ of ~ beer }
        { 1 } { 1 ~ bottle ~ of ~ beer }
        }
        {
        int_to_arabic:n { l_manual_beers_count_int + #2 } ~ bottles ~ of ~ beer
        }
        #1
        }
        ExplSyntaxOff
        begin{document}
        beers
        end{document}


        (source link, small correction; the code as seen above is, though, in this version, as it will appear in a manual by Enrico, which is in the moment, this code was posted, in process of writing)




      This was influenced by me, because I had posted these two links:




      • 99 Bottles of Beer | Language TeX/LaTeX (for compilation read comment of Kiyoshi Akima below that code)


      • 99 Bottles of Beer | Language LaTeX2e loading fmtcount and tikz
        (which has a link to an older version 99 Bottles of Beer | Language LaTeX2e working with memoir and loading only ifthen)







      share|improve this answer


























      • May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

        – awllower
        Oct 6 '16 at 7:47



















      2














      The avremu package



      …emulates an 8-bit CPU (ATmega8).






      share|improve this answer





















      • 1





        From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

        – egreg
        Mar 26 at 18:22










      protected by Loop Space Mar 26 '13 at 23:05



      Thank you for your interest in this question.
      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



      Would you like to answer one of these unanswered questions instead?














      15 Answers
      15






      active

      oldest

      votes








      15 Answers
      15






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      103














      I think that Steve Hicks controller for a Mars Rover programmed in TeX is a good candidate: ICFP Contest 2008 - Mars rover in TeX.






      share|improve this answer





















      • 4





        The writeup for this one is epic, as such tales usually are.

        – Ryan Reich
        Mar 25 '13 at 20:09






      • 1





        Sadly the link is not accessible at least from my area :(

        – JouleV
        Mar 26 at 15:18











      • @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

        – Martin Heller
        Mar 26 at 19:38











      • @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

        – JouleV
        Mar 27 at 4:48
















      103














      I think that Steve Hicks controller for a Mars Rover programmed in TeX is a good candidate: ICFP Contest 2008 - Mars rover in TeX.






      share|improve this answer





















      • 4





        The writeup for this one is epic, as such tales usually are.

        – Ryan Reich
        Mar 25 '13 at 20:09






      • 1





        Sadly the link is not accessible at least from my area :(

        – JouleV
        Mar 26 at 15:18











      • @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

        – Martin Heller
        Mar 26 at 19:38











      • @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

        – JouleV
        Mar 27 at 4:48














      103












      103








      103







      I think that Steve Hicks controller for a Mars Rover programmed in TeX is a good candidate: ICFP Contest 2008 - Mars rover in TeX.






      share|improve this answer















      I think that Steve Hicks controller for a Mars Rover programmed in TeX is a good candidate: ICFP Contest 2008 - Mars rover in TeX.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      answered Mar 25 '13 at 19:20


























      community wiki





      Martin Heller









      • 4





        The writeup for this one is epic, as such tales usually are.

        – Ryan Reich
        Mar 25 '13 at 20:09






      • 1





        Sadly the link is not accessible at least from my area :(

        – JouleV
        Mar 26 at 15:18











      • @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

        – Martin Heller
        Mar 26 at 19:38











      • @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

        – JouleV
        Mar 27 at 4:48














      • 4





        The writeup for this one is epic, as such tales usually are.

        – Ryan Reich
        Mar 25 '13 at 20:09






      • 1





        Sadly the link is not accessible at least from my area :(

        – JouleV
        Mar 26 at 15:18











      • @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

        – Martin Heller
        Mar 26 at 19:38











      • @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

        – JouleV
        Mar 27 at 4:48








      4




      4





      The writeup for this one is epic, as such tales usually are.

      – Ryan Reich
      Mar 25 '13 at 20:09





      The writeup for this one is epic, as such tales usually are.

      – Ryan Reich
      Mar 25 '13 at 20:09




      1




      1





      Sadly the link is not accessible at least from my area :(

      – JouleV
      Mar 26 at 15:18





      Sadly the link is not accessible at least from my area :(

      – JouleV
      Mar 26 at 15:18













      @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

      – Martin Heller
      Mar 26 at 19:38





      @JouleV The link still works for me, and the article is still worth reading. Maybe the site was temporarily unavailable?

      – Martin Heller
      Mar 26 at 19:38













      @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

      – JouleV
      Mar 27 at 4:48





      @MartinHeller .dk is a Denmark domain AFAIK. So it may be not accessible from some countries.

      – JouleV
      Mar 27 at 4:48











      84














      Adding coffee stains to your documents



      If my documents don't have those stains, my boss / students think(s) I don't drink coffee. If he or they think I am not drinking coffee, they believe I am slacking. Thanks Hanno!






      share|improve this answer





















      • 8





        Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

        – knut
        Mar 25 '13 at 20:05
















      84














      Adding coffee stains to your documents



      If my documents don't have those stains, my boss / students think(s) I don't drink coffee. If he or they think I am not drinking coffee, they believe I am slacking. Thanks Hanno!






      share|improve this answer





















      • 8





        Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

        – knut
        Mar 25 '13 at 20:05














      84












      84








      84







      Adding coffee stains to your documents



      If my documents don't have those stains, my boss / students think(s) I don't drink coffee. If he or they think I am not drinking coffee, they believe I am slacking. Thanks Hanno!






      share|improve this answer















      Adding coffee stains to your documents



      If my documents don't have those stains, my boss / students think(s) I don't drink coffee. If he or they think I am not drinking coffee, they believe I am slacking. Thanks Hanno!







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Aug 4 '14 at 16:10


























      community wiki





      2 revs, 2 users 80%
      Xavier









      • 8





        Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

        – knut
        Mar 25 '13 at 20:05














      • 8





        Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

        – knut
        Mar 25 '13 at 20:05








      8




      8





      Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

      – knut
      Mar 25 '13 at 20:05





      Great! I need it. I didn't find the package on CTAN - would be nice, if it would be part of TeXLive.

      – knut
      Mar 25 '13 at 20:05











      64














      David Carlisle's Christmas 'card' at http://www.ctan.org/pkg/xii.
      In fact, here it is: run this through plain TeX:



      let~catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
      PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
      A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
      AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
      Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
      :76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
      RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
      B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
      I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
      ;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
      s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
      LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
      doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye


      A good collection of Enjoy TeX pearls diving! at GUST, Polish TeX Users Group



      For more Pearls of TeX programming at TUGboat ,Volume 26 (2005), No. 3.






      share|improve this answer





















      • 7





        Could anyone please explain how it works?

        – Uwe Ziegenhagen
        Mar 25 '13 at 20:11






      • 13





        @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

        – Xavier
        Mar 25 '13 at 20:17








      • 17





        @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

        – David Carlisle
        Mar 25 '13 at 20:55






      • 10





        If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

        – David Carlisle
        Mar 25 '13 at 21:21






      • 2





        For something similar, and a detailed explanation of the code, see Can you explain how this code works?

        – Werner
        Mar 29 '13 at 19:53
















      64














      David Carlisle's Christmas 'card' at http://www.ctan.org/pkg/xii.
      In fact, here it is: run this through plain TeX:



      let~catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
      PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
      A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
      AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
      Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
      :76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
      RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
      B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
      I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
      ;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
      s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
      LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
      doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye


      A good collection of Enjoy TeX pearls diving! at GUST, Polish TeX Users Group



      For more Pearls of TeX programming at TUGboat ,Volume 26 (2005), No. 3.






      share|improve this answer





















      • 7





        Could anyone please explain how it works?

        – Uwe Ziegenhagen
        Mar 25 '13 at 20:11






      • 13





        @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

        – Xavier
        Mar 25 '13 at 20:17








      • 17





        @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

        – David Carlisle
        Mar 25 '13 at 20:55






      • 10





        If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

        – David Carlisle
        Mar 25 '13 at 21:21






      • 2





        For something similar, and a detailed explanation of the code, see Can you explain how this code works?

        – Werner
        Mar 29 '13 at 19:53














      64












      64








      64







      David Carlisle's Christmas 'card' at http://www.ctan.org/pkg/xii.
      In fact, here it is: run this through plain TeX:



      let~catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
      PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
      A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
      AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
      Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
      :76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
      RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
      B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
      I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
      ;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
      s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
      LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
      doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye


      A good collection of Enjoy TeX pearls diving! at GUST, Polish TeX Users Group



      For more Pearls of TeX programming at TUGboat ,Volume 26 (2005), No. 3.






      share|improve this answer















      David Carlisle's Christmas 'card' at http://www.ctan.org/pkg/xii.
      In fact, here it is: run this through plain TeX:



      let~catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
      PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
      A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
      AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
      Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
      :76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
      RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
      B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
      I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
      ;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
      s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
      LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
      doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye


      A good collection of Enjoy TeX pearls diving! at GUST, Polish TeX Users Group



      For more Pearls of TeX programming at TUGboat ,Volume 26 (2005), No. 3.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 25 '13 at 20:38


























      community wiki





      4 revs, 3 users 65%
      Peter Flynn










      • 7





        Could anyone please explain how it works?

        – Uwe Ziegenhagen
        Mar 25 '13 at 20:11






      • 13





        @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

        – Xavier
        Mar 25 '13 at 20:17








      • 17





        @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

        – David Carlisle
        Mar 25 '13 at 20:55






      • 10





        If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

        – David Carlisle
        Mar 25 '13 at 21:21






      • 2





        For something similar, and a detailed explanation of the code, see Can you explain how this code works?

        – Werner
        Mar 29 '13 at 19:53














      • 7





        Could anyone please explain how it works?

        – Uwe Ziegenhagen
        Mar 25 '13 at 20:11






      • 13





        @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

        – Xavier
        Mar 25 '13 at 20:17








      • 17





        @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

        – David Carlisle
        Mar 25 '13 at 20:55






      • 10





        If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

        – David Carlisle
        Mar 25 '13 at 21:21






      • 2





        For something similar, and a detailed explanation of the code, see Can you explain how this code works?

        – Werner
        Mar 29 '13 at 19:53








      7




      7





      Could anyone please explain how it works?

      – Uwe Ziegenhagen
      Mar 25 '13 at 20:11





      Could anyone please explain how it works?

      – Uwe Ziegenhagen
      Mar 25 '13 at 20:11




      13




      13





      @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

      – Xavier
      Mar 25 '13 at 20:17







      @percusse I think Uwe meant how common mortals are supposed to understand David's code. I know: we're not :)

      – Xavier
      Mar 25 '13 at 20:17






      17




      17





      @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

      – David Carlisle
      Mar 25 '13 at 20:55





      @UweZiegenhagen It's just a typical plain TeX file, the syntax is slightly different to the LaTeX syntax that's more commonly seen here.

      – David Carlisle
      Mar 25 '13 at 20:55




      10




      10





      If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

      – David Carlisle
      Mar 25 '13 at 21:21





      If your French is better than mine... groups.google.com/forum/?hl=fr&fromgroups=#!topic/…

      – David Carlisle
      Mar 25 '13 at 21:21




      2




      2





      For something similar, and a detailed explanation of the code, see Can you explain how this code works?

      – Werner
      Mar 29 '13 at 19:53





      For something similar, and a detailed explanation of the code, see Can you explain how this code works?

      – Werner
      Mar 29 '13 at 19:53











      49














      a basic interpreter written in tex.



      see the tugboat article.






      share|improve this answer





















      • 2





        Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

        – Canageek
        Mar 25 '13 at 18:59
















      49














      a basic interpreter written in tex.



      see the tugboat article.






      share|improve this answer





















      • 2





        Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

        – Canageek
        Mar 25 '13 at 18:59














      49












      49








      49







      a basic interpreter written in tex.



      see the tugboat article.






      share|improve this answer















      a basic interpreter written in tex.



      see the tugboat article.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      answered Mar 25 '13 at 18:55


























      community wiki





      barbara beeton









      • 2





        Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

        – Canageek
        Mar 25 '13 at 18:59














      • 2





        Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

        – Canageek
        Mar 25 '13 at 18:59








      2




      2





      Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

      – Canageek
      Mar 25 '13 at 18:59





      Does it support Commodore Basic? My Dad could run the program he typed up on the C64 to play Star Fleet battles on it!

      – Canageek
      Mar 25 '13 at 18:59











      46














      Our own Bruno LeFloch who wrote a Reversi game which runs in the console:



      (Please don't try to reformat the code displayed below unless you really know what you are doing; if you do attempt a reformat, try to compile the resulting code before replacing the code here.)



      % !TEX TS-program = tex
      longdef3#1#2#3{}vsize5cmhsize4cmnewlinechar`*def~#1{catcode`#113~}
      ~QSU_VWJKLMNO@XY(|+Z'"z:qj^;/)!, ${*133}
      def~#1#2{let#1#2~}~*cr[ifnum(ifcaseOor|else]fiNnumber@advanceX
      expandafterZglobalYmessage~defj{[0<Q[9>Q[0<J[9>J^|_]|_]|_]|_]}
      ~+{count1}+1=9~_#1{@+1 1countdef#1+1_}_QJVSKWUL,'"$H!_-1'1"2+44'+55'+45"+54"~^{+NQNJ}
      ~:#1{#11#12#13#14#15#16#17#18}
      ~M#1{Y{#1}#1}~h#1#2{M#2:{ q#1}&M#2&M{*}}~q#1#2{&M{(+#1#2 O-O0]}}
      ~/{Y{Row and column? e.g. E6*}read_toMXjmeaningM ;}
      ~j#1->#2#3#4;{Q`#2@Q-`@J`#3@J-`0;(VY{Invalid move.}
      /]}~;{V0 (jS1z1z0z_S0z1z_S_z1z0z_]}~_{@,('O-]}
      ~z#1{{H0K#1!1{H1q}(!q]}}~q{@QS@JK[j="(HZ^'Z_2]&q|[j='ZVV($(H|Z!0]]]]}~,#1{Q#1:.}
      ~.#1{J#1;[0<V&[V>WWVUQLJ]]}~^#1{(#1O0O1O2O2O2O2O1O0]}
      ~&{!^Qmultiply!3@!^J@V(!9O1O6O1O1O2O6O2O4] }~Z{M :{&M}&M{*}}
      ~){'X"X"N'halign{&## *M{*}
      Zh1Ah2Bh3Ch4Dh5Eh6Fh7Gh8HZ}
      vfilbreak$1W(W_|0] :,$0 [0<W[1='QUJL|/];^'_1][_=WM
      {(,Tie| Player [0>,-|0] wins by N[0>,-],].}Xend])})





      share|improve this answer





















      • 1





        It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

        – Speravir
        Mar 26 '13 at 16:47






      • 3





        I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

        – Sean Allred
        Dec 30 '13 at 12:45
















      46














      Our own Bruno LeFloch who wrote a Reversi game which runs in the console:



      (Please don't try to reformat the code displayed below unless you really know what you are doing; if you do attempt a reformat, try to compile the resulting code before replacing the code here.)



      % !TEX TS-program = tex
      longdef3#1#2#3{}vsize5cmhsize4cmnewlinechar`*def~#1{catcode`#113~}
      ~QSU_VWJKLMNO@XY(|+Z'"z:qj^;/)!, ${*133}
      def~#1#2{let#1#2~}~*cr[ifnum(ifcaseOor|else]fiNnumber@advanceX
      expandafterZglobalYmessage~defj{[0<Q[9>Q[0<J[9>J^|_]|_]|_]|_]}
      ~+{count1}+1=9~_#1{@+1 1countdef#1+1_}_QJVSKWUL,'"$H!_-1'1"2+44'+55'+45"+54"~^{+NQNJ}
      ~:#1{#11#12#13#14#15#16#17#18}
      ~M#1{Y{#1}#1}~h#1#2{M#2:{ q#1}&M#2&M{*}}~q#1#2{&M{(+#1#2 O-O0]}}
      ~/{Y{Row and column? e.g. E6*}read_toMXjmeaningM ;}
      ~j#1->#2#3#4;{Q`#2@Q-`@J`#3@J-`0;(VY{Invalid move.}
      /]}~;{V0 (jS1z1z0z_S0z1z_S_z1z0z_]}~_{@,('O-]}
      ~z#1{{H0K#1!1{H1q}(!q]}}~q{@QS@JK[j="(HZ^'Z_2]&q|[j='ZVV($(H|Z!0]]]]}~,#1{Q#1:.}
      ~.#1{J#1;[0<V&[V>WWVUQLJ]]}~^#1{(#1O0O1O2O2O2O2O1O0]}
      ~&{!^Qmultiply!3@!^J@V(!9O1O6O1O1O2O6O2O4] }~Z{M :{&M}&M{*}}
      ~){'X"X"N'halign{&## *M{*}
      Zh1Ah2Bh3Ch4Dh5Eh6Fh7Gh8HZ}
      vfilbreak$1W(W_|0] :,$0 [0<W[1='QUJL|/];^'_1][_=WM
      {(,Tie| Player [0>,-|0] wins by N[0>,-],].}Xend])})





      share|improve this answer





















      • 1





        It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

        – Speravir
        Mar 26 '13 at 16:47






      • 3





        I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

        – Sean Allred
        Dec 30 '13 at 12:45














      46












      46








      46







      Our own Bruno LeFloch who wrote a Reversi game which runs in the console:



      (Please don't try to reformat the code displayed below unless you really know what you are doing; if you do attempt a reformat, try to compile the resulting code before replacing the code here.)



      % !TEX TS-program = tex
      longdef3#1#2#3{}vsize5cmhsize4cmnewlinechar`*def~#1{catcode`#113~}
      ~QSU_VWJKLMNO@XY(|+Z'"z:qj^;/)!, ${*133}
      def~#1#2{let#1#2~}~*cr[ifnum(ifcaseOor|else]fiNnumber@advanceX
      expandafterZglobalYmessage~defj{[0<Q[9>Q[0<J[9>J^|_]|_]|_]|_]}
      ~+{count1}+1=9~_#1{@+1 1countdef#1+1_}_QJVSKWUL,'"$H!_-1'1"2+44'+55'+45"+54"~^{+NQNJ}
      ~:#1{#11#12#13#14#15#16#17#18}
      ~M#1{Y{#1}#1}~h#1#2{M#2:{ q#1}&M#2&M{*}}~q#1#2{&M{(+#1#2 O-O0]}}
      ~/{Y{Row and column? e.g. E6*}read_toMXjmeaningM ;}
      ~j#1->#2#3#4;{Q`#2@Q-`@J`#3@J-`0;(VY{Invalid move.}
      /]}~;{V0 (jS1z1z0z_S0z1z_S_z1z0z_]}~_{@,('O-]}
      ~z#1{{H0K#1!1{H1q}(!q]}}~q{@QS@JK[j="(HZ^'Z_2]&q|[j='ZVV($(H|Z!0]]]]}~,#1{Q#1:.}
      ~.#1{J#1;[0<V&[V>WWVUQLJ]]}~^#1{(#1O0O1O2O2O2O2O1O0]}
      ~&{!^Qmultiply!3@!^J@V(!9O1O6O1O1O2O6O2O4] }~Z{M :{&M}&M{*}}
      ~){'X"X"N'halign{&## *M{*}
      Zh1Ah2Bh3Ch4Dh5Eh6Fh7Gh8HZ}
      vfilbreak$1W(W_|0] :,$0 [0<W[1='QUJL|/];^'_1][_=WM
      {(,Tie| Player [0>,-|0] wins by N[0>,-],].}Xend])})





      share|improve this answer















      Our own Bruno LeFloch who wrote a Reversi game which runs in the console:



      (Please don't try to reformat the code displayed below unless you really know what you are doing; if you do attempt a reformat, try to compile the resulting code before replacing the code here.)



      % !TEX TS-program = tex
      longdef3#1#2#3{}vsize5cmhsize4cmnewlinechar`*def~#1{catcode`#113~}
      ~QSU_VWJKLMNO@XY(|+Z'"z:qj^;/)!, ${*133}
      def~#1#2{let#1#2~}~*cr[ifnum(ifcaseOor|else]fiNnumber@advanceX
      expandafterZglobalYmessage~defj{[0<Q[9>Q[0<J[9>J^|_]|_]|_]|_]}
      ~+{count1}+1=9~_#1{@+1 1countdef#1+1_}_QJVSKWUL,'"$H!_-1'1"2+44'+55'+45"+54"~^{+NQNJ}
      ~:#1{#11#12#13#14#15#16#17#18}
      ~M#1{Y{#1}#1}~h#1#2{M#2:{ q#1}&M#2&M{*}}~q#1#2{&M{(+#1#2 O-O0]}}
      ~/{Y{Row and column? e.g. E6*}read_toMXjmeaningM ;}
      ~j#1->#2#3#4;{Q`#2@Q-`@J`#3@J-`0;(VY{Invalid move.}
      /]}~;{V0 (jS1z1z0z_S0z1z_S_z1z0z_]}~_{@,('O-]}
      ~z#1{{H0K#1!1{H1q}(!q]}}~q{@QS@JK[j="(HZ^'Z_2]&q|[j='ZVV($(H|Z!0]]]]}~,#1{Q#1:.}
      ~.#1{J#1;[0<V&[V>WWVUQLJ]]}~^#1{(#1O0O1O2O2O2O2O1O0]}
      ~&{!^Qmultiply!3@!^J@V(!9O1O6O1O1O2O6O2O4] }~Z{M :{&M}&M{*}}
      ~){'X"X"N'halign{&## *M{*}
      Zh1Ah2Bh3Ch4Dh5Eh6Fh7Gh8HZ}
      vfilbreak$1W(W_|0] :,$0 [0<W[1='QUJL|/];^'_1][_=WM
      {(,Tie| Player [0>,-|0] wins by N[0>,-],].}Xend])})






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Apr 13 '17 at 12:35


























      community wiki





      3 revs
      Alan Munn









      • 1





        It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

        – Speravir
        Mar 26 '13 at 16:47






      • 3





        I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

        – Sean Allred
        Dec 30 '13 at 12:45














      • 1





        It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

        – Speravir
        Mar 26 '13 at 16:47






      • 3





        I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

        – Sean Allred
        Dec 30 '13 at 12:45








      1




      1





      It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

      – Speravir
      Mar 26 '13 at 16:47





      It is – intentionally, of course – named reverxii in reminescence to David Carlisle. Just compare Peter Flynn’s answer here.

      – Speravir
      Mar 26 '13 at 16:47




      3




      3





      I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

      – Sean Allred
      Dec 30 '13 at 12:45





      I don't know why it's taken me so long to run this through... this is absolutely insane. Why? Why?

      – Sean Allred
      Dec 30 '13 at 12:45











      40














      I once spent hours learning enough TeX to format my ex-gf's resume for printing on the computing center laser printer (back when laser printing was magical) and used up most of my monthly laser printing quota printing copies of it -- all under the mistaken belief that she'd see that she was crazy to break up with me.



      Not surprisingly, it turned out to be a useless waste of my time (and in retrospect, it was me that should have broken up with her). Worse, word got around that I was a "TeX expert" and I ended up spending the rest of my computer center operator job helping grad students format their theses






      share|improve this answer





















      • 4





        Sorry, but this not an answer to the spirt of the question.

        – Speravir
        Mar 26 '13 at 17:26






      • 7





        Maybe I misunderstood the {fun} tag

        – Johnny
        Mar 26 '13 at 17:40






      • 47





        @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

        – mbork
        Mar 26 '13 at 18:57






      • 69





        Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

        – Xavier
        Mar 26 '13 at 21:12








      • 4





        @Xavier Shouldn't there be a word for it... like "TeXpert"?

        – Mario S. E.
        Jul 7 '13 at 20:53
















      40














      I once spent hours learning enough TeX to format my ex-gf's resume for printing on the computing center laser printer (back when laser printing was magical) and used up most of my monthly laser printing quota printing copies of it -- all under the mistaken belief that she'd see that she was crazy to break up with me.



      Not surprisingly, it turned out to be a useless waste of my time (and in retrospect, it was me that should have broken up with her). Worse, word got around that I was a "TeX expert" and I ended up spending the rest of my computer center operator job helping grad students format their theses






      share|improve this answer





















      • 4





        Sorry, but this not an answer to the spirt of the question.

        – Speravir
        Mar 26 '13 at 17:26






      • 7





        Maybe I misunderstood the {fun} tag

        – Johnny
        Mar 26 '13 at 17:40






      • 47





        @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

        – mbork
        Mar 26 '13 at 18:57






      • 69





        Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

        – Xavier
        Mar 26 '13 at 21:12








      • 4





        @Xavier Shouldn't there be a word for it... like "TeXpert"?

        – Mario S. E.
        Jul 7 '13 at 20:53














      40












      40








      40







      I once spent hours learning enough TeX to format my ex-gf's resume for printing on the computing center laser printer (back when laser printing was magical) and used up most of my monthly laser printing quota printing copies of it -- all under the mistaken belief that she'd see that she was crazy to break up with me.



      Not surprisingly, it turned out to be a useless waste of my time (and in retrospect, it was me that should have broken up with her). Worse, word got around that I was a "TeX expert" and I ended up spending the rest of my computer center operator job helping grad students format their theses






      share|improve this answer















      I once spent hours learning enough TeX to format my ex-gf's resume for printing on the computing center laser printer (back when laser printing was magical) and used up most of my monthly laser printing quota printing copies of it -- all under the mistaken belief that she'd see that she was crazy to break up with me.



      Not surprisingly, it turned out to be a useless waste of my time (and in retrospect, it was me that should have broken up with her). Worse, word got around that I was a "TeX expert" and I ended up spending the rest of my computer center operator job helping grad students format their theses







      share|improve this answer














      share|improve this answer



      share|improve this answer








      answered Mar 26 '13 at 17:24


























      community wiki





      Johnny









      • 4





        Sorry, but this not an answer to the spirt of the question.

        – Speravir
        Mar 26 '13 at 17:26






      • 7





        Maybe I misunderstood the {fun} tag

        – Johnny
        Mar 26 '13 at 17:40






      • 47





        @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

        – mbork
        Mar 26 '13 at 18:57






      • 69





        Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

        – Xavier
        Mar 26 '13 at 21:12








      • 4





        @Xavier Shouldn't there be a word for it... like "TeXpert"?

        – Mario S. E.
        Jul 7 '13 at 20:53














      • 4





        Sorry, but this not an answer to the spirt of the question.

        – Speravir
        Mar 26 '13 at 17:26






      • 7





        Maybe I misunderstood the {fun} tag

        – Johnny
        Mar 26 '13 at 17:40






      • 47





        @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

        – mbork
        Mar 26 '13 at 18:57






      • 69





        Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

        – Xavier
        Mar 26 '13 at 21:12








      • 4





        @Xavier Shouldn't there be a word for it... like "TeXpert"?

        – Mario S. E.
        Jul 7 '13 at 20:53








      4




      4





      Sorry, but this not an answer to the spirt of the question.

      – Speravir
      Mar 26 '13 at 17:26





      Sorry, but this not an answer to the spirt of the question.

      – Speravir
      Mar 26 '13 at 17:26




      7




      7





      Maybe I misunderstood the {fun} tag

      – Johnny
      Mar 26 '13 at 17:40





      Maybe I misunderstood the {fun} tag

      – Johnny
      Mar 26 '13 at 17:40




      47




      47





      @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

      – mbork
      Mar 26 '13 at 18:57





      @Speravir: I'm not sure about the "spirit of the question", but for me, using TeX for making a gf regret breaking up definitely counts.

      – mbork
      Mar 26 '13 at 18:57




      69




      69





      Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

      – Xavier
      Mar 26 '13 at 21:12







      Well, I actually once met a nice girl because she needed help formatting her thesis and was told I was a "TeX expert". She's now my wife, and we had our first child 6 months ago :)

      – Xavier
      Mar 26 '13 at 21:12






      4




      4





      @Xavier Shouldn't there be a word for it... like "TeXpert"?

      – Mario S. E.
      Jul 7 '13 at 20:53





      @Xavier Shouldn't there be a word for it... like "TeXpert"?

      – Mario S. E.
      Jul 7 '13 at 20:53











      30














      Solving a non-linear equation



      Not typesetting the solution (actually, also typesetting the solution of course :)), but more bizarrely implementing the bisection and secant non-linear solvers in TeX!






      share|improve this answer


























      • You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

        – Ryan Reich
        Mar 25 '13 at 20:11













      • @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

        – AlexG
        May 21 '13 at 11:30
















      30














      Solving a non-linear equation



      Not typesetting the solution (actually, also typesetting the solution of course :)), but more bizarrely implementing the bisection and secant non-linear solvers in TeX!






      share|improve this answer


























      • You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

        – Ryan Reich
        Mar 25 '13 at 20:11













      • @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

        – AlexG
        May 21 '13 at 11:30














      30












      30








      30







      Solving a non-linear equation



      Not typesetting the solution (actually, also typesetting the solution of course :)), but more bizarrely implementing the bisection and secant non-linear solvers in TeX!






      share|improve this answer















      Solving a non-linear equation



      Not typesetting the solution (actually, also typesetting the solution of course :)), but more bizarrely implementing the bisection and secant non-linear solvers in TeX!







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Apr 13 '17 at 12:35


























      community wiki





      3 revs
      Xavier














      • You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

        – Ryan Reich
        Mar 25 '13 at 20:11













      • @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

        – AlexG
        May 21 '13 at 11:30



















      • You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

        – Ryan Reich
        Mar 25 '13 at 20:11













      • @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

        – AlexG
        May 21 '13 at 11:30

















      You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

      – Ryan Reich
      Mar 25 '13 at 20:11







      You know, I am at this moment wondering whether there is an easy way to graph some trajectories of a nonlinear system of ODEs in pgfplots. Obviously, my search is ended. (Oh, this only does algebraic equations. Boooo!)

      – Ryan Reich
      Mar 25 '13 at 20:11















      @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

      – AlexG
      May 21 '13 at 11:30





      @RyanReich: You may have a look at ctan.org/tex-archive/graphics/pstricks/contrib/pst-ode . Though I must admit that the actual calculation is done by your Postscript printer rather than by TeX.

      – AlexG
      May 21 '13 at 11:30











      22














      This one is probably my best:





      • Is there a documentclass that produces 'endless' pages? (please take a look at percusse's comment - pure genius! :))


      But there are a few of them scattered around on this site. Here are my picks:




      • Shortest code causing "Emergency stop." error


      • Stop LaTeX compile with a command?


      • Selectively suppress generation of typeset output


      • Typesetting the entire Song That Never Ends


      • Malicious code and/or PDF generation


      • Forcing LaTeX to produce a different PDF on each compile (never reaching a stable output)



      ... and, as a bonus:




      • How should I convert my beamer slides to PowerPoint according to these odd specifications?


      I really don't see why someone would go back to MS Office after using LaTeX... Now that's weird! ;)



      EDIT: and i just remembered this one (Why facebook implemented it? But why recreate it in LaTeX? ;)):




      • Text upside-down, characters rotated along baseline?






      share|improve this answer


























      • I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

        – Matthew Leingang
        Mar 27 '13 at 2:16











      • @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

        – Count Zero
        Mar 29 '13 at 21:49






      • 1





        and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

        – ivo Welch
        Mar 13 '17 at 21:55
















      22














      This one is probably my best:





      • Is there a documentclass that produces 'endless' pages? (please take a look at percusse's comment - pure genius! :))


      But there are a few of them scattered around on this site. Here are my picks:




      • Shortest code causing "Emergency stop." error


      • Stop LaTeX compile with a command?


      • Selectively suppress generation of typeset output


      • Typesetting the entire Song That Never Ends


      • Malicious code and/or PDF generation


      • Forcing LaTeX to produce a different PDF on each compile (never reaching a stable output)



      ... and, as a bonus:




      • How should I convert my beamer slides to PowerPoint according to these odd specifications?


      I really don't see why someone would go back to MS Office after using LaTeX... Now that's weird! ;)



      EDIT: and i just remembered this one (Why facebook implemented it? But why recreate it in LaTeX? ;)):




      • Text upside-down, characters rotated along baseline?






      share|improve this answer


























      • I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

        – Matthew Leingang
        Mar 27 '13 at 2:16











      • @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

        – Count Zero
        Mar 29 '13 at 21:49






      • 1





        and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

        – ivo Welch
        Mar 13 '17 at 21:55














      22












      22








      22







      This one is probably my best:





      • Is there a documentclass that produces 'endless' pages? (please take a look at percusse's comment - pure genius! :))


      But there are a few of them scattered around on this site. Here are my picks:




      • Shortest code causing "Emergency stop." error


      • Stop LaTeX compile with a command?


      • Selectively suppress generation of typeset output


      • Typesetting the entire Song That Never Ends


      • Malicious code and/or PDF generation


      • Forcing LaTeX to produce a different PDF on each compile (never reaching a stable output)



      ... and, as a bonus:




      • How should I convert my beamer slides to PowerPoint according to these odd specifications?


      I really don't see why someone would go back to MS Office after using LaTeX... Now that's weird! ;)



      EDIT: and i just remembered this one (Why facebook implemented it? But why recreate it in LaTeX? ;)):




      • Text upside-down, characters rotated along baseline?






      share|improve this answer















      This one is probably my best:





      • Is there a documentclass that produces 'endless' pages? (please take a look at percusse's comment - pure genius! :))


      But there are a few of them scattered around on this site. Here are my picks:




      • Shortest code causing "Emergency stop." error


      • Stop LaTeX compile with a command?


      • Selectively suppress generation of typeset output


      • Typesetting the entire Song That Never Ends


      • Malicious code and/or PDF generation


      • Forcing LaTeX to produce a different PDF on each compile (never reaching a stable output)



      ... and, as a bonus:




      • How should I convert my beamer slides to PowerPoint according to these odd specifications?


      I really don't see why someone would go back to MS Office after using LaTeX... Now that's weird! ;)



      EDIT: and i just remembered this one (Why facebook implemented it? But why recreate it in LaTeX? ;)):




      • Text upside-down, characters rotated along baseline?







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Apr 13 '17 at 12:36


























      community wiki





      3 revs
      Count Zero














      • I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

        – Matthew Leingang
        Mar 27 '13 at 2:16











      • @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

        – Count Zero
        Mar 29 '13 at 21:49






      • 1





        and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

        – ivo Welch
        Mar 13 '17 at 21:55



















      • I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

        – Matthew Leingang
        Mar 27 '13 at 2:16











      • @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

        – Count Zero
        Mar 29 '13 at 21:49






      • 1





        and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

        – ivo Welch
        Mar 13 '17 at 21:55

















      I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

      – Matthew Leingang
      Mar 27 '13 at 2:16





      I am the originator of the "How should I convert my slides to PowerPoint...?" question and if you read it you will note that it was not my desire to back to MS Office. But I'm glad the question has achieved a measure of notoriety.

      – Matthew Leingang
      Mar 27 '13 at 2:16













      @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

      – Count Zero
      Mar 29 '13 at 21:49





      @MatthewLeingang: I know you were forced into it. Nevertheless, it was a weird thing to do IMHO and I'm only happy to advertise it. :)

      – Count Zero
      Mar 29 '13 at 21:49




      1




      1





      and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

      – ivo Welch
      Mar 13 '17 at 21:55





      and years later, I can add that I use beamer, but some of my users want to modify the slides and only know word. yikes. so I have to maintain both.

      – ivo Welch
      Mar 13 '17 at 21:55











      21














      Calculating π with TeX



      Gen­er­ates π, us­ing the for­mula



      pi=16*arc­tan(1/5)-4*arc­tan(1/239)


      and leaves the re­sult in an ar­ray xr, print­ing what it’s cal­cu­lated as it goes along.






      share|improve this answer






























        21














        Calculating π with TeX



        Gen­er­ates π, us­ing the for­mula



        pi=16*arc­tan(1/5)-4*arc­tan(1/239)


        and leaves the re­sult in an ar­ray xr, print­ing what it’s cal­cu­lated as it goes along.






        share|improve this answer




























          21












          21








          21







          Calculating π with TeX



          Gen­er­ates π, us­ing the for­mula



          pi=16*arc­tan(1/5)-4*arc­tan(1/239)


          and leaves the re­sult in an ar­ray xr, print­ing what it’s cal­cu­lated as it goes along.






          share|improve this answer















          Calculating π with TeX



          Gen­er­ates π, us­ing the for­mula



          pi=16*arc­tan(1/5)-4*arc­tan(1/239)


          and leaves the re­sult in an ar­ray xr, print­ing what it’s cal­cu­lated as it goes along.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 7 '13 at 16:27


























          community wiki





          2 revs, 2 users 80%
          rcs

























              20














              Well, as made famous by a question of mine I have used LaTeX to make to make props for a Call of Cthulhu game. I also posted the finished product on my blog.



              Then later on I used the same technique to make my teaching assistant's life a bit more interesting






              share|improve this answer






























                20














                Well, as made famous by a question of mine I have used LaTeX to make to make props for a Call of Cthulhu game. I also posted the finished product on my blog.



                Then later on I used the same technique to make my teaching assistant's life a bit more interesting






                share|improve this answer




























                  20












                  20








                  20







                  Well, as made famous by a question of mine I have used LaTeX to make to make props for a Call of Cthulhu game. I also posted the finished product on my blog.



                  Then later on I used the same technique to make my teaching assistant's life a bit more interesting






                  share|improve this answer















                  Well, as made famous by a question of mine I have used LaTeX to make to make props for a Call of Cthulhu game. I also posted the finished product on my blog.



                  Then later on I used the same technique to make my teaching assistant's life a bit more interesting







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 13 '17 at 12:35


























                  community wiki





                  3 revs, 2 users 88%
                  Canageek
























                      19














                      Implementing the bisection method (and other numerical methods) in TikZ,

                      for exposition purposes.



                      EDIT: Great thanks to percusse for helping me improve my ifg command.



                      enter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description here



                      documentclass[dvipsnames]{beamer}

                      usepackage{lmodern}
                      usepackage{pgfplots}

                      usefonttheme[onlymath]{serif}
                      setbeamertemplate{navigation symbols}{}

                      % 'if #1 greater than #2 then #3 else #4' construct (compatible with pgfmath)
                      newcommand{ifg}[4]{
                      pgfmathparse{(#1)>(#2)?int(1):int(0)}
                      ifnumpgfmathresult=1relax%
                      #3%
                      else%
                      #4%
                      fi%
                      }

                      begin{document}

                      begin{frame}[fragile]
                      begin{center}
                      begin{tikzpicture}[scale=6]
                      pgfmathsetmacro{extendxaxis}{.1}
                      pgfmathsetmacro{extendyaxis}{.3}
                      colorlet{acolor}{red}
                      colorlet{bcolor}{OliveGreen}
                      colorlet{ccolor}{orange}
                      colorlet{fcolor}{blue}
                      pgfmathdeclarefunction{f}{1}{pgfmathparse{.5*(exp(-#1)-#1)}} % continuous function
                      pgfmathsetmacro{ao}{.2} % lower-bound of initial bracket
                      pgfmathsetmacro{bo}{1} % upper-bound of initial bracket
                      pgfmathsetmacro{co}{0} % midpoint of inital bracket (initialised at 0)
                      pgfmathtruncatemacro{n}{3} % number of iterations

                      ifxaobo % check that ao and bo are distinct
                      node[red] (0,0) {Bisection impossible: singleton initial bracket.};
                      else%
                      ifg{ao}{bo}{ % if ao > bo, swop them
                      pgfmathsetmacro{temp}{bo}
                      pgfmathsetmacro{bo}{ao}
                      pgfmathsetmacro{ao}{temp}
                      }{}
                      % code in here
                      ifg{{f(ao)*f(bo)}}{0}{%
                      node[red] (0,0) {Bisection impossible: no root in initial bracket.};
                      }{%
                      onslide<1->{%
                      pgfmathsetmacro{xmin}{ao-.5*extendxaxis*(bo-ao)}
                      pgfmathsetmacro{xmax}{bo+.5*extendxaxis*(bo-ao)}
                      draw[->] (xmin,0) node[left] {$0$} --
                      (xmax,0) node[right] {$x$};
                      pgfmathsetmacro{ymin}{min(f(ao),f(bo))-.5*extendyaxis*abs(f(bo)-f(ao))}
                      pgfmathsetmacro{ymax}{max(f(ao),f(bo))+.5*extendyaxis*abs(f(bo)-f(ao))}
                      draw[->] (xmin,ymin) -- (xmin,ymax) node[left] {$f(x)$};
                      draw[fcolor] plot[domain=xmin:xmax] (x,{f(x)});
                      }
                      pgfplotsforeachungrouped k in {1,2,...,n}{%
                      pgfmathtruncatemacro{k}{k}
                      pgfmathsetmacro{co}{0.5*(ao+bo)}
                      pgfmathtruncatemacro{j}{k-1}
                      pgfmathtruncatemacro{fromslide}{3*(k-1)+2}
                      pgfmathtruncatemacro{toslide}{fromslide+2}
                      onslide<fromslide-toslide>{
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      pgfmathtruncatemacro{fromslide}{fromslide+1}
                      onslide<fromslide-toslide>{%
                      draw[thick,ccolor] (co,.1ex) --
                      (co,-.1ex) node[below] {$c_{j}$};
                      }
                      onslide<toslide>{%
                      coordinate (a0) at (ao,{f(ao)});
                      draw[dashed,thin,red] (a0 |- xmin,0) -- (a0)
                      -- (a0 -| xmin,0) node[left] {$f(a_{j})$};% dashed lines
                      draw[fill,red] (a0) circle (.05ex);
                      coordinate (c0) at (co,{f(co)});
                      draw[dashed,thin,orange] (c0 |- xmin,0) -- (c0)
                      -- (c0 -| xmin,0) node[left] {$f(c_{j})$};% dashed lines
                      draw[fill,orange] (c0) circle (.05ex);
                      }
                      ifg{f(ao)*f(co)}{0}{ % bisection iteration
                      pgfmathsetmacro{ao}{co}
                      }{%
                      pgfmathsetmacro{bo}{co}
                      }
                      ifxnk%
                      pgfmathtruncatemacro{toslide}{toslide+1}
                      pgfmathtruncatemacro{j}{j+1}
                      onslide<toslide>{%
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      fi
                      }
                      }
                      fi
                      end{tikzpicture}
                      end{center}
                      end{frame}
                      end{document}





                      share|improve this answer


























                      • Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

                        – Xavier
                        Mar 25 '13 at 19:28











                      • Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

                        – jubobs
                        Mar 25 '13 at 19:35






                      • 2





                        @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

                        – Qrrbrbirlbel
                        Mar 25 '13 at 19:56













                      • @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

                        – Xavier
                        Mar 25 '13 at 20:00











                      • @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

                        – jubobs
                        Mar 28 '13 at 14:53
















                      19














                      Implementing the bisection method (and other numerical methods) in TikZ,

                      for exposition purposes.



                      EDIT: Great thanks to percusse for helping me improve my ifg command.



                      enter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description here



                      documentclass[dvipsnames]{beamer}

                      usepackage{lmodern}
                      usepackage{pgfplots}

                      usefonttheme[onlymath]{serif}
                      setbeamertemplate{navigation symbols}{}

                      % 'if #1 greater than #2 then #3 else #4' construct (compatible with pgfmath)
                      newcommand{ifg}[4]{
                      pgfmathparse{(#1)>(#2)?int(1):int(0)}
                      ifnumpgfmathresult=1relax%
                      #3%
                      else%
                      #4%
                      fi%
                      }

                      begin{document}

                      begin{frame}[fragile]
                      begin{center}
                      begin{tikzpicture}[scale=6]
                      pgfmathsetmacro{extendxaxis}{.1}
                      pgfmathsetmacro{extendyaxis}{.3}
                      colorlet{acolor}{red}
                      colorlet{bcolor}{OliveGreen}
                      colorlet{ccolor}{orange}
                      colorlet{fcolor}{blue}
                      pgfmathdeclarefunction{f}{1}{pgfmathparse{.5*(exp(-#1)-#1)}} % continuous function
                      pgfmathsetmacro{ao}{.2} % lower-bound of initial bracket
                      pgfmathsetmacro{bo}{1} % upper-bound of initial bracket
                      pgfmathsetmacro{co}{0} % midpoint of inital bracket (initialised at 0)
                      pgfmathtruncatemacro{n}{3} % number of iterations

                      ifxaobo % check that ao and bo are distinct
                      node[red] (0,0) {Bisection impossible: singleton initial bracket.};
                      else%
                      ifg{ao}{bo}{ % if ao > bo, swop them
                      pgfmathsetmacro{temp}{bo}
                      pgfmathsetmacro{bo}{ao}
                      pgfmathsetmacro{ao}{temp}
                      }{}
                      % code in here
                      ifg{{f(ao)*f(bo)}}{0}{%
                      node[red] (0,0) {Bisection impossible: no root in initial bracket.};
                      }{%
                      onslide<1->{%
                      pgfmathsetmacro{xmin}{ao-.5*extendxaxis*(bo-ao)}
                      pgfmathsetmacro{xmax}{bo+.5*extendxaxis*(bo-ao)}
                      draw[->] (xmin,0) node[left] {$0$} --
                      (xmax,0) node[right] {$x$};
                      pgfmathsetmacro{ymin}{min(f(ao),f(bo))-.5*extendyaxis*abs(f(bo)-f(ao))}
                      pgfmathsetmacro{ymax}{max(f(ao),f(bo))+.5*extendyaxis*abs(f(bo)-f(ao))}
                      draw[->] (xmin,ymin) -- (xmin,ymax) node[left] {$f(x)$};
                      draw[fcolor] plot[domain=xmin:xmax] (x,{f(x)});
                      }
                      pgfplotsforeachungrouped k in {1,2,...,n}{%
                      pgfmathtruncatemacro{k}{k}
                      pgfmathsetmacro{co}{0.5*(ao+bo)}
                      pgfmathtruncatemacro{j}{k-1}
                      pgfmathtruncatemacro{fromslide}{3*(k-1)+2}
                      pgfmathtruncatemacro{toslide}{fromslide+2}
                      onslide<fromslide-toslide>{
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      pgfmathtruncatemacro{fromslide}{fromslide+1}
                      onslide<fromslide-toslide>{%
                      draw[thick,ccolor] (co,.1ex) --
                      (co,-.1ex) node[below] {$c_{j}$};
                      }
                      onslide<toslide>{%
                      coordinate (a0) at (ao,{f(ao)});
                      draw[dashed,thin,red] (a0 |- xmin,0) -- (a0)
                      -- (a0 -| xmin,0) node[left] {$f(a_{j})$};% dashed lines
                      draw[fill,red] (a0) circle (.05ex);
                      coordinate (c0) at (co,{f(co)});
                      draw[dashed,thin,orange] (c0 |- xmin,0) -- (c0)
                      -- (c0 -| xmin,0) node[left] {$f(c_{j})$};% dashed lines
                      draw[fill,orange] (c0) circle (.05ex);
                      }
                      ifg{f(ao)*f(co)}{0}{ % bisection iteration
                      pgfmathsetmacro{ao}{co}
                      }{%
                      pgfmathsetmacro{bo}{co}
                      }
                      ifxnk%
                      pgfmathtruncatemacro{toslide}{toslide+1}
                      pgfmathtruncatemacro{j}{j+1}
                      onslide<toslide>{%
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      fi
                      }
                      }
                      fi
                      end{tikzpicture}
                      end{center}
                      end{frame}
                      end{document}





                      share|improve this answer


























                      • Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

                        – Xavier
                        Mar 25 '13 at 19:28











                      • Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

                        – jubobs
                        Mar 25 '13 at 19:35






                      • 2





                        @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

                        – Qrrbrbirlbel
                        Mar 25 '13 at 19:56













                      • @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

                        – Xavier
                        Mar 25 '13 at 20:00











                      • @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

                        – jubobs
                        Mar 28 '13 at 14:53














                      19












                      19








                      19







                      Implementing the bisection method (and other numerical methods) in TikZ,

                      for exposition purposes.



                      EDIT: Great thanks to percusse for helping me improve my ifg command.



                      enter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description here



                      documentclass[dvipsnames]{beamer}

                      usepackage{lmodern}
                      usepackage{pgfplots}

                      usefonttheme[onlymath]{serif}
                      setbeamertemplate{navigation symbols}{}

                      % 'if #1 greater than #2 then #3 else #4' construct (compatible with pgfmath)
                      newcommand{ifg}[4]{
                      pgfmathparse{(#1)>(#2)?int(1):int(0)}
                      ifnumpgfmathresult=1relax%
                      #3%
                      else%
                      #4%
                      fi%
                      }

                      begin{document}

                      begin{frame}[fragile]
                      begin{center}
                      begin{tikzpicture}[scale=6]
                      pgfmathsetmacro{extendxaxis}{.1}
                      pgfmathsetmacro{extendyaxis}{.3}
                      colorlet{acolor}{red}
                      colorlet{bcolor}{OliveGreen}
                      colorlet{ccolor}{orange}
                      colorlet{fcolor}{blue}
                      pgfmathdeclarefunction{f}{1}{pgfmathparse{.5*(exp(-#1)-#1)}} % continuous function
                      pgfmathsetmacro{ao}{.2} % lower-bound of initial bracket
                      pgfmathsetmacro{bo}{1} % upper-bound of initial bracket
                      pgfmathsetmacro{co}{0} % midpoint of inital bracket (initialised at 0)
                      pgfmathtruncatemacro{n}{3} % number of iterations

                      ifxaobo % check that ao and bo are distinct
                      node[red] (0,0) {Bisection impossible: singleton initial bracket.};
                      else%
                      ifg{ao}{bo}{ % if ao > bo, swop them
                      pgfmathsetmacro{temp}{bo}
                      pgfmathsetmacro{bo}{ao}
                      pgfmathsetmacro{ao}{temp}
                      }{}
                      % code in here
                      ifg{{f(ao)*f(bo)}}{0}{%
                      node[red] (0,0) {Bisection impossible: no root in initial bracket.};
                      }{%
                      onslide<1->{%
                      pgfmathsetmacro{xmin}{ao-.5*extendxaxis*(bo-ao)}
                      pgfmathsetmacro{xmax}{bo+.5*extendxaxis*(bo-ao)}
                      draw[->] (xmin,0) node[left] {$0$} --
                      (xmax,0) node[right] {$x$};
                      pgfmathsetmacro{ymin}{min(f(ao),f(bo))-.5*extendyaxis*abs(f(bo)-f(ao))}
                      pgfmathsetmacro{ymax}{max(f(ao),f(bo))+.5*extendyaxis*abs(f(bo)-f(ao))}
                      draw[->] (xmin,ymin) -- (xmin,ymax) node[left] {$f(x)$};
                      draw[fcolor] plot[domain=xmin:xmax] (x,{f(x)});
                      }
                      pgfplotsforeachungrouped k in {1,2,...,n}{%
                      pgfmathtruncatemacro{k}{k}
                      pgfmathsetmacro{co}{0.5*(ao+bo)}
                      pgfmathtruncatemacro{j}{k-1}
                      pgfmathtruncatemacro{fromslide}{3*(k-1)+2}
                      pgfmathtruncatemacro{toslide}{fromslide+2}
                      onslide<fromslide-toslide>{
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      pgfmathtruncatemacro{fromslide}{fromslide+1}
                      onslide<fromslide-toslide>{%
                      draw[thick,ccolor] (co,.1ex) --
                      (co,-.1ex) node[below] {$c_{j}$};
                      }
                      onslide<toslide>{%
                      coordinate (a0) at (ao,{f(ao)});
                      draw[dashed,thin,red] (a0 |- xmin,0) -- (a0)
                      -- (a0 -| xmin,0) node[left] {$f(a_{j})$};% dashed lines
                      draw[fill,red] (a0) circle (.05ex);
                      coordinate (c0) at (co,{f(co)});
                      draw[dashed,thin,orange] (c0 |- xmin,0) -- (c0)
                      -- (c0 -| xmin,0) node[left] {$f(c_{j})$};% dashed lines
                      draw[fill,orange] (c0) circle (.05ex);
                      }
                      ifg{f(ao)*f(co)}{0}{ % bisection iteration
                      pgfmathsetmacro{ao}{co}
                      }{%
                      pgfmathsetmacro{bo}{co}
                      }
                      ifxnk%
                      pgfmathtruncatemacro{toslide}{toslide+1}
                      pgfmathtruncatemacro{j}{j+1}
                      onslide<toslide>{%
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      fi
                      }
                      }
                      fi
                      end{tikzpicture}
                      end{center}
                      end{frame}
                      end{document}





                      share|improve this answer















                      Implementing the bisection method (and other numerical methods) in TikZ,

                      for exposition purposes.



                      EDIT: Great thanks to percusse for helping me improve my ifg command.



                      enter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description hereenter image description here



                      documentclass[dvipsnames]{beamer}

                      usepackage{lmodern}
                      usepackage{pgfplots}

                      usefonttheme[onlymath]{serif}
                      setbeamertemplate{navigation symbols}{}

                      % 'if #1 greater than #2 then #3 else #4' construct (compatible with pgfmath)
                      newcommand{ifg}[4]{
                      pgfmathparse{(#1)>(#2)?int(1):int(0)}
                      ifnumpgfmathresult=1relax%
                      #3%
                      else%
                      #4%
                      fi%
                      }

                      begin{document}

                      begin{frame}[fragile]
                      begin{center}
                      begin{tikzpicture}[scale=6]
                      pgfmathsetmacro{extendxaxis}{.1}
                      pgfmathsetmacro{extendyaxis}{.3}
                      colorlet{acolor}{red}
                      colorlet{bcolor}{OliveGreen}
                      colorlet{ccolor}{orange}
                      colorlet{fcolor}{blue}
                      pgfmathdeclarefunction{f}{1}{pgfmathparse{.5*(exp(-#1)-#1)}} % continuous function
                      pgfmathsetmacro{ao}{.2} % lower-bound of initial bracket
                      pgfmathsetmacro{bo}{1} % upper-bound of initial bracket
                      pgfmathsetmacro{co}{0} % midpoint of inital bracket (initialised at 0)
                      pgfmathtruncatemacro{n}{3} % number of iterations

                      ifxaobo % check that ao and bo are distinct
                      node[red] (0,0) {Bisection impossible: singleton initial bracket.};
                      else%
                      ifg{ao}{bo}{ % if ao > bo, swop them
                      pgfmathsetmacro{temp}{bo}
                      pgfmathsetmacro{bo}{ao}
                      pgfmathsetmacro{ao}{temp}
                      }{}
                      % code in here
                      ifg{{f(ao)*f(bo)}}{0}{%
                      node[red] (0,0) {Bisection impossible: no root in initial bracket.};
                      }{%
                      onslide<1->{%
                      pgfmathsetmacro{xmin}{ao-.5*extendxaxis*(bo-ao)}
                      pgfmathsetmacro{xmax}{bo+.5*extendxaxis*(bo-ao)}
                      draw[->] (xmin,0) node[left] {$0$} --
                      (xmax,0) node[right] {$x$};
                      pgfmathsetmacro{ymin}{min(f(ao),f(bo))-.5*extendyaxis*abs(f(bo)-f(ao))}
                      pgfmathsetmacro{ymax}{max(f(ao),f(bo))+.5*extendyaxis*abs(f(bo)-f(ao))}
                      draw[->] (xmin,ymin) -- (xmin,ymax) node[left] {$f(x)$};
                      draw[fcolor] plot[domain=xmin:xmax] (x,{f(x)});
                      }
                      pgfplotsforeachungrouped k in {1,2,...,n}{%
                      pgfmathtruncatemacro{k}{k}
                      pgfmathsetmacro{co}{0.5*(ao+bo)}
                      pgfmathtruncatemacro{j}{k-1}
                      pgfmathtruncatemacro{fromslide}{3*(k-1)+2}
                      pgfmathtruncatemacro{toslide}{fromslide+2}
                      onslide<fromslide-toslide>{
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      pgfmathtruncatemacro{fromslide}{fromslide+1}
                      onslide<fromslide-toslide>{%
                      draw[thick,ccolor] (co,.1ex) --
                      (co,-.1ex) node[below] {$c_{j}$};
                      }
                      onslide<toslide>{%
                      coordinate (a0) at (ao,{f(ao)});
                      draw[dashed,thin,red] (a0 |- xmin,0) -- (a0)
                      -- (a0 -| xmin,0) node[left] {$f(a_{j})$};% dashed lines
                      draw[fill,red] (a0) circle (.05ex);
                      coordinate (c0) at (co,{f(co)});
                      draw[dashed,thin,orange] (c0 |- xmin,0) -- (c0)
                      -- (c0 -| xmin,0) node[left] {$f(c_{j})$};% dashed lines
                      draw[fill,orange] (c0) circle (.05ex);
                      }
                      ifg{f(ao)*f(co)}{0}{ % bisection iteration
                      pgfmathsetmacro{ao}{co}
                      }{%
                      pgfmathsetmacro{bo}{co}
                      }
                      ifxnk%
                      pgfmathtruncatemacro{toslide}{toslide+1}
                      pgfmathtruncatemacro{j}{j+1}
                      onslide<toslide>{%
                      draw[thick,acolor] (ao,.1ex) --
                      (ao,-.1ex) node[below] {$a_{j}$}; % a0
                      draw[thick,bcolor] (bo,.1ex) --
                      (bo,-.1ex) node[below] {$b_{j}$}; % b0
                      }
                      fi
                      }
                      }
                      fi
                      end{tikzpicture}
                      end{center}
                      end{frame}
                      end{document}






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jul 7 '13 at 16:28


























                      community wiki





                      9 revs, 2 users 100%
                      Jubobs















                      • Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

                        – Xavier
                        Mar 25 '13 at 19:28











                      • Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

                        – jubobs
                        Mar 25 '13 at 19:35






                      • 2





                        @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

                        – Qrrbrbirlbel
                        Mar 25 '13 at 19:56













                      • @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

                        – Xavier
                        Mar 25 '13 at 20:00











                      • @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

                        – jubobs
                        Mar 28 '13 at 14:53



















                      • Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

                        – Xavier
                        Mar 25 '13 at 19:28











                      • Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

                        – jubobs
                        Mar 25 '13 at 19:35






                      • 2





                        @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

                        – Qrrbrbirlbel
                        Mar 25 '13 at 19:56













                      • @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

                        – Xavier
                        Mar 25 '13 at 20:00











                      • @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

                        – jubobs
                        Mar 28 '13 at 14:53

















                      Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

                      – Xavier
                      Mar 25 '13 at 19:28





                      Do I need to do anything special to compile your code? It hangs with ` File ended while scanning use of next.` :(

                      – Xavier
                      Mar 25 '13 at 19:28













                      Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

                      – jubobs
                      Mar 25 '13 at 19:35





                      Weird. Works great on my machine, but copying and pasting it on the site introduces an error somewhere... I'll figure it out.

                      – jubobs
                      Mar 25 '13 at 19:35




                      2




                      2





                      @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

                      – Qrrbrbirlbel
                      Mar 25 '13 at 19:56







                      @Xavier Remove the white-space in front of end{frame} and it works. The manual states for using fragile: “In this case, […] the end{frame} must be alone on a single line.”

                      – Qrrbrbirlbel
                      Mar 25 '13 at 19:56















                      @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

                      – Xavier
                      Mar 25 '13 at 20:00





                      @Qrrbrbirlbel Thanks! If TeX starts to be picky about spaces, I am lost :)

                      – Xavier
                      Mar 25 '13 at 20:00













                      @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

                      – jubobs
                      Mar 28 '13 at 14:53





                      @percusse Thanks. Feel free to edit my answer accordingly. I've tried your improvement but I get an error...

                      – jubobs
                      Mar 28 '13 at 14:53











                      14














                      Providing an excuse for slacking off



                      Just let (La)TeX burn some CPU cycles while you are relaxing.






                      share|improve this answer





















                      • 4





                        The #1 programmers excuse for legitimately slacking off: xkcd.com/303

                        – Martin Thoma
                        Jul 10 '13 at 17:18
















                      14














                      Providing an excuse for slacking off



                      Just let (La)TeX burn some CPU cycles while you are relaxing.






                      share|improve this answer





















                      • 4





                        The #1 programmers excuse for legitimately slacking off: xkcd.com/303

                        – Martin Thoma
                        Jul 10 '13 at 17:18














                      14












                      14








                      14







                      Providing an excuse for slacking off



                      Just let (La)TeX burn some CPU cycles while you are relaxing.






                      share|improve this answer















                      Providing an excuse for slacking off



                      Just let (La)TeX burn some CPU cycles while you are relaxing.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Apr 13 '17 at 12:35


























                      community wiki





                      3 revs, 2 users 67%
                      krlmlr









                      • 4





                        The #1 programmers excuse for legitimately slacking off: xkcd.com/303

                        – Martin Thoma
                        Jul 10 '13 at 17:18














                      • 4





                        The #1 programmers excuse for legitimately slacking off: xkcd.com/303

                        – Martin Thoma
                        Jul 10 '13 at 17:18








                      4




                      4





                      The #1 programmers excuse for legitimately slacking off: xkcd.com/303

                      – Martin Thoma
                      Jul 10 '13 at 17:18





                      The #1 programmers excuse for legitimately slacking off: xkcd.com/303

                      – Martin Thoma
                      Jul 10 '13 at 17:18











                      13














                      Implementing a Turing machine simulator

                      (TeX is Turing complete)



                      Hail to the busy beaver!






                      share|improve this answer


























                      • Link is broken (domain for sale).

                        – Paŭlo Ebermann
                        Jul 27 '17 at 14:07
















                      13














                      Implementing a Turing machine simulator

                      (TeX is Turing complete)



                      Hail to the busy beaver!






                      share|improve this answer


























                      • Link is broken (domain for sale).

                        – Paŭlo Ebermann
                        Jul 27 '17 at 14:07














                      13












                      13








                      13







                      Implementing a Turing machine simulator

                      (TeX is Turing complete)



                      Hail to the busy beaver!






                      share|improve this answer















                      Implementing a Turing machine simulator

                      (TeX is Turing complete)



                      Hail to the busy beaver!







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      answered May 20 '13 at 18:03


























                      community wiki





                      Xavier














                      • Link is broken (domain for sale).

                        – Paŭlo Ebermann
                        Jul 27 '17 at 14:07



















                      • Link is broken (domain for sale).

                        – Paŭlo Ebermann
                        Jul 27 '17 at 14:07

















                      Link is broken (domain for sale).

                      – Paŭlo Ebermann
                      Jul 27 '17 at 14:07





                      Link is broken (domain for sale).

                      – Paŭlo Ebermann
                      Jul 27 '17 at 14:07











                      13














                      Enrico “egreg” Gregorio posted this into our TeX.sx chat:





                      1. Let me name it xcix.tex, because it’s in the manner of David Carlisle’s xii.tex, cf. Peter Flynn’s answer



                        let~catcode~`x13~`q~`x~`z~`q~`H~`q~`B~`H~`j0~`jA009
                        jlet~jlet~Hjpar ~Bjmscount~~jdef~x{q bottlez of beer}
                        ~jw{x on the wall}~jt{jadvanceAB-1ATake one down Aand
                        pass it around,H}B99~ji{jifnumB}~q{ji=0Nojelsejnumber
                        Bjfi}~z{ji>1sjfiA }jloop jifnumB>0 jw, x,Hjtjw.jvskip
                        8ptplus1ptjrepeat Time to buy some more beerjdotsjend


                        (source link)




                      2. The same as LaTeX3 version



                        documentclass{article}
                        usepackage{xparse}

                        setlength{parindent}{0pt}
                        setlength{parskip}{1.5ex}

                        ExplSyntaxOn
                        % user level command
                        NewDocumentCommand{beers} { O{99} }
                        {
                        manual_beers_sing:n { #1 }
                        }
                        % variables
                        int_new:N l_manual_beers_count_int
                        % functions
                        cs_new_protected:Npn manual_beers_sing:n #1
                        {
                        int_set:Nn l_manual_beers_count_int { #1 }
                        prg_replicate:nn { l_manual_beers_count_int }
                        {
                        manual_beers_print:
                        int_decr:N l_manual_beers_count_int
                        }
                        Time ~ to ~ buy ~ some ~ more ~ beer ~ dots
                        }
                        cs_new_protected:Npn manual_beers_print:
                        {
                        manual_beer_text:nn { ~ on ~ the ~ wall }{ 0 }, ~
                        manual_beer_text:nn { } { 0 }, \
                        Take ~ one ~ down ~ and ~ pass ~ it ~ around, \
                        manual_beer_text:nn { ~ on ~ the ~ wall } { -1 }.par
                        }
                        cs_new:Npn manual_beer_text:nn #1 #2
                        {
                        int_case:nnF { l_manual_beers_count_int + #2 }
                        {
                        { 0 } { No ~ bottle ~ of ~ beer }
                        { 1 } { 1 ~ bottle ~ of ~ beer }
                        }
                        {
                        int_to_arabic:n { l_manual_beers_count_int + #2 } ~ bottles ~ of ~ beer
                        }
                        #1
                        }
                        ExplSyntaxOff
                        begin{document}
                        beers
                        end{document}


                        (source link, small correction; the code as seen above is, though, in this version, as it will appear in a manual by Enrico, which is in the moment, this code was posted, in process of writing)




                      This was influenced by me, because I had posted these two links:




                      • 99 Bottles of Beer | Language TeX/LaTeX (for compilation read comment of Kiyoshi Akima below that code)


                      • 99 Bottles of Beer | Language LaTeX2e loading fmtcount and tikz
                        (which has a link to an older version 99 Bottles of Beer | Language LaTeX2e working with memoir and loading only ifthen)







                      share|improve this answer


























                      • May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

                        – awllower
                        Oct 6 '16 at 7:47
















                      13














                      Enrico “egreg” Gregorio posted this into our TeX.sx chat:





                      1. Let me name it xcix.tex, because it’s in the manner of David Carlisle’s xii.tex, cf. Peter Flynn’s answer



                        let~catcode~`x13~`q~`x~`z~`q~`H~`q~`B~`H~`j0~`jA009
                        jlet~jlet~Hjpar ~Bjmscount~~jdef~x{q bottlez of beer}
                        ~jw{x on the wall}~jt{jadvanceAB-1ATake one down Aand
                        pass it around,H}B99~ji{jifnumB}~q{ji=0Nojelsejnumber
                        Bjfi}~z{ji>1sjfiA }jloop jifnumB>0 jw, x,Hjtjw.jvskip
                        8ptplus1ptjrepeat Time to buy some more beerjdotsjend


                        (source link)




                      2. The same as LaTeX3 version



                        documentclass{article}
                        usepackage{xparse}

                        setlength{parindent}{0pt}
                        setlength{parskip}{1.5ex}

                        ExplSyntaxOn
                        % user level command
                        NewDocumentCommand{beers} { O{99} }
                        {
                        manual_beers_sing:n { #1 }
                        }
                        % variables
                        int_new:N l_manual_beers_count_int
                        % functions
                        cs_new_protected:Npn manual_beers_sing:n #1
                        {
                        int_set:Nn l_manual_beers_count_int { #1 }
                        prg_replicate:nn { l_manual_beers_count_int }
                        {
                        manual_beers_print:
                        int_decr:N l_manual_beers_count_int
                        }
                        Time ~ to ~ buy ~ some ~ more ~ beer ~ dots
                        }
                        cs_new_protected:Npn manual_beers_print:
                        {
                        manual_beer_text:nn { ~ on ~ the ~ wall }{ 0 }, ~
                        manual_beer_text:nn { } { 0 }, \
                        Take ~ one ~ down ~ and ~ pass ~ it ~ around, \
                        manual_beer_text:nn { ~ on ~ the ~ wall } { -1 }.par
                        }
                        cs_new:Npn manual_beer_text:nn #1 #2
                        {
                        int_case:nnF { l_manual_beers_count_int + #2 }
                        {
                        { 0 } { No ~ bottle ~ of ~ beer }
                        { 1 } { 1 ~ bottle ~ of ~ beer }
                        }
                        {
                        int_to_arabic:n { l_manual_beers_count_int + #2 } ~ bottles ~ of ~ beer
                        }
                        #1
                        }
                        ExplSyntaxOff
                        begin{document}
                        beers
                        end{document}


                        (source link, small correction; the code as seen above is, though, in this version, as it will appear in a manual by Enrico, which is in the moment, this code was posted, in process of writing)




                      This was influenced by me, because I had posted these two links:




                      • 99 Bottles of Beer | Language TeX/LaTeX (for compilation read comment of Kiyoshi Akima below that code)


                      • 99 Bottles of Beer | Language LaTeX2e loading fmtcount and tikz
                        (which has a link to an older version 99 Bottles of Beer | Language LaTeX2e working with memoir and loading only ifthen)







                      share|improve this answer


























                      • May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

                        – awllower
                        Oct 6 '16 at 7:47














                      13












                      13








                      13







                      Enrico “egreg” Gregorio posted this into our TeX.sx chat:





                      1. Let me name it xcix.tex, because it’s in the manner of David Carlisle’s xii.tex, cf. Peter Flynn’s answer



                        let~catcode~`x13~`q~`x~`z~`q~`H~`q~`B~`H~`j0~`jA009
                        jlet~jlet~Hjpar ~Bjmscount~~jdef~x{q bottlez of beer}
                        ~jw{x on the wall}~jt{jadvanceAB-1ATake one down Aand
                        pass it around,H}B99~ji{jifnumB}~q{ji=0Nojelsejnumber
                        Bjfi}~z{ji>1sjfiA }jloop jifnumB>0 jw, x,Hjtjw.jvskip
                        8ptplus1ptjrepeat Time to buy some more beerjdotsjend


                        (source link)




                      2. The same as LaTeX3 version



                        documentclass{article}
                        usepackage{xparse}

                        setlength{parindent}{0pt}
                        setlength{parskip}{1.5ex}

                        ExplSyntaxOn
                        % user level command
                        NewDocumentCommand{beers} { O{99} }
                        {
                        manual_beers_sing:n { #1 }
                        }
                        % variables
                        int_new:N l_manual_beers_count_int
                        % functions
                        cs_new_protected:Npn manual_beers_sing:n #1
                        {
                        int_set:Nn l_manual_beers_count_int { #1 }
                        prg_replicate:nn { l_manual_beers_count_int }
                        {
                        manual_beers_print:
                        int_decr:N l_manual_beers_count_int
                        }
                        Time ~ to ~ buy ~ some ~ more ~ beer ~ dots
                        }
                        cs_new_protected:Npn manual_beers_print:
                        {
                        manual_beer_text:nn { ~ on ~ the ~ wall }{ 0 }, ~
                        manual_beer_text:nn { } { 0 }, \
                        Take ~ one ~ down ~ and ~ pass ~ it ~ around, \
                        manual_beer_text:nn { ~ on ~ the ~ wall } { -1 }.par
                        }
                        cs_new:Npn manual_beer_text:nn #1 #2
                        {
                        int_case:nnF { l_manual_beers_count_int + #2 }
                        {
                        { 0 } { No ~ bottle ~ of ~ beer }
                        { 1 } { 1 ~ bottle ~ of ~ beer }
                        }
                        {
                        int_to_arabic:n { l_manual_beers_count_int + #2 } ~ bottles ~ of ~ beer
                        }
                        #1
                        }
                        ExplSyntaxOff
                        begin{document}
                        beers
                        end{document}


                        (source link, small correction; the code as seen above is, though, in this version, as it will appear in a manual by Enrico, which is in the moment, this code was posted, in process of writing)




                      This was influenced by me, because I had posted these two links:




                      • 99 Bottles of Beer | Language TeX/LaTeX (for compilation read comment of Kiyoshi Akima below that code)


                      • 99 Bottles of Beer | Language LaTeX2e loading fmtcount and tikz
                        (which has a link to an older version 99 Bottles of Beer | Language LaTeX2e working with memoir and loading only ifthen)







                      share|improve this answer















                      Enrico “egreg” Gregorio posted this into our TeX.sx chat:





                      1. Let me name it xcix.tex, because it’s in the manner of David Carlisle’s xii.tex, cf. Peter Flynn’s answer



                        let~catcode~`x13~`q~`x~`z~`q~`H~`q~`B~`H~`j0~`jA009
                        jlet~jlet~Hjpar ~Bjmscount~~jdef~x{q bottlez of beer}
                        ~jw{x on the wall}~jt{jadvanceAB-1ATake one down Aand
                        pass it around,H}B99~ji{jifnumB}~q{ji=0Nojelsejnumber
                        Bjfi}~z{ji>1sjfiA }jloop jifnumB>0 jw, x,Hjtjw.jvskip
                        8ptplus1ptjrepeat Time to buy some more beerjdotsjend


                        (source link)




                      2. The same as LaTeX3 version



                        documentclass{article}
                        usepackage{xparse}

                        setlength{parindent}{0pt}
                        setlength{parskip}{1.5ex}

                        ExplSyntaxOn
                        % user level command
                        NewDocumentCommand{beers} { O{99} }
                        {
                        manual_beers_sing:n { #1 }
                        }
                        % variables
                        int_new:N l_manual_beers_count_int
                        % functions
                        cs_new_protected:Npn manual_beers_sing:n #1
                        {
                        int_set:Nn l_manual_beers_count_int { #1 }
                        prg_replicate:nn { l_manual_beers_count_int }
                        {
                        manual_beers_print:
                        int_decr:N l_manual_beers_count_int
                        }
                        Time ~ to ~ buy ~ some ~ more ~ beer ~ dots
                        }
                        cs_new_protected:Npn manual_beers_print:
                        {
                        manual_beer_text:nn { ~ on ~ the ~ wall }{ 0 }, ~
                        manual_beer_text:nn { } { 0 }, \
                        Take ~ one ~ down ~ and ~ pass ~ it ~ around, \
                        manual_beer_text:nn { ~ on ~ the ~ wall } { -1 }.par
                        }
                        cs_new:Npn manual_beer_text:nn #1 #2
                        {
                        int_case:nnF { l_manual_beers_count_int + #2 }
                        {
                        { 0 } { No ~ bottle ~ of ~ beer }
                        { 1 } { 1 ~ bottle ~ of ~ beer }
                        }
                        {
                        int_to_arabic:n { l_manual_beers_count_int + #2 } ~ bottles ~ of ~ beer
                        }
                        #1
                        }
                        ExplSyntaxOff
                        begin{document}
                        beers
                        end{document}


                        (source link, small correction; the code as seen above is, though, in this version, as it will appear in a manual by Enrico, which is in the moment, this code was posted, in process of writing)




                      This was influenced by me, because I had posted these two links:




                      • 99 Bottles of Beer | Language TeX/LaTeX (for compilation read comment of Kiyoshi Akima below that code)


                      • 99 Bottles of Beer | Language LaTeX2e loading fmtcount and tikz
                        (which has a link to an older version 99 Bottles of Beer | Language LaTeX2e working with memoir and loading only ifthen)








                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Apr 13 '17 at 12:34


























                      community wiki





                      4 revs, 2 users 77%
                      Speravir














                      • May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

                        – awllower
                        Oct 6 '16 at 7:47



















                      • May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

                        – awllower
                        Oct 6 '16 at 7:47

















                      May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

                      – awllower
                      Oct 6 '16 at 7:47





                      May I ask what is mscount? I surmise it is like newcount, but cannot find it anywhere. Thanks a lot in advance.

                      – awllower
                      Oct 6 '16 at 7:47











                      2














                      The avremu package



                      …emulates an 8-bit CPU (ATmega8).






                      share|improve this answer





















                      • 1





                        From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

                        – egreg
                        Mar 26 at 18:22
















                      2














                      The avremu package



                      …emulates an 8-bit CPU (ATmega8).






                      share|improve this answer





















                      • 1





                        From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

                        – egreg
                        Mar 26 at 18:22














                      2












                      2








                      2







                      The avremu package



                      …emulates an 8-bit CPU (ATmega8).






                      share|improve this answer















                      The avremu package



                      …emulates an 8-bit CPU (ATmega8).







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      answered Mar 26 at 15:14


























                      community wiki





                      Damien Pollet









                      • 1





                        From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

                        – egreg
                        Mar 26 at 18:22














                      • 1





                        From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

                        – egreg
                        Mar 26 at 18:22








                      1




                      1





                      From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

                      – egreg
                      Mar 26 at 18:22





                      From the manual: “This picture (250x250) took 44 hours to render. ”. ;-)

                      – egreg
                      Mar 26 at 18:22





                      protected by Loop Space Mar 26 '13 at 23:05



                      Thank you for your interest in this question.
                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                      Would you like to answer one of these unanswered questions instead?



                      Popular posts from this blog

                      Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                      ComboBox Display Member on multiple fields

                      Is it possible to collect Nectar points via Trainline?