Quick
index
main
eev
maths
blogme
dednat6
littlelangs
PURO
(GAC2,
C3TD,
λMDetc)
(Chapa 1)

emacs
lua
(la)tex
fvwm
tcl
forth
icon
debian
irc
contact

Tipografia Digital 2019.1 - Eduardo Ochs

Salas, horários, etc

O curso vai ser uma versão muito ampliada do minicurso de LaTeX que eu dei em fevereiro no Gragoatá.
Slides de apresentação do curso do Gragoatá.

Os temas principais do curso iam ser Emacs+eev, LaTeX, Lua e little languages... mas as minhas impressões sobre o que as pessoas iam achar fácil ou difícil estavam bem erradas, e eu acabei enfatizando muito a idéia de aprender a guardar hyperlinks pra tudo que a gente encontra de interessante - porque acho que o curso seria praticamente inútil se as pessoas não aprendessem isso.

Um texto sobre guardar hiperlinks:

. (find-escripts-intro "5. Tools for writing e-scripts")
  (find-escripts-intro "5. Tools for writing e-scripts" "We saw")

We saw how to follow links and how to execute eepitch blocks, so
an e-script block is "executable". But in what sense it is a
"log"?

  1. In the old days log books were always made of paper, and
     there was nothing automatic in taking notes with them. We
     would have to decide what to write and how to write it, and
     we would have to alternate between the "task" and "taking
     notes". After many years of practice _some_ people would
     learn how to take notes without distracting themselves much
     from the task at hand, and they would learn how to make
     their notes at the same time concise and readable enough.

  2. Nowadays, with computers, there are _some_ ways to write
     logs automatically - for example, most shells record the
     commands given to them - but the output is of low quality.

  3. Eev takes an intermediate stance between "notes by hand"
     and "automatic notes". It is possible to do
     "task"+"notes" with just a few more keystrokes than for
     doing just "task", but that requires learning some tricks,
     and having some practice.

Uma figura importante:

(find-refining-intro "4. A tip for beginners")

  ._______________________________________
  |                 |                     |
  |                 |       elinks        |
  |   target    `M-h M-h'   buffer:       |
  |   buffer:   ::::::::>   `M-h M-y      |
  |   `M-w'         |        M-h M-w'     |
  |                 |                     |
  |                 |        ::`M-1 M-j'  |
  |                 |_______ :: __________|
  |                 |        \/           |
  |                 |                     |
  |             `M-K M-K'   notes         |
  |             <::::::::   buffer:       |
  |                 |       `C-y'         |
  |                 |                     |
  |_________________|_____________________|

Como as máquinas do LabEng só têm Windows o Davi vai instalar máquinas virtuais com Linux nelas, e rodar isto aqui nas máquinas virtuais:

# Pacotes Debian:
sudo apt-get install emacs24 emacs24-el xpdf lua5.1 lua5.1-doc poppler-utils texworks

# Pra instalar a versão upstream do TeXLive:
mkdir -p $S/http/mirror.ctan.org/systems/texlive/tlnet/
cd       $S/http/mirror.ctan.org/systems/texlive/tlnet/
rm -fv   $S/http/mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
wget      http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
# (find-fline "$S/http/mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz")
# ^ Check the date

rm -Rfv ~/usrc/install-tl-20190227/
mkdir   ~/usrc/
tar  -C ~/usrc/ -xvzf $S/http/mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
cd      ~/usrc/install-tl-20190227/
sudo ./install-tl

# O "install-tl" mostra um menu com opções e um prompt. Rode a opção "I".
# Actions:
#  <I> start installation to hard disk

Na aula 1 usamos estes slides,
depois seguimos as instruções daqui: (find-eev-quick-intro)
O script de instalação é o abaixo; rode-o com cut & paste para um terminal.

# «install-eev»
{
  rm -Rv ~/eev
  rm -Rv ~/eev2/
  mkdir  ~/eev2/
  cd     ~/eev2/
  rm -v eev2.tgz
  wget http://angg.twu.net/eev-current/eev2.tgz
  tar -xvzf eev2.tgz
  {
    echo '#!/bin/sh'
    echo 'cd ~/eev2/ && emacs -l eev-beginner.el --eval="(find-eev-quick-intro)" $*'
  } > ~/eev
  chmod 755 ~/eev
}

Copie o bloco abaixo pro seu ~/.emacs:

;; Se voce tiver esquecido tudo...
;; `M-j' lista os targets do eejump,
;;       (find-eev-quick-intro "7.2. The list of eejump targets")
;; `M-5 M-j': (find-eev-quick-intro)
;; `M-2 M-j': (find-emacs-keys-intro)
;; `M-1 M-j': (find-fline "~/TODO")
;; `M-5 M-5 M-j': (find-fline "~/.emacs")
;;                (find-elnode "Init File" ".emacs")

(add-to-list 'load-path "~/eev2/")
(add-to-list 'load-path "~/.emacs.d/elpa/eev-20190410/")
(require 'eev-load)                 ; (find-eev "eev-load.el")
(require 'eev-beginner)             ; (find-eev "eev-beginner.el")
(eev-beginner)                      ; (find-eev "eev-beginner.el")

(defun tdw () (interactive) (find-wget "http://angg.twu.net/2019.1-TD/NOTES"))
(defun tdw () (interactive) (find-wget "http://192.168.197.71:8000/2019.1-TD/NOTES"))
(defun tdw () (interactive) (find-wget "http://192.168.196.171:8000/2019.1-TD/NOTES"))

(setenv "PATH" (format "/usr/local/texlive/2018/bin/x86_64-linux:%s" (getenv "PATH")))

;; (find-rcirc-intro)
;; (find-node "(rcirc)rcirc commands" "/nick alex-test")
;;
(setq rcirc-default-nick "td-andre")
(rcirc-track-minor-mode 1)
(global-set-key [f2] 'rcirc-next-active-buffer)
(setq ee-freenode-ichannels "#eev")
(setq ee-freenode-achannels nil)
(defun e2 () (interactive) (find-freenode-2a "#eev"))
(defun e3 () (interactive) (find-freenode-3a "#eev"))

(code-c-d      "lshort" "/usr/local/texlive/2018/texmf-dist/doc/latex/lshort-english/")
(code-pdf-page "lshort" "/usr/local/texlive/2018/texmf-dist/doc/latex/lshort-english/lshort.pdf")
(code-pdf-text "lshort" "/usr/local/texlive/2018/texmf-dist/doc/latex/lshort-english/lshort.pdf" 14)
;; (find-lshortfile "")
;; (find-lshortpage)
;; (find-lshorttext)
;; (find-lshortpage        7 "Contents")
;; (find-lshorttext        7 "Contents")
;; (find-lshortpage (+ 14  1) "1 Things You Need to Know")
;; (find-lshortpage (+ 14  1) "1.1 A Bit of History")
;; (find-lshortpage (+ 14  1) "1.1.1 TEX")
;; (find-lshortpage (+ 14  2) "1.1.2 LATEX")
;; (find-lshortpage (+ 14  2) "1.2 Basics")
;; (find-lshortpage (+ 14  2) "1.2.1 Author, Book Designer, and Typesetter")
;; (find-lshortpage (+ 14  2) "1.2.2 Layout Design")
;; (find-lshortpage (+ 14  3) "1.2.3 Advantages and Disadvantages")
;; (find-lshortpage (+ 14  4) "1.3 LATEX Input Files")
;; (find-lshortpage (+ 14  4) "1.3.1 Spaces")
;; (find-lshortpage (+ 14  5) "1.3.2 Special Characters")
;; (find-lshortpage (+ 14  5) "1.3.3 LATEX Commands")
;; (find-lshortpage (+ 14  6) "1.3.4 Comments")
;; (find-lshortpage (+ 14  7) "1.4 Input File Structure")
;; (find-lshortpage (+ 14  7) "1.5 A Typical Command Line Session")
;; (find-lshortpage (+ 14  9) "1.6 The Layout of the Document")
;; (find-lshortpage (+ 14  9) "1.6.1 Document Classes")
;; (find-lshortpage (+ 14 11) "1.6.2 Packages")
;; (find-lshortpage (+ 14 11) "1.6.3 Page Styles")
;; (find-lshortpage (+ 14 11) "1.7 Files You Might Encounter")
;; (find-lshortpage (+ 14 14) "1.8 Big Projects")
;; (find-lshortpage (+ 14 15) "2 Typesetting Text")
;; (find-lshortpage (+ 14 15) "2.1 The Structure of Text and Language")
;; (find-lshortpage (+ 14 17) "2.2 Line Breaking and Page Breaking")
;; (find-lshortpage (+ 14 17) "2.2.1 Justified Paragraphs")
;; (find-lshortpage (+ 14 18) "2.2.2 Hyphenation")
;; (find-lshortpage (+ 14 19) "2.3 Ready-Made Strings")
;; (find-lshortpage (+ 14 19) "2.4 Special Characters and Symbols")
;; (find-lshortpage (+ 14 19) "2.4.1 Quotation Marks")
;; (find-lshortpage (+ 14 20) "2.4.2 Dashes and Hyphens")
;; (find-lshortpage (+ 14 20) "2.4.3 Tilde ()")
;; (find-lshortpage (+ 14 20) "2.4.4 Slash (/)")
;; (find-lshortpage (+ 14 20) "2.4.5 Degree Symbol ()")
;; (find-lshortpage (+ 14 21) "2.4.6 The Euro Currency Symbol (e)")
;; (find-lshortpage (+ 14 21) "2.4.7 Ellipsis (...)")
;; (find-lshortpage (+ 14 22) "2.4.8 Ligatures")
;; (find-lshortpage (+ 14 22) "2.4.9 Accents and Special Characters")
;; (find-lshortpage (+ 14 22) "2.5 International Language Support")
;; (find-lshortpage (+ 14 23) "2.5.1 Polyglossia Usage")
;; (find-lshortpage (+ 14 27) "2.6 The Space Between Words")
;; (find-lshortpage (+ 14 27) "2.7 Titles, Chapters, and Sections")
;; (find-lshortpage (+ 14 30) "2.8 Cross References")
;; (find-lshortpage (+ 14 30) "2.9 Footnotes")
;; (find-lshortpage (+ 14 31) "2.10 Emphasized Words")
;; (find-lshortpage (+ 14 31) "2.11 Environments")
;; (find-lshortpage (+ 14 31) "2.11.1 Itemize, Enumerate, and Description")
;; (find-lshortpage (+ 14 32) "2.11.2 Flushleft, Flushright, and Center")
;; (find-lshortpage (+ 14 33) "2.11.3 Quote, Quotation, and Verse")
;; (find-lshortpage (+ 14 33) "2.11.4 Abstract")
;; (find-lshortpage (+ 14 34) "2.11.5 Printing Verbatim")
;; (find-lshortpage (+ 14 34) "2.11.6 Tabular")
;; (find-lshortpage (+ 14 37) "2.12 Including Graphics and Images")
;; (find-lshortpage (+ 14 39) "2.13 Floating Bodies")
;; (find-lshortpage (+ 14 43) "3 Typesetting Mathematical Formulae")
;; (find-lshortpage (+ 14 43) "3.1 The AMS-LATEX bundle")
;; (find-lshortpage (+ 14 43) "3.2 Single Equations")
;; (find-lshortpage (+ 14 45) "3.2.1 Math Mode")
;; (find-lshortpage (+ 14 46) "3.3 Building Blocks of a Mathematical Formula")
;; (find-lshortpage (+ 14 51) "3.4 Single Equations that are Too Long: multline")
;; (find-lshortpage (+ 14 52) "3.5 Multiple Equations")
;; (find-lshortpage (+ 14 52) "3.5.1 Problems with Traditional Commands")
;; (find-lshortpage (+ 14 54) "3.5.2 IEEEeqnarray Environment")
;; (find-lshortpage (+ 14 55) "3.5.3 Common Usage")
;; (find-lshortpage (+ 14 57) "3.6 Arrays and Matrices")
;; (find-lshortpage (+ 14 59) "3.7 Spacing in Math Mode")
;; (find-lshortpage (+ 14 60) "3.7.1 Phantoms")
;; (find-lshortpage (+ 14 60) "3.8 Fiddling with the Math Fonts")
;; (find-lshortpage (+ 14 61) "3.8.1 Bold Symbols")
;; (find-lshortpage (+ 14 61) "3.9 Theorems, Lemmas,")
;; (find-lshortpage (+ 14 62) "3.9.1 Proofs and End-of-Proof Symbol")
;; (find-lshortpage (+ 14 65) "3.10 List of Mathematical Symbols")

(code-c-d "tl"        "/usr/local/texlive/2018/")
(code-c-d "tlmanuals" "/usr/local/texlive/2018/texmf-dist/doc/context/documents/general/manuals/")
;; (find-tlfile "")
;; (find-tlsh "find * | sort")
;; (find-tlfile "texmf-dist/doc/context/documents/general/manuals/")
;; (find-tlmanualsfile "")

(code-c-d      "texbook" "~/usrc/texbook/")
(code-xpdf     "texbook" "~/usrc/texbook/texbook.pdf")
(code-pdf-text "texbook" "~/usrc/texbook/texbook.pdf" 12)

;; (find-texbookfile "texbook.tex")
;; (find-texbookpage)
;; (find-texbooktext)
;; (find-texbookpage        10  "Contents")
;; (find-texbookpage (+ 11   1) "1 The Name of the Game")
;; (find-texbookpage (+ 11   3) "2 Book Printing versus Ordinary Typing")
;; (find-texbookpage (+ 11   7) "3 Controlling TEX")
;; (find-texbookpage (+ 11  13) "4 Fonts of Type")
;; (find-texbookpage (+ 11  19) "5 Grouping")
;; (find-texbookpage (+ 11  23) "6 Running TEX")
;; (find-texbookpage (+ 11  37) "7 How TEX Reads What You Type")
;; (find-texbookpage (+ 11  43) "8 The Characters You Type")
;; (find-texbookpage (+ 11  51) "9 TEX's Roman Fonts")
;; (find-texbookpage (+ 11  57) "10 Dimensions")
;; (find-texbookpage (+ 11  63) "11 Boxes")
;; (find-texbookpage (+ 11  69) "12 Glue")
;; (find-texbookpage (+ 11  85) "13 Modes")
;; (find-texbookpage (+ 11  91) "14 How TEX Breaks Paragraphs into Lines")
;; (find-texbookpage (+ 11 109) "15 How TEX Makes Lines into Pages")
;; (find-texbookpage (+ 11 127) "16 Typing Math Formulas")
;; (find-texbookpage (+ 11 139) "17 More about Math")
;; (find-texbookpage (+ 11 161) "18 Fine Points of Mathematics Typing")
;; (find-texbookpage (+ 11 185) "19 Displayed Equations")
;; (find-texbookpage (+ 11 199) "20 Definitions (also called Macros)")
;; (find-texbookpage (+ 11 221) "21 Making Boxes")
;; (find-texbookpage (+ 11 231) "22 Alignment")
;; (find-texbookpage (+ 11 251) "23 Output Routines")
;; (find-texbookpage (+ 11 267) "24 Summary of Vertical Mode")
;; (find-texbookpage (+ 11 285) "25 Summary of Horizontal Mode")
;; (find-texbookpage (+ 11 289) "26 Summary of Math Mode")
;; (find-texbookpage (+ 11 295) "27 Recovery from Errors")
;; (find-texbookpage (+ 11 305) "A Answers to All the Exercises")
;; (find-texbookpage (+ 11 339) "B Basic Control Sequences")
;; (find-texbookpage (+ 11 367) "C Character Codes")
;; (find-texbookpage (+ 11 373) "D Dirty Tricks")
;; (find-texbookpage (+ 11 403) "E Example Formats")
;; (find-texbookpage (+ 11 427) "F Font Tables")
;; (find-texbookpage (+ 11 441) "G Generating Boxes from Formulas")
;; (find-texbookpage (+ 11 449) "H Hyphenation")
;; (find-texbookpage (+ 11 457) "I Index")
;; (find-texbookpage (+ 11 483) "J Joining the TEX Community")
;; (find-texbookpage (+ 11 427) "Font tables")
;; (find-texbookpage (+ 11 457) "Index")
;; (find-texbooktext (+ 11 457) "Index")
;; (find-texbooktext)


# «emacs-para-windows»

Dicas pra instação do Emacs no Windows: baixe o .zip do quarto
link abaixo e siga as instruções a partir do "Unzip the zip
file":

  https://www.gnu.org/software/emacs/
  https://www.gnu.org/software/emacs/download.html#windows
  http://gnu.c3sl.ufpr.br/ftp/emacs/windows/
  http://gnu.c3sl.ufpr.br/ftp/emacs/windows/emacs-25/emacs-25.2-x86_64.zip

  Unzip the zip file preserving the directory structure, and run
  bin\runemacs.exe. Alternatively, create a desktop shortcut to
  bin\runemacs.exe, and start Emacs by double-clicking on that
  shortcut's icon.

Depois instale o eev usando o `M-x list-packages'.
Ative o eev rodando `M-x eev-beginner'.


# «texlive-para-windows»

Pra instalar o TeXLive no Windows use o "install-tl-windows.exe".
A gente encontrou ele seguindo estes links aqui:

 https://www.tug.org/texlive/doc.html
 -> https://www.tug.org/texlive/doc/texlive-en/texlive-en.html
  -> http://tug.org/texlive/acquire.html
   -> http://tug.org/texlive/acquire-netinstall.html
    -> http://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe

 Um teste:
  (executable-find "lualatex")
  -> "c:/texlive/2019/bin/win32/lualatex.exe"


# «texworks-para-windows»

Links:

 http://www.tug.org/texworks/
 -> http://www.tug.org/texworks/#Getting_TeXworks
  -> https://github.com/TeXworks/texworks/releases
   -> https://github.com/TeXworks/texworks/releases/download/release-0.6.3/TeXworks-win-setup-0.6.3-201903161732-git_a2470ca.exe

Um teste: 
 (executable-find "texworks")
 -> "c:/texlive/2019/bin/win32/texworks.exe"


Nós usamos o quadro bem pouco no curso (fotos abaixo). Quase toda a comunicação era feita por IRC - e eu guardei os logs.

PDFs com todos os quadros:
http://angg.twu.net/2019.1-TD/2019.1-TD.pdf

Fotos dos quadros:
http://angg.twu.net/2019.1-TD/20190329_TD1.jpg
http://angg.twu.net/2019.1-TD/20190403_TD1.jpg
http://angg.twu.net/2019.1-TD/20190405_TD1.jpg
http://angg.twu.net/2019.1-TD/20190426_TD1.jpg
http://angg.twu.net/2019.1-TD/20190517_TD1.jpg
http://angg.twu.net/2019.1-TD/20190522_TD1.jpg
http://angg.twu.net/2019.1-TD/20190524_TD1.jpg
http://angg.twu.net/2019.1-TD/20190529_TD1.jpg
http://angg.twu.net/2019.1-TD/20190531_TD1.jpg
http://angg.twu.net/2019.1-TD/20190607_TD1.jpg
http://angg.twu.net/2019.1-TD/20190626_TD1.jpg
http://angg.twu.net/2019.1-TD/20190628_TD1.jpg
http://angg.twu.net/2019.1-TD/20190703_TD1.jpg
Notas (por enquanto):
Alline     10.0
André      10.0
Beatriz    10.0
Jessica    10.0
Paulo      10.0

Ayrton      8.0
Guilherme   8.0
Ruan        8.0
Renan       7.0
Lucas       6.0
Daniel      6.0

Avaliação do curso

O curso teve um monte de problemas técnicos: 1) eu tinha pedido uma sala com computadores com Linux, mas tive que usar um laboratório em que os computadores só tinham Windows; 2) eu pedi pro técnico do laboratório preparar máquinas virtuais com Linux - com determinados programas extras instalados nelas - e instalar essas máquinas virtuais nos computadores, mas ele não conseguiu fazer isso... a nossa sorte foi que um dos alunos do curso, o Ayrton Cavalieri, sabia fazer isso e se ofereceu pra preparar a VM ele mesmo, em casa, e instalar cópias dela em vários computadores do laboratório (obrigado, Ayrton!!!). O curso começou uma semana depois do previsto por causa disso; 3) o laboratório tinha um cache de HTTP que ninguém entendia direito como funcionava - nem o técnico - e isso fez com que o modo "óbvio" de passar pros alunos as notas de aula atualizadas desse uns bugs que eu tive que resolver...

O meu objetivo com o curso era que os alunos aprendessem o básico pra se tornarem autônomos em LaTeX, e pra mim esse "básico" incluia eles se tornarem capazes de se virar com a documentação do LaTeX, que está espalhada em 4 ou 5 PDFs principais e centenas de PDFs secundários (os dos pacotes extras). Eu insisti muito pra que eles aprendessem a usar o Emacs como editor porque no Emacs era fácil criar "anotações executáveis" sobre as coisas que eles estavam aprendendo e era fácil criar hiperlinks pros PDFs que eles fossem usar, e até pra páginas desses PDFs. No final do curso todos os alunos, exceto um, estavam conseguindo usar esse sistema de criar hiperlinks pra páginas de PDFs muito bem, e estavam conseguindo aprender "features" novos sozinhos bem rápido - o "exceto um" era um aluno que odiou o Emacs e que tem uma memória incrível; ele (achava que) nunca precisa voltar a um PDF que ele já tinha lido.

Um curso ideal de Tipografia Digital teria BEM mais conteúdo do que esse acabou tendo, mas a gente teve montes de problemas técnicos pra resolver, e eu tive que aprender tudo sobre como rodar LaTeX e Emacs no Windows (com um pouco de ajuda dos alunos). O próximo vai ser bem melhor - e vai poder ter uma versão "minicurso" com poucas aulas.