[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-326734-105":59,"doc-detail-326734-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","the-computer-science-of-tex-and-latex-computer-science-course-594-fall-2004","THE COMPUTER SCIENCE OF TEX AND LATEX - COMPUTER SCIENCE COURSE 594, FALL 2004","","Draft lecture notes for a computer science course titled “The Computer Science of TeX and LaTeX,” taught for the first time in the fall of 2004. The notes present an overview of LaTeX document preparation and style programming, then progress through parsing concepts, Lex and Yacc tooling, and hashing. Later chapters address TeX paragraph and line/page breaking, fonts, Bezier curve approximation and graphics, character encoding and font encoding, macro/language topics in TeX, and software engineering principles.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/the-computer-science-of-tex-and-latex-computer-science-course-594-fall-2004/326734/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/the-computer-science-of-tex-and-latex-computer-science-course-594-fall-2004/326734.png","ImageObject",300,407,{"name":92,"@type":93},"Asher","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28","2026-09-21",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",14,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What is the document’s purpose and what stance does it take about accuracy?","Question",{"text":113,"@type":114},"It provides draft lecture notes for a course taught in fall 2004 and explicitly warns that the notes may contain inaccuracies, errors, and minor mistakes. The author invites comments to point out issues.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"Which main topics are covered in the lectures?",{"text":118,"@type":114},"The notes cover LaTeX document markup and concepts, parsing fundamentals including Lex and Yacc, hashing, TeX line and page breaking, fonts and graphics topics, TeX macros and lambda calculus, character encoding, and software engineering themes.",{"name":120,"@type":111,"acceptedAnswer":121},"How are document markup and TeX conceptual ideas introduced?",{"text":122,"@type":114},"The material starts by explaining why LaTeX can seem unfamiliar to WYSIWYG users, then outlines the history of document markup and motivates control sequences and layout control. It then proceeds into document markup fundamentals and related concepts.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},326734,1790527526,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":147,"preview_urls":148},687197207639,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","THE COMPUTER SCIENCE OF TEX AND LATEX; COMPUTER SCIENCE COURSE 594, FALL 2004  \nVICTOR EIJKHOUT  \nDEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF TENNESSEE, KNOXVILLE TN 37996  \nDRAFT LECTURE NOTES  \nAbout this book.  \nThese are the lecture notes of a course I taught in the fall of 2004 . This was the ﬁrst time I taught the course, and the ﬁrst time this course was taught, period. These lecture notes, therefore, are probably full of inaccuracies, mild ﬁbs, and gross errors. Ok, make that ‘are deﬁnitely full of &c’, because I know of several errors that time has prevented me from addressing.  \nHowever, I would be interested in hearing any comments and suggestions you have, or errors you would like to point out.  \nVictor Eijkhout [eijkhout@cs.utk.edu](eijkhout@cs.utk.edu)[ ](eijkhout@cs.utk.edu)Knoxville, TN, december 2004 .  \nEnjoy!  \nContents  \nAbout this book 1  \n1 TEX and LATEX 5  \nLATEX 6  \n1.1 Document markup 6  \n1.2 The absolute basics of LATEX 8  \n1.3 The TEX conceptual model of typesetting 10  \n1.4 Text elements 11  \n1.5 Tables and ﬁgures 19  \n1.6 Math 19  \n1.7 References 21  \n1.8 Some TEXnical issues 23  \n1.9 Customizing LATEX 23  \n1.10 Extensions to LATEX 27  \nTEX programming 30 TEX visuals 31 Projects for this chapter 32  \n2 Parsing 33 Parsing theory 34  \n2.1 Levels of parsing 34  \n2.2 Very short introduction 34 Lexical analysis 37  \n2.3 Finite state automata and regular languages 37  \n2.4 Lexical analysis with FSAs 41  \nSyntax parsing 43  \n2.5 Context-free languages 43  \n2.6 Parsing context-free languages 45  \nLex 56  \n2.7 Introduction 56  \n2.8 Structure of a lex ﬁle 56  \n2.9 Deﬁnitions section 57  \n2.10 Rules section 57  \n2.11 Regular expressions 60  \n2.12 Remarks 60  \n2.13 Examples 61  \nYacc 65  \n2.14 Introduction 65  \n2.15 Structure ofayacc ﬁle 65  \n2.16 Motivating example 65  \n2.17 Deﬁnitions section 67  \n2.18 Lex Yacc interaction 67  \n2.19 Rules section 69  \n2.20 Operators; precedence and associativity 69  \n2.21 Further remarks 70  \n2.22 Examples 73  \nHashing 79  \n2.23 Introduction 79  \n2.24 Hash functions 79  \n2.25 Collisions 82  \n2.26 Other applications of hashing 86  \n2.27 Discussion 87  \nProjects for this chapter 88  \n3 Breaking things into pieces 89  \nDynamic  \nProgramming 90  \n3.1 Some examples 90  \n3.2 Discussion 96  \nTEX paragraph  \nbreaking 98  \n3.3 The elements ofa paragraph 98  \n3.4 TEX's line breaking algorithm 102  \nNP completeness 110  \n3.5 Introduction 110  \n3.6 Basics 111  \n3.7 Complexity classes 112  \n3.8 NP-completeness 114  \nPage breaking 118  \n3.9 Introduction 118  \n3.10 TEX's page breaking algorithm 118  \n3.11 Theory of page breaking 120  \nProjects for this  \nchapter 128  \n4 Fonts 129 Bezier curves 130  \n4.1 Introduction to curve approximation 130  \n4.2 Parametric curves 135  \n4.3 Practical use 143  \nCurve plotting with gnuplot 145  \n4.4 Introduction 145  \n4.5 Plotting 146  \nRaster graphics 147  \n4.6 Vector graphics and raster graphics 147  \n4.7 Basic raster graphics 147  \n4.8 Rasterizing type 150  \n4.9 Anti-aliasing 154  \nProjects for this  \nchapter 157  \n5 TEX’s macro language  \n– unﬁnished  \nchapter 159  \nLambda calculus in TEX 160  \n5.1 Logic with TEX 160  \n6 Character encoding 171  \nInput ﬁle encoding 172  \n6.1 History and context 172  \n6.2 Unicode 175  \n6.3 More about character sets and encodings 178  \n6.4 Character issues in TEX / LATEX 180  \nFont encoding 183  \n6.5 Basic terminology 183  \n6.6 Æsthetics 185  \n6.7 Font technologies 186  \n6.8 Font handling in TEX and LATEX 189  \nInput and output  \nencoding in LATEX 191  \n6.9 The fontenc package 191  \nProjects for this  \nchapter 192  \n7 Software engineering 193 Literate programming 194  \n7.1 The Web system 194  \n7.2 Knuth's philosophy of program development 194 Software engineering 195  \n7.3 Extremely brief history  \nof TEX 195  \n7.4 TEX's development 195  \nMarkup 198  \n7.5 History 198  \nProjects for this  \nchapter 200  \nVictor Eijkhout  \nTEX – LATEX – CS 594  \nChapter 1  \nTEX and LATEX  \nIn this chapter we will learn  \n􀀏 The use of LATEX","cbCaivN1LTPLy4bt","https://ap.wps.com/l/cbCaivN1LTPLy4bt","pdf",1535638,206,"English","# About this book\n# TEX and LATEX\n## Document markup\n## The absolute basics of LaTeX\n## The TEX conceptual model of typesetting\n## Text elements\n## Tables and figures\n## Math\n## References\n## Some TEXnical issues\n## Customizing LATEX\n## Extensions to LATEX\n# TEX programming\n## Parsing\n### Levels of parsing\n### Very short introduction\n### Finite state automata and regular languages\n## Lex\n## Yacc\n# Hashing\n# Breaking things into pieces\n## TEX paragraph breaking\n## TEX's line breaking algorithm\n## NP-completeness\n## Page breaking\n# Fonts\n## Curve plotting with gnuplot\n# TEX’s macro language - unﬁnished\n# Lambda calculus in TEX\n# Character encoding\n## Unicode\n## Character issues in TEX / LATEX\n# Software engineering","[{\"question\":\"What is the document’s purpose and what stance does it take about accuracy?\",\"answer\":\"It provides draft lecture notes for a course taught in fall 2004 and explicitly warns that the notes may contain inaccuracies, errors, and minor mistakes. The author invites comments to point out issues.\"},{\"question\":\"Which main topics are covered in the lectures?\",\"answer\":\"The notes cover LaTeX document markup and concepts, parsing fundamentals including Lex and Yacc, hashing, TeX line and page breaking, fonts and graphics topics, TeX macros and lambda calculus, character encoding, and software engineering themes.\"},{\"question\":\"How are document markup and TeX conceptual ideas introduced?\",\"answer\":\"The material starts by explaining why LaTeX can seem unfamiliar to WYSIWYG users, then outlines the history of document markup and motivates control sequences and layout control. It then proceeds into document markup fundamentals and related concepts.\"}]","THE COMPUTER SCIENCE OF TEX AND LATEX - COMPUTER SCIENCE COURSE 594, FALL 2004 | PDF",1789975218,519,21,[149,153,157,161,165,169,173,177,181,185,189,194,199,204,208,213,218,223,228,232,236],{"page_no":8,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/17d7bc4483fbc38d3743e9ce01fc5f3e.webp",983,1272,{"page_no":14,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/9ec629858df9b697464619993a0e57ff.webp",982,1270,{"page_no":81,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/406408d1dcf37611aca012417b5de58b.webp",981,1269,{"page_no":19,"url":162,"width":163,"height":164},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/7c3cc87bf5bf6af051df20581c099f5d.webp",980,1268,{"page_no":24,"url":166,"width":167,"height":168},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/c25110c3034448e3614bbc4bd5a7309a.webp",979,1267,{"page_no":29,"url":170,"width":171,"height":172},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ac213a9748478f9ab84cc080ecf50a5d.webp",978,1265,{"page_no":34,"url":174,"width":175,"height":176},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/7ee971b7bf75878be9e02c32165e533f.webp",977,1264,{"page_no":39,"url":178,"width":179,"height":180},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/cba92552da42341e7d86d5fc878a78d4.webp",976,1263,{"page_no":44,"url":182,"width":183,"height":184},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/982b9d34c1ab4e1e52a21a69d403914e.webp",975,1261,{"page_no":52,"url":186,"width":187,"height":188},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3a4ac30e44f83cdc851d74c932716487.webp",974,1260,{"page_no":190,"url":191,"width":192,"height":193},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0125367b20cdc53e82fcebb41c252373.webp",973,1259,{"page_no":195,"url":196,"width":197,"height":198},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/82222588c160a3ca527570c7980fff76.webp",972,1257,{"page_no":200,"url":201,"width":202,"height":203},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d967161ef8db266dcf0736a21eefe63b.webp",971,1256,{"page_no":105,"url":205,"width":206,"height":207},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/5524e5a14557d90e4c6399ca2e9cb57e.webp",970,1255,{"page_no":209,"url":210,"width":211,"height":212},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/37d21f3b0b42e65eca96754188b9bbdc.webp",969,1254,{"page_no":214,"url":215,"width":216,"height":217},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/48045884d7add50f518343c0c36dbbd6.webp",968,1252,{"page_no":219,"url":220,"width":221,"height":222},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/cb7f770ab9f0fc5ab6b3ed6520223ef6.webp",967,1251,{"page_no":224,"url":225,"width":226,"height":227},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/9e7e6f29d50b0fd40da8c316aa9bfa2e.webp",966,1250,{"page_no":56,"url":229,"width":230,"height":231},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/f17eb147056e34ea0fc148950ac909e7.webp",965,1248,{"page_no":46,"url":233,"width":234,"height":235},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/a8148593cf05c6ecb8815028d4733984.webp",964,1247,{"page_no":147,"url":237,"width":238,"height":239},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3f0ef56854390d27cac48e0e79ff6942.webp",963,1246]