How Computers Make Books: From graphics rendering, search algorithms, and functional programming to indexing and typesetting
()
About this ebook
How Computers Make Books introduces what’s wonderful about computer science by showing how computers have transformed the art of publishing books. Author and publishing software developer John Whitington reveals the elegant computer science solutions invented to solve big publishing challenges.
In How Computers Make Books you’ll discover:
- How human descriptions are translated into computer programs
- How a computer can understand document formatting
- How a program decides where to print ink on a page
- Why computer science is so interesting to computer scientists, and why it might interest you
- …and much more!
How do computers represent all the different languages and letters used by humans? How do we compress a book’s worth of complex information so it can be transferred in seconds? And what exactly is a computer program? This book answers all those questions by telling the story of how it was created!
About the technology
Computers are part of every step in creating a book, from capturing the author’s words as a digital document to controlling how the ink gets onto the paper. How Computers Make Books introduces basic computer science concepts like file formatting, transfer, and storage, computer programming, and task automation by guiding you through the modern digital printing process.
About the book
This book takes you on a journey from the plain white page, weaving through typesetting, making gray images from black ink, electronic file formats, and more. It makes computer science come alive as you see how every word, illustration, and page has its own story. You’ll even learn to write your own simple programs and discover hands-on what’s so intoxicating about computer science.
What's inside
- How human descriptions are translated into computer programs
- How a digital computer thinks about print documents
- How a program decides where to print ink on a page
- How the history of typesetting shows up in modern books
About the reader
For the curious-but-clueless about computer science—and anyone interested in how computers make books!
About the author
John Whitington is the founder of a company that builds software for electronic document processing. He has studied and taught Computer Science at Queens’ College, Cambridge.
Technical editor on this book was Bojan Stojanovic.
Table of Contents
1 Putting marks on paper
2 Letter forms
3 Storing words
4 Looking and finding
5 Typing it in
6 Saving space
7 The sums behind the screen
8 Gray areas
9 A typeface
10 Words to paragraphs
11 Out into the world
John Whitington
John Whitington is the founder of a company which builds software for electronic document processing. He has studied and taught Computer Science at Queens' College, Cambridge and has authored a number of computer science textbooks.
Related to How Computers Make Books
Related ebooks
Instant MapReduce Patterns – Hadoop Essentials How-to Rating: 0 out of 5 stars0 ratingsBusiness rules A Complete Guide Rating: 0 out of 5 stars0 ratingsIBM Cognos Business Intelligence 10.1 Dashboarding Cookbook Rating: 0 out of 5 stars0 ratingsLPI Web Development Essentials Study Guide: Exam 030-100 Rating: 0 out of 5 stars0 ratingsDart for Flutter Rating: 0 out of 5 stars0 ratingsThe JavaScript Journey: From Basics to Full-Stack Mastery Rating: 0 out of 5 stars0 ratingsRacket Unleashed: Building Powerful Programs with Functional and Language-Oriented Programming Rating: 0 out of 5 stars0 ratingsNet Developer's Interview Toolkit: Dot Net Interview Preparation, #3 Rating: 0 out of 5 stars0 ratingsJavaScript Concurrency Rating: 0 out of 5 stars0 ratingsSoftware Development Accelerated Essentials: What You Didn't Know, You Needed to Know Rating: 0 out of 5 stars0 ratingsAPIs Made Easy Rating: 0 out of 5 stars0 ratingsMastering C: A Comprehensive Guide to Programming Excellence Rating: 0 out of 5 stars0 ratingsData Engineering with Databricks Cookbook: Build effective data and AI solutions using Apache Spark, Databricks, and Delta Lake Rating: 0 out of 5 stars0 ratingsSchematron: A language for validating XML Rating: 0 out of 5 stars0 ratingsSwift in the Cloud Rating: 0 out of 5 stars0 ratingsMastering Ada Programming: From Basics to Expert Proficiency Rating: 0 out of 5 stars0 ratingsScientific Computing with Scala Rating: 0 out of 5 stars0 ratingsJava EE 7 First Look Rating: 0 out of 5 stars0 ratingsJavascript Mastery: In-Depth Techniques and Strategies for Advanced Development Rating: 0 out of 5 stars0 ratingsIntroduction to Python Programming Rating: 0 out of 5 stars0 ratingsSpring 2.5 Aspect Oriented Programming Rating: 0 out of 5 stars0 ratingsFunctional Programming in C#: Classic Programming Techniques for Modern Projects Rating: 0 out of 5 stars0 ratingsLearning RabbitMQ: Build and optimize efficient messaging applications with ease Rating: 0 out of 5 stars0 ratingsReal-World Solutions for Developing High-Quality PHP Frameworks and Applications Rating: 3 out of 5 stars3/5PHP 8: The Modern Web Developer's Guide Rating: 0 out of 5 stars0 ratings
Computers For You
Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Elon Musk Rating: 4 out of 5 stars4/5Some Future Day: How AI Is Going to Change Everything Rating: 0 out of 5 stars0 ratingsThe ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 5 out of 5 stars5/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5Computer Science I Essentials Rating: 5 out of 5 stars5/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsDiscord For Dummies Rating: 0 out of 5 stars0 ratingsThe Insider's Guide to Technical Writing Rating: 0 out of 5 stars0 ratingsThe Self-Taught Computer Scientist: The Beginner's Guide to Data Structures & Algorithms Rating: 0 out of 5 stars0 ratingsLearning the Chess Openings Rating: 5 out of 5 stars5/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5User Friendly: How the Hidden Rules of Design Are Changing the Way We Live, Work, and Play Rating: 4 out of 5 stars4/5The Technological Republic: Hard Power, Soft Belief, and the Future of the West Rating: 0 out of 5 stars0 ratings
Reviews for How Computers Make Books
0 ratings0 reviews
Book preview
How Computers Make Books - John Whitington
How Computers Make Books
John Whitington
MANNING
SHELTER ISLAND
For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: [email protected]
©2024 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
♾ Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine.
ISBN: 9781633438675
contents
preface
Acknowledgments
About this book
About the author
About the cover
1 Putting marks on paper
1.1 Where things go
1.2 Placing dots
1.3 Making lines
1.4 Building shapes
1.5 Problems
1.6 Summary
2 Letter forms
2.1 Straight and curved lines
2.2 Computerized curves
2.3 Complications
2.4 Problems
2.5 Summary
3 Storing words
3.1 Ancient methods
3.2 Numbers in computing
3.3 An international standard
3.4 Formatting
3.5 Modern encoding systems
3.6 Problems
3.7 Summary
4 Looking and finding
4.1 A simple method
4.2 Writing a program
4.3 Speed
4.4 A faster algorithm
4.5 Problems
4.6 Summary
5 Typing it in
5.1 Beginnings
5.2 Layouts
5.3 Other languages
5.4 Summary
6 Saving space
6.1 Compression
6.2 Patterns
6.3 Frequency
6.4 Compressing images
6.5 Shades of gray
6.6 Problems
6.7 Summary
7 The sums behind the screen
7.1 Simple calculations
7.2 More general computation
7.3 More operators
7.4 A larger function
7.5 A second task
7.6 Lists
7.7 Sorting a list
7.8 Problems
7.9 Summary
8 Gray areas
8.1 Simple thresholding
8.2 Historical methods
8.3 Digital halftoning
8.4 Better dithering
8.5 Problems
8.6 Summary
9 A typeface
9.1 Introducing Palatino
9.2 Glyphs and metrics
9.3 Different sizes and shapes
9.4 Problems
9.5 Summary
10 Words to paragraphs
10.1 A paragraph of text
10.2 Hyphenation
10.3 Paragraphs on a page
10.4 Before computers
10.5 Problems
10.6 Summary
11 Out into the world
11.1 Final output for printing
11.2 eBooks
11.3 Introducing PDF
11.4 Building a PDF
11.5 Conclusion
11.6 Summary
Appendix A. Further reading
A.1 Chapter 1
A.2 Chapter 2
A.3 Chapter 3
A.4 Chapter 4
A.5 Chapter 5
A.6 Chapter 6
A.7 Chapter 7
A.8 Chapter 8
A.9 Chapter 9
A.10 Chapter 10
A.11 Chapter 11
Appendix B. Solutions
B.1 Chapter 1
B.2 Chapter 2
B.3 Chapter 3
B.4 Chapter 4
B.5 Chapter 6
B.6 Chapter 7
B.7 Chapter 8
B.8 Chapter 9
B.9 Chapter 10
Appendix C. Templates
Appendix D. Palatino Roman glyphs
index
preface
It can be tremendously difficult for an outsider to understand why computer scientists are interested in computer science. It is easy to see the sense of wonder of the astrophysicist or the evolutionary biologist or zoologist. We don’t know too much about the mathematician, but we are in awe anyway. But computer science? Well, we suppose it must have to do with computers at least. Computer science is no more about computers than astronomy is about telescopes,
wrote the great Dutch computer scientist Edsger Dijkstra (1930–2002). That is to say, the computer is our tool for exploring this subject and for building things in its world, but it is not the world itself.
This book makes no attempt at completeness whatsoever. It is a set of little sketches of the use of computer science to address the problems of book production. By looking from different angles at interesting challenges and pretty solutions, we hope to gain some insight into the essence of the thing.
I hope that, by the end, you will have some understanding of why these topics interest computer scientists, and perhaps you will find that some of them interest you.
Acknowledgments
This book has its origins in knowledge created, found and gathered elsewhere—methods and mechanisms honed over decades or centuries. It could not have been written without the inventions it describes, as you will see.
At Manning, Ian Hough and Andy Waldron in Acquisitions took a chance on this rather unusual book, helping to shape its contents and structure. My patient development editor, Doug Rudder, shepherded the book through development and writing. Bojan Stovanović, my technical editor, and Benjamin Berg, LaTeX expert, came to the rescue with my frequent typesetting problems. The production team polished the book into what you’re reading today.
Finally, I’d like to thank the reviewers: Charles Mike Shelton, Christopher Villanueva, Darrin Bishop, Eddy Vluggen, Enric Garcia Torrents, Fatih Ozer, Giampiero Granatella, Howard Bandy, James J. Byleckie, Jaume Lopez, Jeff Neumann, Jens Christian B. Madsen, Jeremy Bryan, Jose Alberto Reyes Quevedo, Kathleen R. Estrada, Lewis Van Winkle, Manu Sareena, Manuel Ciosici, Roberto Hirata Jr., Romain Jouin, Tim Wooldridge, To Tuan Nghia, Tony Dubitsky, and Ubaldo Pescatore, as well as the Manning Early Access Program customers for their time and invaluable comments on earlier drafts of the manuscript. Their suggestions helped make this a better book.
About this book
How do we decide where to put ink on a page to draw letters and pictures? How can computers represent all the world’s languages and writing systems? What exactly is a computer program, what and how does it calculate, and how can we build one? Can we compress information to make it easier to store and quicker to transmit? How do newspapers print photographs with gray tones using just black ink and white paper? How are paragraphs laid out automatically on a page and split across multiple pages?
We answer these questions and more, taking a meandering tour of the art and science of book production from ancient times to the modern day, looking at both the low-level technical details and the overall landscape. You won’t need any prior knowledge of publishing or computer programming to enjoy this book—just a quiet place and a curious mind.
How this book is organized: A road map
Chapter 1 introduces the book and explains who it is for and why it was written. We then start our exploration from nothing. We have a plain white page on which to place marks in ink to make letters and pictures. How do we decide where to put the ink? How can we draw a convincing straight line? Using a microscope, we will look at the effect of putting these marks on real paper using different printing techniques.
Chapter 2 shows how to draw letters from a realistic typeface—letters that are made from curves and not just straight lines. We will see how typeface designers create such beautiful shapes and how we might draw them on the page. A little geometry is involved, but nothing that can’t be done with a pen and paper and a ruler. We fill these shapes to draw letters on the page and deal with some surprising complications.
Chapter 3 describes how computers and communication equipment deal with human language, rather than just the numbers, which are their native tongue. We see how the world’s languages may be encoded in a standard form and how we can tell the computer to display our text in different ways.
Chapter 4 introduces some actual computer programming in the context of a method for conducting a search through an existing text to find pertinent words, as we might when constructing an index. We write a real program to search for a word in a given text and look at ways to measure and improve its performance. We see how search engines use these techniques every day.
Chapter 5 explores how to get a book’s worth of information into a computer. After a historical interlude concerning typewriters and similar devices from the 19th and early 20th centuries, we consider modern methods. Then we look at how the Asian languages can be typed, even those with hundreds of thousands or millions of symbols.
Chapter 6 deals with compression—that is, making words and images take up less space without losing essential detail. However fast and capacious computers have become, it is still necessary to keep things as small as possible. As a practical example, we consider the method of compression used when sending faxes.
Chapter 7 introduces more programming but of a slightly different kind. We begin by seeing how computer programs calculate simple sums, following the familiar rules we learn in school. We then build more complicated things involving the processing of lists of items. By the end of the chapter, we will have written a substantive, real program.
Chapter 8 addresses the problem of reproducing color or grayscale images using just black ink on white paper. How can we do this convincingly and automatically? We look at historical solutions to this problem from medieval times onward and try out some different modern methods for ourselves, comparing the results.
Chapter 9 looks again at typefaces. We investigate the typeface Palatino and some of its intricacies. We begin to see how letters are laid out next to each other to form a line of words on the page.
Chapter 10 shows how to format a full book page by describing how lines of letters are combined into paragraphs to build up a block of text. We learn how to split words with hyphens at the end of lines without ugliness, and we look at how this sort of formatting was done before computers.
Chapter 11 finishes up, showing how our book gets into the hands of the reader, either in print or electronically. Along the way, we learn the details of the PDF standard for document exchange, which combines text, fonts, drawings, and photographs into a single unit.
liveBook discussion forum
Purchase of How Computers Make Books includes free access to liveBook, Manning’s online reading platform. Using liveBook’s exclusive discussion features, you can attach comments to the book globally or to specific sections or paragraphs. It’s a snap to make notes for yourself, ask and answer technical questions, and receive help from the author and other users. To access the forum, go to liveBook discussion forum. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/discussion.
Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take