Wprowadzenie Do Latexa
Total Page:16
File Type:pdf, Size:1020Kb
Wprowadzenie do LATEXa Proseminarium „Biomatematyka i Teoria Gier” Co to jest TEX? TEX powstał w Stanach Zjednoczonych na Uniwersytecie Stanforda a jego autorem jest wybitny informatyk profesor Donald E. Knuth. Prac˛enad systemem rozpocz ˛ałw 1977 roku a u˙zywany w obecnej postaci TEX został udost˛epniony w 1982 roku a ukonczony´ w 1986 roku. TeX to system składu drukarskiego, dost˛epny w ka˙zdymu˙zywanym współczesnie´ systemie operacyjnym. Rozpowszechniany jest na licencji typu Open Source. LATEX to zestaw polecen,´ które ułatwiaj ˛akorzystanie z systemu TEX i składnie dokumentów. LATEX(tak˙zeTEX) jest systemem składu tekstu typu WYSIWYM (What You See Is What You Mean) — okreslamy´ logiczn ˛astruktur˛edokumentu a program zajmuje si˛euło˙zeniemtekstu zgodnie zadan ˛astruktur ˛a. Mo˙znatraktowac´ TEXa (LATEXa) jako j˛ezykprogramowania, w którym programujemy wygl ˛addokumentu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 1 / 42 Co to jest TEX? TEX powstał w Stanach Zjednoczonych na Uniwersytecie Stanforda a jego autorem jest wybitny informatyk profesor Donald E. Knuth. Prac˛enad systemem rozpocz ˛ałw 1977 roku a u˙zywany w obecnej postaci TEX został udost˛epniony w 1982 roku a ukonczony´ w 1986 roku. TeX to system składu drukarskiego, dost˛epny w ka˙zdymu˙zywanym współczesnie´ systemie operacyjnym. Rozpowszechniany jest na licencji typu Open Source. LATEX to zestaw polecen,´ które ułatwiaj ˛akorzystanie z systemu TEX i składnie dokumentów. LATEX(tak˙zeTEX) jest systemem składu tekstu typu WYSIWYM (What You See Is What You Mean) — okreslamy´ logiczn ˛astruktur˛edokumentu a program zajmuje si˛euło˙zeniemtekstu zgodnie zadan ˛astruktur ˛a. Mo˙znatraktowac´ TEXa (LATEXa) jako j˛ezykprogramowania, w którym programujemy wygl ˛addokumentu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 1 / 42 Co to jest TEX? TEX powstał w Stanach Zjednoczonych na Uniwersytecie Stanforda a jego autorem jest wybitny informatyk profesor Donald E. Knuth. Prac˛enad systemem rozpocz ˛ałw 1977 roku a u˙zywany w obecnej postaci TEX został udost˛epniony w 1982 roku a ukonczony´ w 1986 roku. TeX to system składu drukarskiego, dost˛epny w ka˙zdymu˙zywanym współczesnie´ systemie operacyjnym. Rozpowszechniany jest na licencji typu Open Source. LATEX to zestaw polecen,´ które ułatwiaj ˛akorzystanie z systemu TEX i składnie dokumentów. LATEX(tak˙zeTEX) jest systemem składu tekstu typu WYSIWYM (What You See Is What You Mean) — okreslamy´ logiczn ˛astruktur˛edokumentu a program zajmuje si˛euło˙zeniemtekstu zgodnie zadan ˛astruktur ˛a. Mo˙znatraktowac´ TEXa (LATEXa) jako j˛ezykprogramowania, w którym programujemy wygl ˛addokumentu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 1 / 42 Wady i zalety LATEXa (TEXa) Zalety: wysoka jakos´c´ składu; mo˙zliwos´c´ dopasowywania do specjalizowanych zadan;´ łatwa współpraca z innymi aplikacjami; przenosno´ s´c´ (na (prawie) ka˙zdejplatformie systemowej działa identycznie); Mo˙zliwe problemy: kodowanie niestandardowych znaków (np. polskich ogonków); brak zainstalowanych pewnych pakietów; wykorzystanie nowych mo˙zliwosci,´ które w starych wersjach mog ˛anie działac;´ łatwos´c´ składu tekstu matematycznego; du˙zemo˙zliwosci:´ automatyczne numerowanie (równan,´ tabel, rysunków, twierdzen,´ itp.), automatyczne tworzenie spisów (tresci,´ rysunków, tabel), indeksów; za darmo. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 2 / 42 Wady i zalety LATEXa (TEXa) Wady: Do LATEXa trzeba si˛eprzyzwyczaic´ — nie jest to edytor typu WYSIWYG; Napisanie prostego, kilku zdaniowego dokumentu (np. podania) zajmuje wi˛ecejczasu ni˙zw Wordzie, OpenOffice czy w innym podobnym programie. Z drugiej strony nauczenie si˛ekorzystania z automatycznego numerowania, automatycznych odnosników,´ spisów tresci´ itp. w Wordzie jest równie czasochłonne (a mo˙ze i bardziej czasochłonne) ni˙zopanowanie tych rzeczy w LATEXu; Skład dokumentu z du˙z˛aliczb ˛aobrazków i tabel mo˙zebyc´ wyzwaniem; WLATEXu trudno jest pisac´ bałaganiarskie dokumenty bez ˙zadnej struktury; Modyfikowanie wygl ˛adudokumentu (i dostosowywanie go do swoich wyobra˙zen)´ nie jest łatwe (chocia˙zdost˛epnestyle dokumentów zwykle s ˛adostatecznie ładne). Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 3 / 42 LATEX a Word (i inne podobne programy) ∞ MS Word LATEX przygotowanie dokumentu wysiłek i czas potrzebny na wielkos´c´ i zło˙zonos´c´ dokumentu Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 4 / 42 Jak to działa? Dokument (program) napisany w LATEXu umieszczamy w pliku plik.tex. Plik plik.tex kompilujemy: poleceniem latex otrzymuj ˛ac plik.dvi. Nast˛epnie dvips produkuje plik PostScriptowy plik.ps a dvipdfm tworzy plik plik.pdf. poleceniem pdflatex otrzymuj ˛ac plik.pdf. Device Independent (plik.dvi) dvips latex dvipdfm LATEX PostScript (plik.tex) plik.ps pdflatex ps2pdf Portable Format Document plik.pdf Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 5 / 42 Jak to działa? Oba dokumenty (ps i pdf) s ˛arównowa˙znetak długo jak nie umieszczamy w dokumencie obrazków i nie u˙zywamy polecen´ specyficznych dla jednego formatu. Na przykład w pliku pdf mo˙znaumieszczac´ odnosniki´ (linki) do innych miejsc w dokumencie i stron internetowych, czego w pliku PostScript-owym zrobic´ si˛enie da. Dokument z formatu PDF zawsze mo˙znaskonwertowac´ do formatu PostScript i odwrotnie (trac ˛acprzy tym rzeczy specyficzne dla formatu PDF). Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 6 / 42 Sk ˛adwzi ˛ac´ LATEXa? Najłatwiej jest sci´ ˛agn˛ac´ go całkowicie za darmo z internetu. W sieci s ˛a dost˛epnedwie główne dystrybucje TEXa. TEXLive — opracowany przez TUG (TeX User Group), dost˛epny pod Windowsa, Linuxa (instalowany tak˙zez niektórymi dystrybucjami) i Maca (http://www.tug.org/texlive/). Aktualna wersja to TEXLive 2016. MikTeX — dost˛epny pod Windowsa. ( http://miktex.org/) Aktualna wersja: 2.9. Zapowiedziana jest wersja pod Linuxa (zima 2016/lato 2017). Aby tworzyc´ dokumenty w LATEXu wystarczy dowolny edytor tekstu (np. Windowsowy notatnik). Jednak s ˛aedytory które znacznie ułatwiaj ˛apisanie w LATEXu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 7 / 42 Sk ˛adwzi ˛ac´ LATEXa? Najłatwiej jest sci´ ˛agn˛ac´ go całkowicie za darmo z internetu. W sieci s ˛a dost˛epnedwie główne dystrybucje TEXa. TEXLive — opracowany przez TUG (TeX User Group), dost˛epny pod Windowsa, Linuxa (instalowany tak˙zez niektórymi dystrybucjami) i Maca (http://www.tug.org/texlive/). Aktualna wersja to TEXLive 2016. MikTeX — dost˛epny pod Windowsa. ( http://miktex.org/) Aktualna wersja: 2.9. Zapowiedziana jest wersja pod Linuxa (zima 2016/lato 2017). Aby tworzyc´ dokumenty w LATEXu wystarczy dowolny edytor tekstu (np. Windowsowy notatnik). Jednak s ˛aedytory które znacznie ułatwiaj ˛apisanie w LATEXu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 7 / 42 Sk ˛adwzi ˛ac´ LATEXa? Najłatwiej jest sci´ ˛agn˛ac´ go całkowicie za darmo z internetu. W sieci s ˛a dost˛epnedwie główne dystrybucje TEXa. TEXLive — opracowany przez TUG (TeX User Group), dost˛epny pod Windowsa, Linuxa (instalowany tak˙zez niektórymi dystrybucjami) i Maca (http://www.tug.org/texlive/). Aktualna wersja to TEXLive 2016. MikTeX — dost˛epny pod Windowsa. ( http://miktex.org/) Aktualna wersja: 2.9. Zapowiedziana jest wersja pod Linuxa (zima 2016/lato 2017). Aby tworzyc´ dokumenty w LATEXu wystarczy dowolny edytor tekstu (np. Windowsowy notatnik). Jednak s ˛aedytory które znacznie ułatwiaj ˛apisanie w LATEXu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 7 / 42 Sk ˛adwzi ˛ac´ LATEXa? Najłatwiej jest sci´ ˛agn˛ac´ go całkowicie za darmo z internetu. W sieci s ˛a dost˛epnedwie główne dystrybucje TEXa. TEXLive — opracowany przez TUG (TeX User Group), dost˛epny pod Windowsa, Linuxa (instalowany tak˙zez niektórymi dystrybucjami) i Maca (http://www.tug.org/texlive/). Aktualna wersja to TEXLive 2016. MikTeX — dost˛epny pod Windowsa. ( http://miktex.org/) Aktualna wersja: 2.9. Zapowiedziana jest wersja pod Linuxa (zima 2016/lato 2017). Aby tworzyc´ dokumenty w LATEXu wystarczy dowolny edytor tekstu (np. Windowsowy notatnik). Jednak s ˛aedytory które znacznie ułatwiaj ˛apisanie w LATEXu. Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 7 / 42 Edytory do LATEXa — cz˛es´c´ I Edytory WYSIWYG Scientific WorkPlace — płatny, dla studentów za $260 (Win); LyX — za darmo dla wszystkich ( http://www.lyx.org/) (Win, Linux, Mac); BaKoMa TeX Word — płatny, dla studentów e55 ( http://www.bakoma-tex.com/) (Win, Linux, Mac). Edytory on-line (serwisy do skł ˛aduLATEXa) Authorea — https://www.authorea.com/ Overleaf — https://www.overleaf.com/ Papeeria — https://www.papeeria.com/ ShareLATEX — https://www.sharelatex.com/ VerbTEX — https://www.verbosus.com/ (tak˙zeaplikacja na systemy mobilne) Biomatematyka i Teoria Gier Wprowadzenie do LATEXa 10 listopada 2016 8 / 42 Edytory do LATEXa — cz˛es´c´ I Edytory WYSIWYG Scientific WorkPlace — płatny, dla studentów za $260 (Win); LyX — za darmo dla wszystkich ( http://www.lyx.org/) (Win, Linux, Mac); BaKoMa TeX Word — płatny, dla studentów e55 ( http://www.bakoma-tex.com/) (Win, Linux, Mac). Edytory on-line (serwisy do skł ˛aduLATEXa) Authorea — https://www.authorea.com/ Overleaf — https://www.overleaf.com/ Papeeria — https://www.papeeria.com/ ShareLATEX — https://www.sharelatex.com/ VerbTEX — https://www.verbosus.com/ (tak˙zeaplikacja na systemy mobilne) Biomatematyka i Teoria Gier Wprowadzenie do LATEXa