Your SlideShare is downloading. ×
0
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Dia.debian 2013, Trinidade-GO
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Dia.debian 2013, Trinidade-GO

224

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
224
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END Uso de LATEXpara Impressões em Aplicativos Ole Peter Smith ole@mat.ufg.br http://www.ime.ufg.brt/docentes/olepeter Instituto de Matemática e Estatística, Universidade Federal de Goiás Trinidade-GO 17/08/2013
  • 2. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END LATEX Um Software Livre dos mais Clássicos... • Markup Languages • HTML • LATEX • RichText • ODT • Doc. Structure • Preamble • Body • Postamble
  • 3. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END LATEX& Friends • Kile, TexMaker • BibTeX • CTAN: http://www.ctan.org • latexusersgroup@googlegroups.com • latex-br@googlegroups.com • abntex2 • Beamer - Slides • Corretor gramatica, Vero: http://www.broffice.org/verortografico • Corretor ortografica, Cogroo: http://cogroo.sourceforge.net
  • 4. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END HTML • Preamble: <HTML> <HEAD> ... </HEAD> <BODY> • Body: Dia que bosta vale ouro Os pobres todos nascer~ao sem... • Postamble: </BODY> </HTML>
  • 5. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END LATEX • Preamble: documentype[opt-args]{comp-args} ... ... begin{document} • Body: Se voc^e n~ao faz parte da soluç~ao Provavelmente faz do problema... • Postamble: end{document}
  • 6. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END CGI • CGI Headers: print "Content-Type: text/htmlnn"; • Printable: • Produce some LATEX • Save in /tmp/$doc.$mtime.tex. • $res=system(”cd /tmp;pdflatex $doc.$mtime.tex”) • If successfull ($res>0) • print "Content-Type: application/pdfnn"; print readfile($doc.$mtime.’’.tex’’); exit(); Elsewise (non-production): • Show /tmp/latex.log • Show ’nicely’: /tmp/$doc.$mtime.tex
  • 7. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END WOOIDs Webbased OO Interface on Databases • SiDS, SiPE, SiVent, SAdE, SAdE2... • CRUDs: • Singular: Show, Edit, Add, Copy • Plural: List, EditList, [AddList, CopyList] • Print, PrintList • Search • $this->LatexDocs: Singular - Plural
  • 8. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END Latex Setup $this->SingularLatexDocs=array ( //Global Options "Landscape" => FALSE, "Head" => "Head.tex", "SkelPath" => "System/Latex", "TmpPath" => "/tmp", "Docs" => array ( array ( //Specific Options "Name" => "Horários", "Name_UK" => "Schedule", "Head" => "Head.Schedule.tex", "Glue" => "Glue.Schedule.tex", "Tail" => "Tail.Schedule.tex", "AltHandler" => "PrintSchedule", //delegate "Singular" => TRUE, "Plural" => TRUE, ), //.... ), );
  • 9. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END Generate • function PrintLatex($latex): • function RunLatex($latexfile): /usr/bin/pdflatex -interaction nonstopmode -output-directory $1 $1/$2 > $1/latex.log 2>&1 • function Item2Latex($item,$doc) • function PrintItem($item,$singulardoc) • Items2Latex($items,$pluraldoc) { $latex=""; foreach ($items as $item) { $latex.=$this->Item2Latex($item,$pluraldoc) } } • PrintItems($items,$pluraldoc)
  • 10. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END My HTML ’Handies’ • function H($level,$text) { if ($this->LatexMode) { return "<H".$level.">".$text."</H".$level.">"; } else { $types=array("Huge","huge","LARGE","Large","large"); return ’’.$types[ $level-1 ]."{".$text."}"; } } • Ignore FORMS & INPUTs • HREFs: usepackage{href}: Linked Documents!
  • 11. MADE IN LATEX OLE PETER SMITH, IME, UFG: OLE@MAT.UFG.BR - HTTP://WWW.IME.UFG.BR/DOCENTES/OLEPETER INTRO HTML/LATEX WEBAPPS & LATEX THE END Vive como se fosse viver para sempre - Aprende como se fosse morrer amanhã! Einstein Life sure is a Mystery to be Lived Not a Problem to be Solved Please Always Enjoy!

×