TUGBOAT

Volume 36, Number 1 / 2015

General Delivery 2 Ab epistulis / Steve Peter 3 Editorial comments / Barbara Beeton Status of CTAN at Cambridge; RIP Brian Housley; Oh, zero! — news; First Annual Updike Prize; Talk by Tobias Frere-Jones; Monotype Recorder online; Doves Press type recovered; Textures resurfaces; LATEX vs. Word in academic publications; Miscellanea; A final admonishment 7 Hyphenation exception log / Barbara Beeton

Fonts 8 What does a typical brief for a new look like? / Thomas Phinney 10 unified / Michael Sharpe

Typography 11 A TUG Postcard or, The Trials of a Letterpress / Peter Wilson 15 Typographers’ Inn / Peter Flynn A L TEX 17 LATEX news, issue 21, May 2014 / LATEX Project Team 19 Beamer overlays beyond the \visible / Joseph Wright 20 Glisterings: Here or there; Parallel texts; Abort the compilation / Peter Wilson

Electronic Documents 25 Online LATEX editors and other resources / Paweł Łupkowski 28 Exporting XML and ePub from ConTEXt / Hans Hagen Macros 32 The box-glue-penalty algebra of TEX and its use of \prevdepth / Frank Mittelbach

Software & Tools 37 The bird and the lion: arara / Paulo Cereda 41 The SWIGLIB project / Luigi Scarso 48 Still tokens: LuaTEX scanners / Hans Hagen Hints & Tricks 55 The treasure chest / Karl Berry Reviews 57 Book review: Algorithmic Barriers Falling: P= NP?, by Donald E. Knuth and Edgar Daylight / David Walden 58 Book review: History of the Linotype Company, by Frank Romano / Boris Veytsman

Abstracts 60 GUST: EuroBachoTEX 2014 proceedings 63 Die TEXnische Kom¨odie: Contents of issues 4/2014–1/2015 TUG Business 2 TUGboat editorial information 64 TUG 2015 election 68 TUG financial statements for 2014 / Karl Berry 69 TUG institutional members

Advertisements 69 TEX consulting and production services News 71 TUG 2015 announcement 72 Calendar TEX Users Group Board of Directors TUGboat (ISSN 0896-3207) is published by the , Grand Wizard of TEX-arcana † ∗ TEX Users Group. Steve Peter, President Jim Hefferon∗, Vice President Memberships and Subscriptions Karl Berry∗, Treasurer 2015 dues for individual members are as follows: ∗ Susan DeMeritt , Secretary Regular members: $105. Barbara Beeton Special rate: $75. Kaja Christiansen The special rate is available to students, seniors, and Michael Doob citizens of countries with modest economies, as de- Steve Grathwohl tailed on our web site. Also, anyone joining or re- Taco Hoekwater newing before March 31 receives a $20 discount. Klaus H¨oppner Membership in the T X Users Group is for the E Ross Moore calendar year, and includes all issues of TUGboat for Cheryl Ponchin the year in which membership begins or is renewed, Arthur Reutenauer as well as software distributions and other benefits. Philip Taylor Individual membership is open only to named indi- Boris Veytsman viduals, and carries with it such rights and responsi- David Walden bilities as voting in TUG elections. For membership Raymond Goucher, Founding Executive Director † information, visit the TUG web site. † TUGboat Hermann Zapf, Wizard of Also, (non-voting) subscriptions are ∗ available to organizations and others wishing to re- member of executive committee †honorary ceive TUGboat in a name other than that of an individual. The subscription rate for 2015 is $110. See http://tug.org/board.html for a roster of all past and present board members, and other official positions. Institutional Membership Addresses Electronic Mail Institutional membership is primarily a means of (Internet) showing continuing interest in and support for both TEX Users Group P.O. Box 2311 General correspondence, T X and the T X Users Group. It also provides E E Portland, OR 97208-2311 membership, subscriptions: a discounted membership rate, site-wide electronic U.S.A. [email protected] access, and other benefits. For further information, see http://tug.org/instmem.html or contact the Telephone Submissions to TUGboat, TUG office. +1 503 223-9994 letters to the Editor: [email protected] Trademarks Fax Technical support for Many trademarked names appear in the of +1 815 301-3568 TEX users: TUGboat. If there is any question about whether [email protected] a name is or is not a trademark, prudence dictates Web Contact the that it should be treated as if it is. The following list http://tug.org/ Board of Directors: of trademarks which commonly appear in TUGboat http://tug.org/TUGboat/ [email protected] should not be considered complete. TEX is a trademark of American Mathematical Society. is a trademark of Addison-Wesley Inc. Copyright c 2015 TEX Users Group. PostScript is a trademark of Adobe Systems, Inc. Copyright to individual articles within this publication remains with their authors, so the articles may not [ date: April 2015] be reproduced, distributed or translated without the authors’ permission. Printed in U.S.A. For the editorial and other material not ascribed to a particular author, permission is granted to make and distribute verbatim copies without royalty, in any medium, provided the copyright notice and this permission notice are preserved. Permission is also granted to make, copy and distribute translations of such editorial material into another language, except that the TEX Users Group must approve translations of this permission notice itself. Lacking such approval, the original English permission notice must be included. You have patience for detail and iterative processes. Kerning is a great time for meditation, really. Tobias Frere-Jones http://www.frerejones.com/about/jobs/

COMMUNICATIONS OF THE TEX USERS GROUP EDITOR BARBARA BEETON

VOLUME 36, NUMBER 1 • 2015 PORTLAND • OREGON • U.S.A. 2 TUGboat, Volume 36 (2015), No. 1

A TUGboat editorial information and L TEX, are available from CTAN and the TUGboat This regular issue (Vol. 36, No. 1) is the first issue of the web site. We also accept submissions using ConTEXt. 2015 volume year. Deadlines, tips for authors, and other information: TUGboat is distributed as a benefit of member- http://tug.org/TUGboat/location.html ship to all current TUG members. It is also available Effective with the 2005 volume year, submission of to non-members in printed form through the TUG store a new manuscript implies permission to publish the ar- TUGboat (http://tug.org/store), and online at the TUGboat ticle, if accepted, on the web site, as well as web site, http://tug.org/TUGboat. Online publication in print. Thus, the physical address you provide in the to non-members is delayed up to one year after print manuscript will also be available online. If you have any publication, to give members the benefit of early access. reservations about posting online, please notify the edi- Submissions to TUGboat are reviewed by volun- tors at the time of submission and we will be happy to teers and checked by the Editor before publication. How- make special arrangements. ever, the authors are still assumed to be the experts. TUGboat editorial board Questions regarding content or accuracy should there- Barbara Beeton, Editor-in-Chief fore be directed to the authors, with an information copy Karl Berry, Production Manager to the Editor. Boris Veytsman, Associate Editor, Book Reviews Submitting items for publication Production team TUGboat Proposals and requests for articles are grate- William Adams, Barbara Beeton, Karl Berry, fully accepted. Please submit contributions by electronic Kaja Christiansen, Robin Fairbairns, Robin Laakso, mail to [email protected]. Steve Peter, Michael Sofka, Christina Thiele The second 2015 issue will be the proceedings of TUG’15 (http://tug.org/tug2015); the deadline for re- TUGboat advertising ceipt of final papers is July 31. The third issue deadline For advertising rates and information, including consul- is September 25. tant listings, contact the TUG office, or see: The TUGboat style files, for use with plain TEX http://tug.org/TUGboat/advertising.html

Ab Epistulis Annual Meeting as President one last time. The 2015 TUG Annual Meeting will be held in Darm- Steve Peter stadt, Germany, July 20–22. If you’d like to make a 2105 is an election year, with seats for the Board and for presentation at the conference, please see http://tug. President open. For the Board of Directors, the following org/tug2015/cfp.html. Early submissions are greatly individuals were nominated: Pavneet Arora, Barbara Bee- appreciated. Please write us at [email protected] for any ton, Karl Berry, Susan DeMeritt, Michael Doob, Cheryl questions, expressions of interest, etc. Ponchin, Norbert Preining, and Boris Veytsman. As Book your hotel and flight, and I hope to see you there were not more Board nominations than open posi- there! See http://tug.org/tug2015 for information. tions, all these nominees are duly elected to a four-year Since the election technically makes me a lame duck term. Thanks to all for their willingness to serve. (don’t worry, I’ve been called worse!), I’ve been thinking I’m pleased that two dedicated individuals have about my tenure and the challenges that lie ahead. I am TUG stepped forward to run for TUG President. Kaveh Bazar- pleased that as an organization is running quite smoothly now, which is due in no small part to the gan is a long-time TEX enthusiast who has served as cinematographer at many a TUG meeting, ensuring that outstanding team I had to work with: my executive people who could not attend in person have access to the committee, Jim Hefferon, Sue DeMeritt, and Karl Berry, information presented there. Jim Hefferon is the current and especially the day to day work of our Executive TUG Vice President and has served the community in Director, Robin Laakso. a variety of capacities, most notably as one of the hosts The main challenge that I am disappointed I was and organizers for CTAN. Since there is but a single office not able to tackle is the shrinking membership numbers TUG of President, an election ballot is required, in accordance for . I’m not worried about TEX in a global context, DANTE NTG with the TUG election procedures. Details are online since and are strong, and enthusiastic devel- A at http://tug.org/election; perhaps the main opment continues on LTEX3 and ConTEXt, but I would TUG is that this year, it is possible to vote electronically in love to see a groundswell in TEX usage and support US the TUG members area, https://www.tug.org/members, in the . Thanks to Boris Veytsman, we do have a spe- TUG until May 11. cial membership campaign this year: members in- Terms for President and members of the Board of vite members. Please see http://tug.org/membership. Directors will begin with the Annual Meeting. Congrat- If you have additional concrete ideas to help us grow TUG ulations to all. , please let us know. Taco Hoekwater, Ross Moore, and Philip Taylor It has been an honor serving you. Happy TEXing! have decided to step down at the end of this term. I wish to thank them for their service, and for their continued ⋄ Steve Peter participation until the Annual Meeting. I will also step Princeton University Press down at the end of my term, but I do intend to open the http://tug.org/TUGboat/Pres TUGboat, Volume 36 (2015), No. 1 3

Editorial comments Typewriter. Don’s actual request was to place the squarish shapes in Lucida Console; this was more Barbara Beeton involved, as it also required shortening the capitals Status of CTAN at Cambridge to the Console height, but has now also been accom- plished. This special “DEK edition” will also have a As of mid-February, the Cambridge CTAN node de- zero-slash as an alternate, the better for clarity in veloped problems, and has been downgraded; at least reading code in a typewriter . for the time being, it should not be used. The Mono and Lucida Console This is a good opportunity to remind anyone fonts with the new will eventually be made who is accessing CTAN to enter the network via available only from TUG. (The non-enhanced ver- the established mirroring system. To search for a sions will continue to be offered, only in TrueType for- package, go to http://www.ctan.org/search and mat, from the Lucida Store, http://lucidafonts. on selecting an item, a suitable mirror will be chosen com.) Stay tuned. to deliver it. Also, the top-level host name http: In a related development, Chuck and his partner, //mirror.ctan.org will automatically redirect to , have posted on their blog (http:// such a suitable mirror. bigelowandholmes.typepad.com) a detailed essay, Before his retirement from the Cambridge Com- “How and Why We Designed Lucida”, celebrating the puter Lab last fall, Robin Fairbairns was the on-site 30th anniversary of these types, “the first family of gatekeeper (for decades) for the Cambridge CTAN original, digital for and screen node. With his departure, management of the node displays”. The salient characteristics of this family is less certain, hence the reduction in its status. are presented in detail, along with a clear explanation But let us take this opportunity to thank Robin of how these choices make Lucida different from other for his long years of devoted service to CTAN and types, especially those meant originally for printing to the UK T X FAQ, and wish him a long, healthy E directly on paper. Many choices were guided by the and fulfilling retirement. Robin intends to continue results of research into the human visual system, and with the FAQ, for which he has reported a sizeable the rich background in calligraphy that Chuck and backlog. It’s in excellent hands. Kris share is also a strong influence. Their blog in general is a veritable history lesson RIP Brian Housley in all aspects of typography and vision research, and Brian Housley’s widow, Zora, has informed the TUG if it were less readily available, we would have co- office that Brian passed away on 26 January 2015, opted several items from there for publication in these and she requested that the news be communicated pages. Expected soon is an article about “Women’s to the TEX community. Literation” (yes, that’s “t”, not “b”); be prepared for Brian was a resident of Switzerland, an emeritus a surprise conclusion. professor from the Universität Bern. He had been Another occasional feature of the lucidafonts a member of TUG since 1988, and attended several site is the “Flash Sale”, which appears irregularly annual TUG conferences, accompanied by his wife. for specific font families, and may similarly disap- Brian was the author of the hletter package, pear without warning. The sales are announced on CTAN and in TEX Live. He also wrote an article on Twitter (https://twitter.com/LucidaFonts), about hletter in TUGboat 32:3, 302–308 (http: and anyone who downloads a free font from the site //tug.org/TUGboat/tb32-3/tb102housley.pdf), gets an option to be put on a list for email announce- based on his presentation at TUG 2011 in India. ments. A recent offering was Lucida Handwriting: We extend our condolences to Brian’s widow. 15 weights, $15. There’s no telling what might be featured next. Oh, zero! — Lucida news And if that is not enough, lucidafonts.com Chuck Bigelow’s article “Oh, oh, zero!” (TUGboat contains many more features that are not yet easily 34:2 (2013), 168–181) elicited a reaction from Don accessible (probably, Chuck says, because the site Knuth (TUGboat 35:3 (2014), 232–234), which has navigation is not yet fully developed). For instance, in turn elicited a further reaction from Chuck, in on the fonts/ page is a of the letter “a” for the form of reshaped capital ‘O’ and ‘Q’. The re- every font in the store, showing weight and style shaping takes a super-elliptical form, reminiscent variations. And on the pages/facts and pages/faq of Piet Hein’s superegg. Chuck has installed these pages of the site are more interesting bits of technical as variant letters in Lucida Grande Mono, which is and historical information. Explore! equivalent in design and proportions to Lucida Sans 4 TUGboat, Volume 36 (2015), No. 1

First Annual Updike Prize routinely wore jackets.) His father was a copy- Last spring, the Daniel Berkeley Updike Collection writer for an advertising agency. at the Providence Public Library (PPL) was host At an early age, Frere-Jones became interested to the inauguration of a new prize for student type in art. He named two principal influences — Kaz- designers (TUGboat 35:1, page 3), with a talk by imir Malevich, a creator of geometric abstract art, . The first of the annual prizes were and Kurt Schwitters, who made collages from found awarded this year on February 19; the ceremony also scraps of printed material. Another influence was featured a talk by Tobias Frere-Jones. mathematics, in particular algebra and geometry. From the Updike Prize web page (http://www. Analyzing shapes — squares, circles and triangles — provlib.org/updike-prize-finalists): was the only way he could make sense of Roman inscriptional letters. He also found inspiration (and The annual Updike Prize rewards undergraduate examples for practice) in a book on drawing let- and graduate type designers whose work has been terforms by David Gates. After entering RISD, he influenced by materials in the Updike Collection augmented what was being covered in classes with at the Providence Public Library. Whether stu- Updike’s classic Printing Types. dents choose to revive a historic typeface or to One early experiment, intended as a Christmas create a new typeface inspired by an earlier de- present (to be used in ads for his brother’s band), sign, applications are judged on the quality of the involved drawing his preliminary sketches on napkins specimen, the quality of the typeface submitted while at a local pub. The first draft included only and how creatively and thoughtfully it interprets letters, and when he realized that he also needed dig- a historical model. its, he had to go back to the bar to get more napkins The finalists and their typefaces/type families: to establish the proper conditions for matching the • Sandra Carrera, Pícara (ECAL) First Prize shapes. • Chae Hun Kim, Hodoo After graduation from RISD, he joined the Font • Prin Limphongpand, Rizvele (Runner-Up) Bureau, where he benefited from the experience of • Yeon Hak Ryoo, Tranche David Berlow, whose good lessons included how to Carrera’s family, Picara, was influenced by a say when a project is finished, and assignments where type specimen published in the 1770s by Antonio he could be effective. Espinosa. The entire book can be viewed on the PPL Among the many typefaces created by Frere- web site, at https://pplspc.org/espinosa. Jones are Interstate and Retina (both well known, The name of Prin’s typeface, Rizvele, is an ana- even ubiquitous). He also adapted for digital use a gram of the source used, a book from the venerable lesser-known face named Epitaph, originally created Elzevir publishing house. at the close of the nineteenth century and based The first prize trophy, a fully functional compos- on letterforms found on contemporary gravestones; ing stick, is pictured on the PPL’s “Notes for Biblio- it was this typeface, he said, that caused him to philes” blog, https://pplspcoll.wordpress.com, realize that lettershapes (in metal) were different as part of the offering for February 26, 2015. First in different sizes. He described his adaptations as Prize also includes $250 and admission to the Type- taking parts of letters from different sizes, swapping Con 2015 conference (compliments of the Society of features from one letter to another, for example, Typographic Aficionados). adding serifs on “T”, transplanting a curve from “N” Information about next year’s Updike Prize com- to “K”. In the process, he produced two variants of petition will appear on the PPL blog in due time, almost every letter, based on features already present but the rules are not likely to change significantly. in the different sizes of the original. Although his It’s not too early to get started. slides showing the details aren’t available, a good example is posted at http://www.fontbureau.com/ Talk by Tobias Frere-Jones fonts/Epitaph. Look for the subtle variations in The talk, on the occasion of the awarding of the the lettershapes of the two alternate alphabets. In Updike Prize, was titled “How I Got Here”. It was this context, Frere-Jones also noted that a client may also an occasion for Frere-Jones to revisit the scene of take him in a direction that he’d never have gone on his formal typographic education, the Rhode Island his own. School of Design (RISD). The talk was followed by a few questions from Frere-Jones came by his interest in print nat- the audience. Asked what is his favorite letter, he urally. His great-grandfather, Edgar Wallace, was answered “R”: it exhibits features from all the shapes a writer of books, including mysteries. (The slides he identified earlier — square, circle, and triangle. included images of their jackets, from the time when What annoys him most? The degree of impatience TUGboat, Volume 36 (2015), No. 1 5

shown by current students; things are too easy now, material, he produced a version that was released in compared to cutting letters in metal — that takes 2013. The original type was still missing, but there time, and inspires reflection. He noted that Matthew were enough clues to locate its watery resting place Carter said that he never regretted putting something under the Hammersmith Bridge. Searching on the in a drawer and ignoring it for a year. And is he still bank at low tide, Green found several pieces of type having fun? Yes! Especially when he is able to just in the mud, and from there, with the assistance of sit and draw. a salvage team from the Port of London Authority, Much more can be discovered on Frere-Jones’ 150 pieces of type were recovered. blog at http://www.frerejones.com. That small sample of type is not enough to print a book, but it was enough to provide a few new Monotype Recorder online details about the design, and validate the accuracy For about 70 years, from 1902, the Monotype Cor- of the digital revival. An updated version of the poration published a trade magazine, The Monotype facsimile was released in December 2014, and a very Recorder. It covered topics of great variety concern- readable story, with copious illustrations, appears on ing font specimens, “best practices” and typographic the cited Hyperallergic web page. conventions for various purposes and in various lo- Another account of the adventure can be found cales, reviews of well known printing establishments online at http://trov.es/1zwdjHM, “The Gorgeous (who were Monotype customers), a wealth of material Typeface That Drove Men Mad and Sparked a 100- about a skilled trade. Year Mystery”. A large (and growing) collection of issues of the Recorder have now been scanned and posted as PDF Textures resurfaces files, available for download, on the Metal Type web With Barry Smith’s death in 2012 (TUGboat 34:2, site in the UK, at http://www.metaltype.co.uk/ pages 111, 112), BlueSky Research folded its tents monotype_recorder.shtml. and work on upgrading Textures to run natively One particular issue (Vol. 40, No. 4, Winter under Mac OS X came to a halt. Now, a group of 1956) is devoted to the topic “Setting Mathematics”, dedicated academic users has banded together to by Arthur Phillips, the acknowledged expert on the support the completion of a Cocoa-based implemen- subject. This was apparently unknown to Knuth tation of Textures, left unfinished at Barry’s death, when he designed TEX, as it does not appear in and to this end has made the existing Carbon-based any of his early bibliographies. But it sets forth implementation available for evaluation at no cost. the principles by which math compositors produced Preliminary details of this project have been much of the material that Knuth examined in his posted at http://blueskytex.com, with a further design exploration. announcement planned for July. Truly a trove worth treasuring! LAT X vs. Word in academic publications Doves Press type recovered E A question on the TeX.stackexchange forum, “Does This news has been reported in several places now, LaTeX really perform worse than Word?” (http: but it’s no less amazing on a repeat reading: “A //.stackexchange.com/q/219576/), led me to century after being cast into the River Thames, a cele- a study published in a recent issue of PLoS One brated typeface reemerges” (http://hyperallergic. that concludes “that even novice MS Word users com/181625). perform better than expert LaTeX users in document Thomas Cobden-Sanderson and Emery Walker creation.” together produced stunning works of the printer’s The article, written by Markus Knauff and Jelica art at their Doves Press, using a type created for Nejasmic, entitled “An Efficiency Comparison of Doc- its exclusive use. After a falling out between the ument Preparation Systems Used in Academic Re- partners, the press closed in 1909, but its effects search and Development” (http://journals.plos. remained jointly owned. But before his death in org/plosone/article?id=10.1371/journal.pone. 1917, Cobden-Sanderson, who could not bear the 011506), not surprisingly, raised a number of ques- thought that his precious type might be used for tions, not to mention a furore, in a number of web anything less worthy than the work for which it had discussions. These are only a few: been created, spirited the entire collection to the edge of the Thames, and threw it in. • comments on the PLoS site (click on the “Reader In 2010, type designer Robert Green decided comments” button on the article page); to undertake a digital revival of the Doves Press • the TeX.sx chat: http://chat.stackexchange. type. Working from original examples and archival com/rooms/19762; 6 TUGboat, Volume 36 (2015), No. 1

• Nature: “Word-processing war flares up on social . . . fixed-width , which provides a conve- media” (http://www.nature.com/news/ nient, predictable metric. Each standard script word-processing-war-flares-up-on- page corresponds to roughly 1 min of movie time, social-media-1.16669). so the number of pages gives producers an es- Admittedly, readers of TUGboat may be predisposed timate of the length and production cost of a A movie. in favor of LTEX. Nonetheless, my main gripe with the article is the “conclusion”. While admitting that “Overheard” on the TeX.stackexchange chat: the use of LATEX may be justified when documents “Archimedes principle: the upward force by the text contain a large amount of math, the final statement on a float is equal to the weight of the text the float is this: displaces. :)” (The perpetrator will not be identified In all other cases, we think that scholarly jour- here, to protect the guilty.) nals should request authors to submit their docu- Google Code, an open-source project hosting ments in Word or PDF format. [...] preventing service started in 2005, has been home to some TEX- researchers from producing documents in LaTeX related projects. Effective 12 March 2015, the service has disabled new project creation, and 25 January would save time and money to maximize the ben- 2016 has been announced as the closing date. The efit of research and development for both the http://google- research team and the public. full announcement can be found at opensource.blogspot.co.uk/2015/03/farewell- “Preventing” — so much for academic freedom. to-google-code.html. At least one affected code (This may have been peer reviewed, but my opinion developer has migrated his code to GitHub (https: of the quality of that review isn’t favorable.) //github.com), but other sites are possible. If your code has been hosted at Google Code, you probably Miscellanea already know about this change; if you are looking Here are a few more things I found interesting. for something that has been hosted there, and are Most of the presentations at last year’s Bacho- unsure of its new location, it’s probably best to check TEX have slides linked from the program: http:// with the developer. www.gust.org.pl/bachotex/2014/program. This one definitely lives up to its title, “Absolutely non- A final admonishment computer and completely not programmable new There is much going on in the TEX world. I am tuned book forms”, by Andrzej Tomaszewski (http://www. into a number of the (LA)TEX forums and mailing lists, gust.org.pl/bachotex/2014-pl/presentations/ and the level of activity is high. Along with the usual formy-ksiazki.). Fascinating illustrations! plethora of beginners’ questions, interesting topics Slides and recordings of the UK TUG 2013 and of general interest abound, many worthy of more in- 2014 meetings are linked from their home page, http: depth and polished coverage. If you are responsible //uk.tug.org. A number of interesting topics are for such material: please consider writing it up and covered. submitting it for publication here. A look at the persistence of “archaic” typo- If you are only an observer of interesting mate- graphic practices was featured in the Boston Globe: rial, rather than the originator, and would like to see “Modern typefaces vs. the Massachusetts court sys- it addressed in print, send a note to the editors citing tem: Why does one of the nation’s most progressive the source (preferably with reliable links), and we states do its legal business in old-fashioned Courier?” will endeavor to persuade the perpetrators to write (http://tinyurl.com/p232hva). The image of an it up for publication. ancient typewriter heads the article. (This type- Another occasional feature that we’ve missed writer is very like the one I learned to type on in in TUGboat is cartoons and other illustrations on summer school. Even then it was an anachronism, typographic subjects. If you see a drawing or photo from long before Courier was created, in 1955. Other that fits our “profile”, let us know, and we’ll try to anachronisms in the article are so prevalent that it persuade the creator to become a contributor. should have been held for publication until April 1!) TUGboat is your journal. Enjoy reading it, When this was mentioned to Chuck Bigelow, he re- surely — but please also think about becoming an sponded with a reference to an article he wrote with active participant. Gordon Legge published in the Journal of Vision (http://www.journalofvision.org/content/11/ ⋄ Barbara Beeton 5/8.long); fonts are still used in Holly- http://tug.org/TUGboat wood scripts: tugboat (at) tug dot org TUGboat, Volume 36 (2015), No. 1 7

Hyphenation exception log The reference used to check these hyphenations is Webster’s Third New International Dictionary, Barbara Beeton Unabridged. This is the periodic update of the list of words that Hyphenation for languages TEX fails to hyphenate properly. The full list last appeared in TUGboat 16:1, starting on page 12, other than U.S. English with updates in TUGboat 22:1/2, pp. 31–32; 23:3/4, Patterns now exist for many languages other than pp. 247–248; 26:1, pp. 5–6; 29:2, p. 239; 31:3, p. 160; U.S. English, including languages using accented and 33:1, pp. 5–6; and 34:2, pp.113-114. non-Latin alphabets. CTAN holds an extensive col- In the list below, the first column gives results lection of patterns: see language/hyphenation and from plain TEX’s \showhyphens{...}. The entries its subdirectories. in the second column are suitable for inclusion in a A group of volunteers led by Mojca Miklavec \hyphenation{...} list. and Manuel P´egouri´e-Gonnard have created a com- In most instances, inflected forms are not shown prehensive package of hyphenation patterns, called for nouns and verbs; note that all forms must be hyph-utf8; see http://tug.org/tex-hyphen. specified in a \hyphenation{...} list if they occur in your document. The full list of exceptions, as a The list — English words TEX-readable file, appears at http://mirror.ctan .org/info/digests/tugboat/ushyphex.tex. (It’s as-trologer as-trol-o-ger created by Werner Lemberg’s scripts, available in as-tronomer as-tron-o-mer the subdirectory hyphenex.) catas-tro-phe ca-tas-tro-phe Like the full list, this update is in two parts: catas-trophism ca-tas-tro-phism chemokine chemo-kine English words, and one non-English name that oc- con-structed con-struc-ted curs in English (mathematical) texts. cy-tokine cy-to-kine Thanks to all who have submitted entries to gigan-odes giga-nodes the list. Here is a short reminder of the relevant hip-popota-mus hip-po-po-ta-mus idiosyncrasies of TEX’s hyphenation. Hyphens will icono-g-ra-pher ico-nog-ra-pher not be inserted before the number of letters specified icono-graphic icon-o-graph-ic by \lefthyphenmin, nor after the number of letters iconog-ra-phy ico-nog-ra-phy specified by \righthyphenmin. For U.S. English, im-mu-niza-tion im-mu-ni-za-tion \lefthyphenmin=2 and \righthyphenmin=3; thus im-munomod-u-la-tory im-mu-no-mod-u-la-to-ry no word shorter than five letters will be hyphenated. kilo-n-odes kilo-nodes (For the details, see The T Xbook, page 454.) This leukotriene leu-ko-triene E megan-odes mega-nodes particular rule is violated in some of the words listed; molec-u-lar mo-lec-u-lar however, if a word is hyphenated correctly by TEX penalty(ies) pen-al-ty(ies) except for “missing” hyphens at the beginning or pre-dictable pre-dict-able end, it has not been included here. prefers pre-fers Some other permissible hyphens have been omit- prostaglandin pros-ta-glan-din ted for reasons of style or clarity. While this is at salient sa-lient least partly a matter of personal taste, an author ter-a-n-odes tera-nodes should think of the reader when deciding whether triplex(es) tri-plex(-es) or not to permit just one more break-point in some unin-stan-ti-ated un-in-stan-ti-at-ed obscure or confusing word. There really are times when a bit of rewriting is preferable. Names and non-English words One other warning: Some words can be more used in English text than one part of speech, depending on context, and Caratheodory Cara-theo-dory have different hyphenations; for example, ‘analyses’ can be either a verb or a plural noun. If such a word appears in this list, hyphens are shown only for the ⋄ Barbara Beeton portions of the word that would be hyphenated in http://tug.org/TUGboat the same way regardless of usage. TUGboat (at) tug dot org 8 TUGboat, Volume 36 (2015), No. 1

What does a typical brief for a new typeface look like? Thomas Phinney I keep on seeing this question unanswered, and hop- ing somebody else would answer it, as the answer is Figure 1: Fontlab logo. . . . long. :) I’m not sure there is a single “typical brief.” One 3. If they considered off-the-shelf options, what did of the things that makes typeface design interesting they consider and what did they like about each is the diversity within a seemingly narrow specialty. of them? What did they dislike about each of As one of my colleagues points out, many of them? Why did they not go with any of them? the same questions one considers in designing a new I found this part incredibly helpful in the typeface, also apply simply to selecting a typeface, process of creating a new logotype recently for or customizing an existing typeface. my company, Extensis (see fig. 1). We looked at I am a bit unclear on what you mean by “what a bunch of specific typefaces and rejected them does it look like”? I am kind of assuming this is a for a variety of reasons. In the end I took an question of content rather than format. If you are existing typeface and modified it quite heavily. looking for formatting advice, please say so. :) But I used the knowledge of the strengths and For that matter, the design brief is sometimes weaknesses of these other typefaces, in terms never actually written down, nor clearly developed. of what I and my (internal) customers wanted, I do encourage both aspiring type designers, and and that guided what I did to the pre-existing clients of custom type design, to go through this typeface. process and write it all down. I expect that it will be helpful almost all the time, and often immensely 4. What is the typeface a vehicle for? What is to helpful, to articulate questions and goals clearly. It be communicated with it? In what way should sets everyone’s expectations and creates reasonable it flavor the message? Is it intended for a par- limits. ticular project or product? Many clients won’t even know what questions to In the same case I mention above, we wanted ask, so the design brief is something that usually gets it to feel modern and somewhat techno, yet developed in collaboration between the type designer warm and approachable. Moreover, we had a and the client. Or, if there is no specific client, it very playful graphic for the logo — it was almost can be a matter of asking the questions of oneself, wacky in how playful it was. We needed to have to better focus the design. Being more specific and the type treatment for the logotype be playful more seemingly restrictive is likely to result in a more enough to not just clash with the graphic, but successful work — even if the final fonts are used in still a bit more serious, to ground it a bit. It ways beyond what the designer originally expected. was a careful balancing act. A design brief can potentially be a living doc- 5. Is there a specific target usage, such as “advertis- ument, revised over time during the early stages of ing headlines” or “body text in all publications the project as it is defined. There may be a first and online.” Even if not. . . What sizes will it be round of design brief written in the early exploratory used at? In what media? How will the type stages, and it may be developed further in one or be reproduced (imaged, rasterized)? On screen? more additional iterations. For web pages? In print? In any case, when taking on a new typeface Again by way of example, the logo needed to design, the questions I would be asking the client (or function at pretty small sizes, as logos often do. myself) to create the design brief would be these: Some of the typefaces we had entertained were eliminated in part because their weight got too 1. Who is the client, or target customer? spindly at small sizes on screen; it just wasn’t 2. Is it replacing a current typeface? If so, what holding up well enough. does the client like and dislike about the current 6. What else is known about the desired design typeface? What is motivating the change? category? In my logo example, we had decided we wanted something in the line of a slab typeface, Editor’s note: Originally published at http://www.quora. com/What-does-a-typical-brief-for-a-new-typeface- something in a realm defined by typefaces such look-like. Reprinted with permission. as Archer, Donnerstag, Vista Slab, and Adelle.

Thomas Phinney TUGboat, Volume 36 (2015), No. 1 9

Figure 2: Some of the Hypatia Sans variants.

My first typeface, Hypatia Sans (see fig. 2), 9. What kind of typographic extras are required, started out with me as a designer coming in or might be desirable? For example, these days I thinking I wanted to do a geometric sans serif — consider support for arbitrary fractions and both but still needing to figure out how to focus it lining and oldstyle figures (in both tabular and beyond that. proportional widths) pretty much “basic.” Plus 7. How many styles (individual fonts) are desired? at least the five f-ligatures. But other people Regular, italic, bold and bold italic are four fonts might think of these as extras. I think of small right there (and no, you can’t get reasonable caps as extra, however, especially with the large quality results by just using algorithmic slanting language coverage I tend to go for. How about and bolding). More weights, more widths, or superscript and subscript numbers? A full set variants intended for different sizes can all add of letters for ordinals? Many other possibilities to this total. Families of 8–20 fonts are not here. unusual today. The largest family I know of is Many of these things essentially multiply to- Kepler, comprising 168 (!) fonts. gether. For example, if you need real small caps, you 8. What kind of language coverage is required? should probably have them for all the supported lan- Any other particular character set needs (e.g. guages, and in all the fonts in the family — I would particular symbols, math capability, whatever). hope it would be (reasonably) assumed, but best to There are a variety of semi-standard character be explicit about it. sets and language groupings, but the whole mat- ⋄ ter is a bit fuzzy around the edges. Thomas Phinney http://www.thomasphinney.com

Editor’s note: Thomas Phinney is one of the regular teachers of the Crafting Type workshop, an intensive three-day class in type design. It is aimed at anyone with an interest in type and typography, not only professional type designers. It has been given in many cities around the world, and new workshops are actively scheduled. TUG is happy to be able to provide some administrative support for Crafting Type, and we heartily recommend looking into it. The web site is http://craftingtype.com.

What does a typical brief for a new typeface look like? 10 TUGboat, Volume 36 (2015), No. 1

Inconsolata unified The last three options are also available in fontspec by means of choices of the StylisticSet. Michael Sharpe Sample LATEX file fragment: Inconsolata is a very fine family developed several years ago by , with \usepackage[varqu]{inconsolata} partial support from TUG, using software of his own \usepackage{upquote} design that allowed curve segments to be drawn ... using spiros (a.k.a. Euler spirals or spirals of Cornu) \begin{document} whose defining feature is that curvatures vary linearly \begin{verbatim} with length along the curve. (Such curves have a "double-quoted text" prominent history in engineering practice, where they `backticked item` were, and are, used for highway and railway curves, 'single-quoted' and provided the shapes for French curve templates Zero: 0 # note slashed zero as default which were widely used in engineering drawing before # option var0 would use unslashed the days of computer-aided design.) ... Initial LAT X support for the font, which was E \end{document} originally provided on CTAN only in Type 1 format, was provided by Karl Berry’s inconsolata package, will render as: where the font had Berry name fi4. In 2012, after a "double-quoted text" bold version became available, I made an enhanced `backticked item` version with Berry name zi4 that provided a number 'single-quoted' of new glyphs and lookup tables to allow them to Zero: 0 # note slashed zero as default be accessed as alternate forms, along with equiva- # option var0 would use unslashed lent LATEX options for the Type 1 versions. This meant that the CTAN versions of Inconsolata were Sample X LE ATEX/LuaLATEX file fragment: not the same as those provided by other sources. \usepackage{fontspec} Recently, there has been cross-platform interest in a \usepackage{libertine} reunification. \setmonofont[StylisticSet=3]{Inconsolata} Though the process is not yet complete, it ap- % straight quotes pears likely that in the near future there will be one ... master source for Inconsolata, making available the \begin{document} regular and bold weights in two em sizes: 2048 for \begin{verbatim} the TrueType versions and 1000 for the Opentype "double-quoted text" (cff) and Type 1 (pfb+afm) versions. In particu- `backticked item` lar, the versions on CTAN will be drawn from this 'single-quoted' master repository, and future changes in the fonts Zero: 0 # note slashed zero as default may require the package maintainer to regenerate ... the tfm files using a script that calls afm2tfm with \end{document} a multitude of encoding files. Of course, changes to names would require making the corresponding will render as: changes to the encoding files. double-quotedtext As things stand, the version offered on CTAN backtickeditem and through TEX Live will be updated to the most single-quoted current version with all features intact. Detailed be- Zero:0# noteslashedzeroasdefault havior is in the documentation for the inconsolata A The material above rendered in Inconsolata is package, but, to summarize usage in LTEX: somewhat larger than the accompanying text, and, • regular and bold weights are available; in practice, should be scaled down to a more appro- • options are available to specify: priate size in the document preamble.

– slashed or unslashed zero; ⋄ Michael Sharpe – upright quotes or original slanted quotes Math Dept, UCSD in verbatim text; La Jolla, CA 92093-0112 USA – original lowercase L (el) or a curvier vari- msharpe (at) ucsd (dot) edu ant. http://math.ucsd.edu/~msharpe/

Michael Sharpe TUGboat, Volume 36 (2015), No. 1 11

A TUG Postcard or, The Trials of a Letterpress Printer Peter Wilson

To become a rich printer you must start as a very rich printer. Traditional This is the tale of how and why I came to letterpress print a postcard for TUG. Background I have been a LATEX user since 1985, using it at work to typeset and print a range of technical documents, from reports through code documentation and cul- minating in several thousand of pages of an ISO International Standard. It is only since I retired that I became involved in traditional letterpress print- ing. This involves manually selecting pieces of lead type to make up words, sentences, pages and books, putting ink on the type so carefully arranged and pressing a sheet of paper onto the inked type to get a final printed page. You produce quite a few sheets like this, proudly show them to your wife who, after a mere glance, announces that she can see several typos! Back to cleaning up the type, making the necessary replacements and/or additions, and then Figure 1: Operating a Chandler & Price starting the ink-print-review cycle again. Old Style Press I got into letterpress work after going on a book- binding course where one of the participants said that her husband was looking for volunteers to help Excellence where there were participants from some with traditional printing at the local Highline Com- 15 different countries. It was for a production called munity College in a Seattle suburb. He took me on, ‘Twelve Chinese Great Scholars’ done with giclée though I knew nothing about it, gave me perhaps illustrations and with an accom- three hours of show and tell and let me get on with panying booklet via LATEX all enclosed in an Oriental it. Most of the shop was devoted to teaching com- style box. mercial printing; the biggest press that they had was In 2010, after 27 years in the USA, I moved a 4-colour Heidelberg offset press some 30 feet in back to the UK and managed eventually to set up a length, with all text and pictures being set up on a printing and workshop in my garage (in Mac beforehand. The students also had to take a the UK it is very rare that a car is kept in a garage). two-day letterpress session in my small corner of the A partial view of the shop is shown in Figure 2. shop. Most were desperate to get back to their Macs In the foreground is a nipping press for bookbind- but one or two liked the constraints forced by having ing and there are two large type cabinets in the to use fixed sizes of lead type. There we printed on background with each holding twenty typecases and two Chandler & Price presses dating back to in turn each typecase holds one fount of lead type. the early 20th century. In a platen press the type There is also a much smaller cabinet holding various is put in vertically and if not locked up tightly will founts of brass type for gold tooling the titles on scatter itself all over the floor; the students really books. did not like this as they had to pick it all up, put it I was fortunate to be able to get a Vandercook back in the correct places in the typecases and start SP15 proofing press at a very reasonable price, al- all over again, but you only do it once. though it cost nearly as much to have it professionally To my surprise I managed to win some awards moved from where it was 200 miles away from my for my printing, the most prestigious being a Gold home. This is a horizontal press as opposed to the Award at the 2009 IAHPC International Gallery of vertical platen presses which has, for me, the great

A TUG Postcard or, The Trials of a Letterpress Printer 12 TUGboat, Volume 36 (2015), No. 1

Figure 3: First draft design (in LATEX)

Figure 2: Type cabinets and bookbinding equipment and more importantly, I happened to have it in a range of sizes and also in Roman, italic and small caps to match Knuth’s original setting. I used 14pt advantage that once you have the type on the press it for the Knuth introductory line and 18pt, leaded 6pt, will not fall onto the floor. The essential part of this for the quotation itself. I selected 10pt is shown on the next page in Figure 6. It is possible for the imprint at the bottom of the card and the to print sheets as large as 15 by 18 inches (381 by printers flowers were 18pt. I have some 60 founts 457 mm), while printing on anything smaller than A5 but none of them span the entire range of sizes and paper (5.8 by 8.25 inches) tends to be problematic. possible styles. Among these are , , The postcard Bernhard Cursive, Blado, , Casteller Titling, Fournier, Gill Sans, Old English, and Times. Karl Berry is very persuasive and in a moment of But compare this motley selection with Knuth’s weakness I agreed to print a few postcards for TUG with the Roman in sizes 5, 6, to be given away as a thank-you for members who 1 7, 8, 9, 10, 12, and 17pt, the bold in 5 to 12pt, persuaded others to become members. I imagined small caps in 8, 9, 10, 12 and 17pt, the italic in 25 or so but was hooked into producing a hundred. 8, 9, 10, 12 and 17 pt, which would take up 25 It was left to me to create a design which then Karl, 2 typecases, not to mention the slanted roman, Greek, Barbara Beeton and some unnamed reviewers would the typewriter font and others. And then maths critique. fonts are a completely different ballgame! In essence, A The first of my draft layouts, done with LTEX of there is an unlimited supply of characters in digital course, and shown in Figure 3, consisted of a Knuth- . In letterpress, you have to make do with ian quote flanked by two cuts of a nineteenth century what you have physically got. In my early letterpress type compositor and of a — these were printing days I almost completed setting the type reproduced using carbon paper, then scanned, and for a two page document but ran out of ‘h’ sorts A 3 inserted into the LTEX source as jpg’s. The grid on the penultimate line of the first page.4 The text pattern was to help me with the final arrangement was composed of many sentences like ‘Whither art of the type. thou going, when, and with whom?’ and I had to I decided to use Caslon for the printing for two redesign the whole work to accommodate my limited reasons; firstly I am rather fond of it and secondly, ‘h’ supply. 1 Editor’s note: Our membership campaign is detailed at The reviewers asked me to liven up my proposal http://tug.org/membership; it runs throughout 2015, please by adding some of decoration to highlight Knuth. take a look! There wasn’t room for that so I added a top and 2 Editor’s note: The other unnamed reviewers were the bottom line of printers flowers. I was also asked to folks who have volunteered to be on the current incarna- tion of the TUG membership committee: Kaja Christiansen, change the lowercase ‘e’ in ‘TeX’ to a dropped ‘E’ as Jim Hefferon, Klaus Höppner, Robin Laakso, Steve Peter, in TEX. Boris Veytsman, and Dave Walden. Peter was remarkably Well, kerning in LATEX is easy as you just make patient and gracious in the face of our ignorant ideas! 3 \kern \raisebox ‘Cut’ is a somewhat generic term for an engraved illus- judicious use of the and command tration of some kind mounted on a wooden block to bring to add or subtract horizontal or vertical space. In it up to typeheight so that it can be printed along with the regular type. 4 ‘Sort’ is the generic term for a single piece of lead type.

Peter Wilson TUGboat, Volume 36 (2015), No. 1 13

Figure 5: The final type locked up in the Figure 4: Second draft printed design

letterpress printing when you are dealing with fixed sizes of lead type it is not so simple. For a posi- tive horizontal kern you can add some extra spacing between the adjacent sorts, ranging from a slip of cigarette paper through copper and brass shims to lead spacers. Any other kerning requires trimming pieces of lead, either above or below or before a sort; not easy. However, I did my best to meet their re- quests with the result as in Figure 4 (the card got a bit askew when I scanned it originally and I have since disposed of the original). I was not happy with my attempts to kern the Figure 6: The forme on the press ‘E’ and fortunately the reviewers were of the same opinion so I reverted back to the regular ‘e’. I then spent some time making minor adjustments to the positions of all the elements on the card — a process of adding and subtracting bits of lead until it all looked right. The final positioning of the type, cuts, and spacers in the forme is shown in Figure 5. The forme consists of a rectangular cast-iron frame, called a , enclosing the type to be printed, which must be firmly locked up in the chase so that the whole lot can be picked up and moved around without anything falling out. A US postcard is about the same size as an A6 sheet, and as I mentioned, printing for me on any- thing smaller than A5 is not so easy. As it happened I couldn’t find any suitable A6 paper so I used A5 instead. As I had only one copy of each of the cuts I could only print one postcard at a time, so I printed on one half of the A5, waited two or more days for the ink to dry and then printed on the other half of the sheets, one of which is shown in Figure 7. I was limited in the amount of drying space that I had, about enough for twenty-five sheets, so the whole process became somewhat protracted. For one reason or another I managed a high failure rate of about 10%, which just lengthened the Figure 7: Final printing

A TUG Postcard or, The Trials of a Letterpress Printer 14 TUGboat, Volume 36 (2015), No. 1

Figure 8: Ink on the back

Figure 10: A postcard in its deliverable state

of paper under the sorts that were not fully printing to raise them up so that the ink rollers would be sure to touch them. This didn’t work. Eventually I found that I was moving the ink rollers too fast across the type and they were partially bouncing over the top row of type. I reduced my printing rate from about four to three per minute and all seemed well after that. The end Perhaps the surprising thing after all this is that I did Figure 9: Missing ink manage to produce the hundred postcards that Karl requested. A deliverable card is shown in Figure 10. time. Apart from the usual occasional smudging of And then, almost to add insult to injury, Karl asked ink when taking a sheet out of the press and the me to write something up about the whole process odd misfeed of the paper I had two major problems. for TUGboat, hence this rather long-winded piece — The first is illustrated in Figure 8 where somehow I just don’t blame me. managed to get ink on both the front and the back ⋄ of the cards. A good cleaning of everything solved Peter Wilson that one. 12 Sovereign Close Kenilworth, CV8 1SQ The more troublesome difficulty is shown in UK Figure 9 where there is not enough ink on the top row herries dot press (at) of printers flowers. I spent a long time putting slips earthlink dot net

Peter Wilson TUGboat, Volume 36 (2015), No. 1 15

Typographers’ Inn

Peter Flynn My first document

This is a short example of a LATEX document I wrote on March 12, 2009. It 1 Portable typesetting shows a few simple features of automated typesetting, including: • setting the default font size to 12pt and specifying ‘article’ type for I recently had to reinstall T X Live for a novice user formatting; E • using the typeface and some special formatting for URIs; after she decided to replace a stolen Macbook with a • preventing sections being numbered; generic unbranded laptop PC. The abruptness of this • turning off justification for an informal document; • formatting a section heading;

• A change of platform is not something TEX users would using the LTEX logo; normally worry about because TEX works perfectly • generating today’s date; • formatting this list of items;

happily pretty much everywhere, but this user’s main • formatting a subsection heading; concern was that she lost her iPhone as well, and • using opening and closing quotes; was making a parallel switch to Android...and had • formatting a URI; • arbitrary centering and italicisation; A heard that this would enable her to have LTEX on • autonumbering the pages. the phone as well. More information This example was taken from ‘Formatting Information’, which you can I had encountered VerbTEX, which is an Android read at http://latex.silmaril.ie/formattinginformation editor that submits a document to a web service and use as a teach-yourself guide. Have a nice day! which does the typesetting. It’s a great system, as it does away with the need to have all of T X installed, E 1 but if you are stranded without a connection, it’s impossible to carry on working on a document that you want to be able to preview. Enter Jiří Marek’s LATEX Editor. Despite the A name, this is a fully-fledged locally-executing LTEX TUGboat, Volume 0 (9999), No. 0 1001 Typographers’ Inn system (although of course you do need a connection Peter Flynn My first document

1 Portable typesetting A This is a short example of a LTEX document I wrote on March 12, 2009. It shows a few simple features of automated typesetting, including: I recently had to reinstall TEX Live for a novice • to install it and download any additional packages). setting the default font size to 12pt and specifying ‘article’ type for user after she decided to replace a stolen Macbook formatting; with a generic unbranded laptop PC. The abrupt- • using the Palatino typeface and some special formatting for URIs; • ness of this change of platform is not something preventing sections being numbered; My first thought was to try the quickstart.tex • turning off justification for an informal document; TEX users would normally worry about because TEX • formatting a section heading;

• A works perfectly happily pretty much everywhere, but using the LTEX logo; A this user’s main concern was that she lost her iPhone • generating today’s date; document I use in the LT X course I teach — the as well, and was making a parallel switch to An- • formatting this list of items; E droid. . . and had heard that this would enable her • formatting a subsection heading; • 1 to have LAT X on the phone as well. using opening and closing quotes; E • formatting a URI; I had encountered VerbTEX, which is an An- • same one as in Formatting Information. It worked arbitrary centering and italicisation; droid editor that submits a document to a web ser- • autonumbering the pages. vice which does the typesetting. It’s a great system, More information as it does away with the need to have all of TEX This example was taken from ‘Formatting Information’, which you can first time, and as I have Kingsoft Office (which in- read at http://latex.silmaril.ie/formattinginformation installed, but if you are stranded without a connec- and use as a teach-yourself guide.

tion, it’s impossible to carry on working on a docu- Have a nice day! ment that you want to be able to preview. cludes PDF preview) and the PrinterShare app, I Enter Jiří Marek’s LATEX Editor. Despite the name, this is a fully-fledged locally-executing LATEX 1 system (although of course you do need a connection could even print it. Full marks. to install it and download any additional packages). My first thought was to try the quickstart.tex document I use in the LATEX course I teach — the Figure 1: The quick-start document typeset on an Next up was the draft of this article, which same one as in Formatting Information.1 It worked Android phone with LATEX Editor first time, and as I have Kingsoft Office (which in- cludes PDF preview) and the PrinterShare app, I no serious technological barrier. I haven’t yet found could even print it. Full marks. out how to import my personal PS fonts with their I was somewhat sceptical about, as ltugboat.cls is Next up was the draft of this article, which associated maps and font definitions, so explicitly I was somewhat sceptical about, as ltugboat.cls is typographical development is restricted to what is pretty complex, and has to deal with a lot of un- A available as packages from CTAN (which is substan- pretty complex, and has to deal with a lot of un- usual formatting. LTEX Editor handled it entirely A tial). The current version of LT X Editor is running correctly, downloading all the packages needed on- E pdflatex from T X Live 2012, not X LAT X, so there the-fly. There was a moment when I thought it had E E E A is no way to use whatever fonts are installed on an hung, but in fact it was just downloading packages: usual formatting. LT X Editor handled it entirely Android device. The author makes it clear that this E the lack of a progress meter does make this a little is a beta version, so I am looking forward to the 1.0 unnerving the first few times until you get to trust release. correctly, downloading all the packages needed on- it. I don’t have an iPhone or an iPad, so I can’t 2 Typographic logos compare this with whatever facilities are available in that ecosystem, and I am admittedly using a Galaxy The term is a bit of a misnomer: ‘logo’ is an abbre- the-fly. There was a moment when I thought it had Note 4, which is a phone masquerading as a tablet, viation of ‘logotype’, which is a whole word cast as a with an external Bluetooth keyboard — I haven’t single piece of metal, like ‘The’ in ATF , tried this setup on anything like the really tiny An- as opposed to a , which is a convenient com- hung, but in fact it was just downloading packages: droid phones. bination of characters cast as one, such as ffi, but However, it’s clear that developing packages and not a word. As the origin of the word ‘brand’ im- classes, and experimenting with typographic solu- plies, brands and symbols have been used for iden- tions can continue unabated on a pocket device, with tity since humans started keeping livestock, but the the lack of a progress meter does make this a little modern corporate logo is largely a production of the 1 http://latex.silmaril.ie/formattinginformation/ Victorian age of rapid development in labelling and unnerving the first few times until you get to trust it. quickstart.html#quickstart the emergence of marketing and competition. At I don’t have an iPhone or an iPad, so I can’t Typographers’ Inn compare this with whatever facilities are available in that ecosystem, and I am admittedly using a Figure 1: The quick-start document (top) and this Galaxy Note 4, which is a phone masquerading as article (bottom) typeset on an Android phone with a tablet, with an external Bluetooth keyboard—I A LTEX Editor haven’t tried this setup on anything like the really tiny Android phones. However, it’s clear that developing packages and classes, and experimenting with typographic solu- out how to import my personal PS fonts with their tions can continue unabated on a pocket device, with associated maps and font definitions, so explicitly no serious technological barrier. I haven’t yet found typographical development is restricted to what is available as packages from CTAN (which is substan- A 1 http://latex.silmaril.ie/formattinginformation/ tial). The current version of LTEX Editor is running quickstart.html#quickstart pdflatex from TEX Live 2012, not X LE ATEX, so there

Typographers’ Inn 16 TUGboat, Volume 36 (2015), No. 1

is no way to use whatever fonts are installed on an Android device. The author says this is a beta version, so I am looking forward to the 1.0 release.

2 Typographic logos The term is a bit of a misnomer: ‘logo’ is an abbre- viation of ‘logotype’, which is a whole word cast as a single piece of metal, like ‘The’ in ATF Garamond, as opposed to a ligature, which is a combination of characters cast as one, such as ffi, but not a word. Brands and symbols have been used for identity Figure 2: Coke advert showing abuse of the logo in since humans started keeping livestock (branding!), the text but the modern corporate logo is largely a production of the Victorian age of rapid development in printed labelling combined with the emergence of marketing and competition. At the time, however, logos were more a convenient way of flagging your products, rather like the exhortations to look on the jar; ‘none genuine without my signature!’ Figure 3: Honeywell’s example of how not to do it The development of colour meant logos could be hand-drawn as part of a larger image, and still reproduced in bulk, whereas in letterpress, Honeywell in the same font as your body copy/text.’ anything other than combinations of type would They even provide an example (Figure 3). See also mean making a block. Type-only logos are still with The TEXbook [4, ch. 1, para. 4] on the distinction us, from IBM to TEX, and can be surprisingly difficult between Honeywell’s TEX and TEX. to construct even (like IBM or METAFONT) when they are simply letters in a given font. Afterthought Using them in the text is frowned upon, typo- Perhaps the most extreme form of embedding graphically speaking (TEX must surely be the worst is that done by a recent instance of actual offender here). Charles Fyffe, in his book on copy- OpenType font code, for which I make no fitting [1] (now dated but still a mine of useful infor- apology for posting the naked URI: http: mation) says: //pixelambacht.nl/2015/sans-bullshit-sans/ Don’t use the client’s name-style in the copy References and expect it to be read, unless his name-style Basic Copyfitting is in a type and you are using it for the body [1] Charles Fyffe. . Studio Vista, London, 1969. copy [Phew! that lets TEX out— PF]. This is especially true of a name-block (plate) with [2] Honeywell Security. Using the Honeywell Logo. white letters out of black. Honeywell International Inc, Morristown, NJ, 2015. http://www.security.honeywell.com/resources/ The client, on the other hand, tries to branding/logo/. use his name-style everywhere — I have even [3] joshuaone9. font as logo vs used in body copy. known one who insisted that minute name- Typophile, Feb 2008. http://typophile.com/node/ blocks be inserted in the copy... 42144. What he’s referring to is the practice, still occa- [4] Donald E. Knuth. The TEXbook. Addison-Wesley, sionally seen, of using your logo for every mention of Reading, MA, Jun 1986. your product or company name in the text, especially of [5] Desmond Tan. Something Interesting. an advertisement, such as this one slated in the blog https://desmondtan91.wordpress.com/. of one Desmond Tan [5] and reproduced without permission in Figure 2. The practice is also con- ⋄ Peter Flynn demned on the Typophile blog [3], where ‘DO NOT’ Textual Therapy Division, and ‘NEVER’ feature strongly. Silmaril Consultants The Honeywell company has an explicit rule in Cork, Ireland their instructions to designers [2]: ‘In body copy or peter (at) silmaril dot ie text, do not use the Honeywell logo. Portray the word http://blogs.silmaril.ie/peter

Peter Flynn TUGboat, Volume 36 (2015), No. 1 17

LATEX News Issue 21, May 2014

Contents made use of a particular misfeature. Thus changing the kernel code would break too many existing documents. A Scheduled LTEX bug-fix release 1 The corrections for these types of bug have therefore Releasenotes ...... 1 been collected together in a package that can be loaded fixltx2e updates...... 1 only when needed; its name is fixltx2e. For this release New fltrace package ...... 1 we made the following changes to this package: inputenc package updates ...... 1 • Thetoolsdirectory...... 2 Misspelled float placement specifiers such as multicol updates ...... 2 \begin{figure}[tv] instead of tb are silently tabularx updates ...... 2 ignored by the kernel code. Now we test for such letters and issue an error message. showkeys updates...... 2 color updates ...... 2 • LATEX’s float handling algorithm can get out of graphicx updates ...... 2 sync if you mix single and double-column floats (as keyval updates...... 2 they are placed independently of each other). This was corrected in fixltx2e a few years ago but the fix A A Standard LTEX (LTEX 2ε) and expl3 2 was not perfect as one situation using \enlargethispage generated a low-level TEX error. This behaviour of the package is now improved. Scheduled LATEX bug-fix release This issue of LATEX News marks the second bug-fix New fltrace package release of LATEX 2ε (standard LATEX) since shifting to a new build system in 2009. Provided sufficient changes For years the file ltoutput.dtx contained some hidden are made, we expect to make such releases yearly or code to trace the detailed behaviour of the float placement algorithm of LAT X. Prompted by questions every two years, in sync with TEX Live. E on StackExchange we now extract this code into a new fltrace Release notes package. To see the float algorithm in action (or to understand why it decides to place all your floats at This release makes no changes to the core code in the the very end of the document) use A LTEX 2ε format but there are a small number of \usepackage{fltrace} \tracefloats documentation fixes (not listed here). In addition several packages in the base and required areas have To stop tracing somewhere in the document use been updated as detailed below. \tracefloatsoff and to see the current value of This has been done in accordance with the various float parameters use \tracefloatvals. As the philosophy of minimising problems in both forwards package is identical to the kernel code with tracing and backwards compatibility, so most of these changes added, it may or may not work if you load any other should not be noticed by the regular LATEX user. package that manipulates that part of the kernel code. References in the text below of the form In such a case your best bet is to load fltrace first. “graphics/3873” are to bug reports listed at: http://latex-project.org/cgi-bin/ltxbugs2html inputenc package updates The inputenc package allows different input encodings fixltx2e updates for LATEX documents to be specified including the There are a number of bugs and faulty design decisions important utf8 option used to specify the in LATEX 2ε that should have been corrected long ago in UTF-8 encoding. A common mistake in documents has the kernel code. However, such corrections cannot be been to also include this option when using the done as this would break backwards compatibility in Unicode-based TEX engines LuaTEX and X TE EX the following sense. A large number of documents exist producing strange errors as these engines natively deal by now that have worked around the bug or have even with UTF-8 characters.

LATEX News, and the LATEX software, are brought to you by the LATEX3 Project Team; Copyright 2014, all rights reserved. 18 TUGboat, Volume 36 (2015), No. 1

If a document stored in an 8bit encoding is processed showkeys updates by pdfT X, it needs the inputenc package to work E The showkeys package has been updated to fix problems correctly. However, if such a document is processed if used at the start of list items, and to work if brace unchanged by LuaT X or X T X, then accented E E E groups ({ and }) are used in the optional argument of characters may silently get dropped from the output. \cite. (tools/4162, tools/4173) The package has been modified so that if used with LuaTEX or X TE EX, then it just issues a warning if utf8 or ascii is specified, and stops with an error for any color updates other encoding requested. The \nopagecolor command suggested by Heiko One further improvement has been made to the Oberdiek, available for some years in the pdftex option, encoding definition files (.def) used by inputenc: the has been added to the core package as suggested in catcode of @ is now saved and restored when reading graphics/3873. Currently this is supported in the driver them instead of always using \makeatother inside the files for dvips and pdftex. Patches to support other files (latex/4192). drivers are welcome.

The tools directory graphicx updates In the past each of the sub-directories in the “required” The graphicx version of \rotatebox now allows \par A section of the LTEX distribution contained a single (and blank lines) in values, to match the change made .ins file to generate the code files from the source files. to the graphics version some years ago. See We have now started to provide individual .ins files for graphics/4296. each of those packages that are likely to require updates A outside a major LTEX release. keyval updates All parsing used in the keyval package has been changed multicol updates to allow \par (and blank lines) in values. (A second Version 1.8 of multicol implements some change, to parsing of brace groups in a construct such improvements/fixes and one extension. In the past the as key={{{value}}}, was reverted in v1.15.) See balancing algorithm enlarged the column height until it graphics/3446. found a solution that satisfied all constraints. If there were insufficient break points then the final column height could have been much larger than expected and Standard LAT X (LAT X2ε) and expl3 if that happened near the end of the page it resulted in E E the text overflowing into the bottom margin. This The substantial collection of innovative code in expl3 situation is now detected and in that case a normal implements a new programming language that has for a A page is cut and balancing is resumed on the next page. while now been used by some writers of LTEX 2ε Some overflow is still allowed and controlled via the packages. This code has recently also been made parameter \maxbalancingoverflow. available for use on top of plain TEX or ConTEXt, The use of \enlargethispage is now properly largely to support generic packages that are supposed supported within the environment. Finally a new to work with different flavours of TEX. These uses in no A command \docolaction was added to allow the way affect authors of LTEX documents and such A execution of code depending on the column in which the LTEX 2ε packages will continue to work as advertised A command is executed. See the documentation for by their authors with standard LTEX. details. This code base will also become an important A Bug fixes: the new version fixes both a color leak that foundation for the kernel of LTEX3 and so the new A could happen in certain situations and the problem that programming language can be described as ‘The LTEX3 multicols could mess up the positioning of Programming Language’. However, if you see or hear A \marginpars that followed the environment. that a package ‘uses LTEX3’ then it remains very unlikely (as yet) to mean that the package is part of some ‘new version of LAT X’. tabularx updates E News about the development and use of expl3 and A The restrictions on embedding \tabularx about other developments in the LTEX3 code base is A \endtabularx into the definition of a new environment reported regularly in the LTEX3 News series have been relaxed slightly. See the package (http://latex-project.org/l3news/), the most documentation for details. recent issue of which was published in March 2014. TUGboat, Volume 36 (2015), No. 1 19

Beamer overlays beyond the \visible namely, | to separate out appearance from a second action. A classic example of that is Joseph Wright \documentclass{beamer} Last year, I looked at the beamer overlay concept with \begin{document} relative slide specifications to produce dynamic slide \begin{frame} structures (Wright, 2014). Prompted by a question \begin{itemize}[<+->] on TEX Stack Exchange (‘Tarass’, 2014), here I’m \item item 1 going to look at a related area: action keywords. \item item 2 The ‘standard’ beamer overlay system does the \item<+-|alert@+(1)> item 3 same thing as the \visible command: makes things \item item 4 appear and disappear, but always keeps space for \item item 5 them on the slide. However, beamer also provides \end{itemize} \only, which completely omits items not visible on a \end{frame} slide. So the question was how to combine this idea \end{document} with the general overlay concept. where item 3 appears on the third slide and is high- It turns out that this is quite straightforward lighted on the fourth one. (Note that both + substi- beamer if you know what to look for. The standard tutions in this line use the same value for the pause overlay syntax, for example , hence needing the (1) offset.) That’s useful \item<+-> even without the ‘one at a time’ effect, for example \documentclass{beamer} supports the inclusion of an action type to specify \begin{document} what the overlay should do. That action is given as \begin{frame} a keyword and an @ before the overlay number(s). \begin{itemize} So, for example \item item 1 \begin{itemize} \item item 2 \item First item \item item 3 \item Second item \item item 4 \item Replacement second item \item item 5 ... \end{itemize} \end{frame} will show Second item on the first slide and then \end{document} replace it entirely with Replacement second item on the second slide. That approach can be combined highlighting the item on the second slide. with the idea of relative slide specifications, as I A bit of imagination with this syntax can cover talked about before, to give something like almost any appearance/disappearance/highlight re- quirement. As I said before: the key thing is not to \documentclass{beamer} overdo it! \begin{document} \begin{frame} References \begin{itemize}[<+->] ‘Tarass’. “Beamer: including items only some slides \item item 1 using a relative syntax”. tex.stackexchange. \item item 2 com/q/205625, 2014. \item item 3 Wright, Joseph. “The beamer class: Controlling \item item 4 overlays”. TUGboat 35, 31–33, 2014. \item item 5 tug.org/TUGboat/35-1/tb109wright.pdf. \end{itemize} ⋄ Joseph Wright \end{frame} Morning Star \end{document} 2, Dowthorpe End to have the ‘normal’ items appear one at a time but Earls Barton with item 3 only on slides 3 and 4. Northampton NN6 0NH This doesn’t just apply to only: other keywords United Kingdom joseph.wright (at) that work here include visible and alert. The morningstar2.co.uk latter tends to be seen with another syntax element;

Beamer overlays beyond the \visible 20 TUGboat, Volume 36 (2015), No. 1

− Glisterings: Here or there; Parallel texts; arguments, otherwise it is 1. The code is rather Abort the compilation tedious. Peter Wilson \usepackage{changepage} \newcommand*{\pikmargin}[1]{\bgroup A stately rocke beset with Diamonds faire, \def\targ{#1}\def\parg{left}% And pouldred round about with Rubles red, \ifx\targ\parg Where Emeralds greene doo glister in the air, \gdef\pkmarg{0}% With Mantill blew of Saphyres ouer spred. \else \def\parg{right}% The Ship of safegarde, Barnabe Googe \ifx\targ\parg \gdef\pkmarg{1}% The aim of this column is to provide odd hints or \else small pieces of code that might help in solving a \def\parg{outer}% problem or two while hopefully not making things \ifx\targ\parg worse through any errors of mine. \gdef\pkmarg{2}% \else In a civil war, a general must know — and \def\parg{inner}% I’m afraid it’s a thing rather of instinct \ifx\targ\parg than of practice — he must know exactly \gdef\pkmarg{3}% when to move over to the other side. \else \gdef\pkmarg{-1}% Not a Drum was Heard: The War \fi Memoirs of General Gland, (unpublished \fi radio play, 1959) Henry Reed \fi \fi 1 Here or there \egroup} Paul Kaletta asked on ctt [slightly edited]: The \settheside workhorse macro takes one I am writing a twoside document which means argument, the value of \pkmarg from \pikmargin, that even and odd pages have different margins. Un- and sets \ifputatright true or false according fortunately all images I include are aligned with the to whether material should be put into the right or left side of the text on every page. Some of them left margin. The basic algorithm is: are broader than the line width and protrude into the 1. A negative argument is converted to 2 (outer). right margin, which is nice for odd pages, but looks 2. For two columns always the nearest margin. weird for even ones. I would love to align the images to the inner 3. For one sided documents: margin, so that they always protrude to the outer 0 (left) false one. Is this possible? not 0 (all else) true Heiko Oberdiek gave a solution so that an image 4. For two sided documents: would not exceed the width of the text plus the false marginpar area [3]. 0 (left) This has been a problem that has cropped up 1 (right) true from time to time on ctt. More generally the prob- 2 (outer) true on an odd page and false on lem is how to decide into which margin something an even page should be put, and then put it there. The code 3 (inner) false on an odd page and true on below for the first problem is based on code that I an even page wrote for my memoir class. This version requires the The code is tedious, even more so than for the previ- changepage package [8] for correctly deciding whether ous macro. an odd or even page is being typeset.1 \newif\ifputatright The \pikmargin workhorse macro, used for spec- \makeatletter ifying a margin, takes one argument which must be \newcommand*{\settheside}[1]{% one of: left, right, outer, or inner. The result is \def\m@rgcode{#1}% \pkmarg which is in the range 0–3 for the allowed \ifnum #1<0\relax 1 %% error! write message and set to ‘outer’ Because of the asynchronous nature of TEX’s page break- ing algorithm simply checking the page number does not \typeout{Error! arg is ‘#1’. Set to ‘outer’} always lead to the correct result. The changepage macros are \def\m@rgcode{2}% an integral part of memoir. \fi

Peter Wilson TUGboat, Volume 36 (2015), No. 1 21

\if@twocolumn \newdimen\ximwidth% extra width \if@firstcolumn \newdimen\maximwidth% max total width \putatrightfalse \makeatletter \else \newcommand*{\maxiw}{% MAX Image Width \putatrighttrue \ifdim\Gin@nat@width>\maximwidth \fi \maximwidth \else \else \checkoddpage% from the changepage package \Gin@nat@width \if@twoside \fi} \ifcase\m@rgcode\relax \makeatother \putatrightfalse An external image is included by calling \MaxImage \or% 1 = left which is a wrapper around the regular graphicx pack- \putatrighttrue \includegraphics \or% 2 = outer age macro and takes the same \ifoddpage arguments, except for the optional width argument \putatrighttrue which is supplied internally. \else \newcommand*{\MaxImage}[2][]{% \putatrightfalse \par\noindent \fi \settheside{\pkimg}% \or% 3 = inner \ifputatright \ifoddpage \else \putatrightfalse \hspace{0pt minus \ximwidth}% move left \else \fi \putatrighttrue \includegraphics[{#1,width=\maxiw}]{#2}% \fi \ifputatright \fi \hspace{0pt minus \ximwidth}% \else% 1-sided \fi \ifnum\m@rgcode=0\relax \par} \putatrightfalse The general user scheme is: \else \putatrighttrue %% set the dimensions \fi \setlength{\maximwidth}{\textwidth} \fi \setlength{\ximwidth}{\marginparwidth} \fi} \addtolength{\maximwidth}{\ximwidth} \makeatother %% specify the margin (say the outer) \pikimagemargin{outer} You can use the \pikmargin and \settheside ... macros directly but in case there might be more than %% image may be in a figure, but need not be one kind of material to be put into the margins it is \begin{figure} better to be conservative and use them indirectly. \centering With the two workhorse macros in hand, here is \MaxImage[height=\textheight, code for letting overwide images extend a particular keepaspectratio]{myimage} distance, \ximwidth, into the margin. \caption{...} \pikimagemargin is for selecting the margin for \end{figure} a wide image. The margin code is stored as \pkimg. % \usepackage{graphicx} need this package To do just the opposite is also a form of \newcommand*{\pikimagemargin}[1]{% imitation. \pikmargin{#1}% Aphorismen, Georg \ifnum \pkmarg<0\relax Christoph Lichtenberg %% error! write message and set to ‘outer’ %% or perhaps to something more appropriate 2 Parallel texts \typeout{Error! arg is ‘#1’. Set to ‘outer’} \def\pkimg{2}% 2.1 Opposites \else On occasion somebody wants to set two documents \let\pkimg\pkmarg in parallel on facing pages. This is typically in the \fi} form of an original in one language on even numbered The next bit of code sets the maximum width pages and a translation in another language on the for an image. facing odd numbered pages. The ledpar package [10]

Glisterings: Here or there; Parallel texts; Abort the compilation 22 TUGboat, Volume 36 (2015), No. 1

is designed for this purpose, enabling individual line As Stephen said, there are limits to what can numbering and multiple footnotes on the parallel be successfully included in the parallel texts. For pages. But sometimes this may be overkill. Stephen example, footnotes may throw things out of kilter Hicks [2] presented a method in response to a query and page headings can get out of synch if they are on texhax, where it didn’t matter if one of the texts changed inside either of the texts by, say, including was much longer than the other (if necessary the some \sections. shorter text being ‘completed’ with blank pages). He The technical change I made was replacing the explained his basic algorithm as: macro \cleardoublepage with the new one named 1. Load both documents into separate boxes (i.e., \cleartostart. This is called just before the left– galleys) right printing starts. With \cleardoublepage the \setbox\left@box\vbox\bgroup left text starts on an odd page and continues on \input left\egroup odd pages while the right text then starts on the \setbox\right@box\vbox\bgroup following even page. It seems more logical to me \input right\egroup that the left text should start on an even numbered This might lead to difficulties if anything in the page, this being the left of a two page spread. The documents have, say, \eject or anything else standard \clearpage moves to the next page, which weird re: page handling, or it might just work if may be odd or even, while the \cleardoublepage the whatsits behave well inside boxes. moves to the next odd page. The \cleartostart 2. Alternately \vsplit off \textheight from each macro, which is based on \cleartoevenpage from box and \unvbox it into the current page, fol- the memoir class [9], moves to the next even page. lowed by a \clearpage. \newcommand*{\cleartostart}{\clearpage Stephen’s code for implementing this was as \ifodd\c@page\hbox{}\newpage\fi} follows, except that I have made a minor change de- scribed later, and exercised some editorial privilege. 2.2 Equals \documentclass{report}% or other class Thomas Thurman, who described himself as a poet ... and programmer, posted to ctt saying [6]: \makeatletter \newbox\left@box \newbox\right@box I have a particular typesetting task, described \newenvironment{leftpage}{% below. Can you tell me whether it’s possible in TeX \global\setbox\left@box\vbox\bgroup}% without major upheaval? (Pointers as to how it’s {\egroup} possible are welcomed, but at the moment I want to \newenvironment{rightpage}{% check that it’s possible at all.) \global\setbox\right@box\vbox\bgroup}% I have two source documents P and Q. P con- {\egroup} sists (as you might expect) of a series of words sep- \def\alternate{%\cleardoublepage arated by spaces and punctuation. Q consists of \cleartostart exactly the same number of entirely different words, \let\@next\@alternate but separated by the same punctuation. The words \ifdim\ht\left@box=\z@\ifdim\ht\right@box=\z@ may not necessarily be the same length, but there will \let\@next\relax\fi\fi \@next} be the same number of them. \def\@unvsplit#1{\ifdim\ht#1=\z@\vbox{}\else So P might run “I am (of course) shocked! and \setbox\z@\vsplit#1 to\textheight\unvbox\z@ appalled!" and Q might run “We drink (in summer) \fi} lemonade! and Pimms!" \def\@alternate{\@unvsplit\left@box\eject What I want to do is to turn P and Q into a \@unvsplit\right@box\eject\alternate} TeX document that either: \makeatother - consists of two columns per page, the left from ... P and the right from Q, but on each line the number \begin{document} ... of words in each column is the same. (So if there are \begin{leftpage} five words from the P column on the first line, there \input{lefttext} are five words from the Q column on the first line.) \end{leftpage} \begin{rightpage} or \input{righttext} - consists of pages alternately from P and Q, \end{rightpage} but for each line the number of words on that line is \alternate equal to the number of words on the same line on the ... \end{document} facing page.

Peter Wilson TUGboat, Volume 36 (2015), No. 1 23

Either is a good solution. (Both would be won- \setbox1=\hbox{\sbs@buffi{} #1}% derful.) \setbox2=\hbox{\sbs@buffii{} #2}% Of course if P has a run of long words then \ifdim\wd1>.4\hsize\sbs@breaktrue\else the matching Q line will contain a lot of whitespace. \ifdim\wd2>.4\hsize\sbs@breaktrue\else This is quite all right. \sbs@breakfalse\fi\fi This resulted in a conversation between Bruno \ifsbs@break\sbs@writeline% \def\sbs@buffi{#1}% Le Floch and Jean-François Burnol ending with es- \def\sbs@buffii{#2}% sentially the following code from Jean-François [1] \else (I have edited it slightly to better fit the two-column \addtobuff\sbs@buffi{#1}% format). I can’t explain how it works any better \addtobuff\sbs@buffii{#2}% than what you see. \fi}

\makeatletter \def\sbs@writeline{% % ======Some helper macros \hbox to \hsize{\hss% \let\xpf\expandafter \hbox to .4\hsize{\pr@buffi}% \def\addtobuff#1#2{\xpf\def\xpf#1% \hskip.1\hsize% \xpf{#1 #2}} \hbox to .4\hsize{\pr@buffii}% \long\def\ifneitherempty#1#2{% \hss}} \xpf\ifx\xpf a\detokenize{#1}a% \xpf\@gobble % ======Master function \else \xpf\ifx\xpf a\detokenize{#2}a% \def\sidebyside#1#2{% \xpf\xpf\xpf\@gobble \def\sbs@buffi{\noindent}% \else \def\sbs@buffii{\noindent}% \xpf\xpf\xpf\@firstofone \sbs@parse #1 \Q #2 \Q \fi \sbs@writeline% flush the last line \fi} } I have added the following code so that the user can % ======Splitting into paragraphs specify if the left and right texts are to be set flush \long\def\longsbs #1#2{% left ([l]), centered (the default) or flush right ([r]). \longsbs@aux #1\par\Q #2\par\Q} \newcommand*{\setsbsleft}[1][c]{% \def\pr@buffi{\hfill\sbs@buffi\hfill}% \long\def% \def\@tempa{#1}\def\@tempb{l} \longsbs@aux #1\par#2\Q #3\par#4\Q{% \ifx\@tempb\@tempa \sidebyside{#1}{#3}% do one paragraph \def\pr@buffi{\sbs@buffi\hfill}% \bigskip % space between paragraphs \else % If either is empty, we’re done \def\@tempb{r}% % else do "\sidebyside" \ifx\@tempb\@tempa \ifneitherempty{#2}{#4}% \def\pr@buffi{\hfill\sbs@buffi}% {\longsbs@aux #2\Q #4\Q \fi }} \fi} \newcommand*{\setsbsright}[1][c]{% % ======Splitting at each space \def\pr@buffii{\hfill\sbs@buffii\hfill}% \def\@tempa{#1}\def\@tempb{l} \def\sbs@parse #1 #2 \Q #3 #4 \Q{% \ifx\@tempb\@tempa \sbs@step{#1}{#3}% \def\pr@buffii{\sbs@buffii\hfill}% % if either text is empty, \else % we are (almost) done \def\@tempb{r}% % else continue \ifx\@tempb\@tempa \ifneitherempty{#2}{#4}% \def\pr@buffii{\hfill\sbs@buffii}% {\sbs@parse #2 \Q #4 \Q}} \fi \fi} % ======Checking the size of each line % ======and printing it when it’s ready %% center the texts \setsbsleft \newif\ifsbs@break \setsbsright \def\sbs@step#1#2{% \makeatother

Glisterings: Here or there; Parallel texts; Abort the compilation 24 TUGboat, Volume 36 (2015), No. 1

The following is a short example of using the \usepackage{ifxetex} \longsbs macro which, unfortunately, may have dif- \newcommand*{\abort}{} ficulties if either of its arguments includes any macros. \ifpdf\else In this case the texts are set flush right and flush \ifxetex\else left. \typeout{You must be in PDF mode. Use pdflatex (or xelatex) instead.} \setsbsleft[r] \def\abort{\csname @@end\endcsname} \setsbsright[l] % or \def\abort{\stop} \longsbs {% \fi I am (of course) ... \fi \abort Can you tell ...... }{% \begin{document} We drink (in summer) ......

P consists ... If desired, it would be simple to recast this as a } package (a .sty file), which is what Lars exemplified in his response. I am (of We drink (in course) shocked! summer) lemonade! References and appalled! I and Pimms! I [1] Jean-François Burnol. Re: Arranging parallel texts. have a particular have two source Post to comp.text.tex newsgroup, 24 February typesetting task, documents P 2011. described herein. and Q. [2] Stephen Hicks. Re: [texhax] multiple documents within a document. Post to texhax mailing list, Can you tell me P consists (as you 30 March 2010. whether it’s possible might expect) of [3] Heiko Oberdiek. Re: How to make all images in TeX . . . at a series . . . same protrude into the outer border. Post to all. punctuation. comp.text.tex newsgroup, 3 January 2010. [4] Heiko Oberdiek. The ifpdf package, April 2012. http://mirror.ctan.org/macros/latex/ contrib/oberdiek. Eternity’s a terrible thought. I mean, [5] Will Robertson. The ifxetex package, 2009. where’s it all going to end? http://mirror.ctan.org/macros/generic/ ifxetex. Rosencrantz and Guildenstern [6] Thomas Thurman. Arranging parallel texts. are Dead, Tom Stoppard Post to comp.text.tex newsgroup, 22 February 2011. 3 Abort the compilation [7] Rasmus Villemoes. Aborting unless running Rasmus Villemoes wrote to ctt [7]: pdflatex. Post to comp.text.tex newsgroup, I have a document which is only meant to be 2 August 2010. typeset using pdflatex. It is rather large, and the [8] Peter Wilson. The changepage package, 2009. first pdf-only stuff doesn’t occur until quite late. So http://mirror.ctan.org/macros/latex/ if one accidentally compiles with latex it takes a contrib/changepage/. couple of minutes before the error is discovered. I [9] Peter Wilson. The memoir class for configurable would therefore like to insert some code shortly after typesetting, 2013. http://mirror.ctan.org/ \documentclass which aborts the compilation with macros/latex/contrib/memoir. an error message unless running under pdflatex. [10] Peter Wilson. Parallel typesetting for Both Lars Madsen and Heiko Oberdiek replied critical editions: The ledpar package, 2014. and the following code is a merge and extension of http://mirror.ctan.org/macros/latex/ their responses. The definition of \abort is from contrib/ledmac. Heiko and following a comment by Lars I included ⋄ Peter Wilson using the ifxetex package [5] in addition to the origi- 12 Sovereign Close nally suggested ifpdf package [4] as both pdflatex Kenilworth, CV8 1SQ and xelatex generate pdf output. UK \documentclass[...]{...} herries dot press (at) \usepackage{ifpdf} earthlink dot net

Peter Wilson TUGboat, Volume 36 (2015), No. 1 25

Online LATEX editors and other resources Pawel Lupkowski Abstract In this paper I will review several LATEX editors and other resources available online. I will focus on the Figure 1: writeLAT X interface range of packages offered and compilation options E available. The main question I aim to answer in this A paper is how online LTEX tools change the way we writeLAT X (together, ‘your stuff’). You retain A E can work with LTEX. full ownership to your stuff. We don’t claim any ownership to any of it. [8] Introduction ShareLaTeX providers also assure us that: The main question I would like to ask in this paper A You retain all ownership, copyright and intellec- is how online LTEX tools change the way we may work with LAT X. To answer this question I will tual property rights to any content uploaded to E ShareLaTeX. Your content will only be shared review several LATEX editors and resources available A with other users of your choosing and we will online. I will focus mainly on writeLTEX[8] and never share your content with third parties with- ShareLaTeX [5], which, in my opinion, are the most out your consent. [5] interesting online editors available. A In what follows I will focus only on the function- Using LTEX in online environment can have A different motivations. First, it is very convenient for ality offered for writeLTEX and ShareLaTeX’s free accounts (they both offer various paid plans suited people working mainly with LATEX. Online solutions offer this environment on virtually any machine with for different users’ needs — more information can be found on the projects’ websites). Internet access. Not only editing and compilation is A possible, but also file storage in the cloud is available The WriteLTEX interface is presented in Figure 1. It has two panels — on the left is an editor and for these services. Also, online LATEX editor makes collaboration easier (file sharing, version control, the on the right a live preview. The compilation is done same package set available for the collaborators). automatically; after each source change the preview is refreshed. You can hide either of the panels. More Online LATEX solutions can also be a great help A importantly, you can also turn off the live preview. in teaching LTEX. They can be a fast and easy way A to start editing and compiling documents without One of the nice features of the writeLTEX editor is that you can turn on emacs or vim mode to use installation of the LATEX environment and an editor — convenient for both teachers and students. the corresponding key-bindings. Unfortunately, spell checking is not available in the free account. 1 writeLATEX and ShareLaTeX Recently a new feature has been added to the editor called Rich Text. This mode allows you to WriteLATEX and ShareLaTeX are mature but still write your document in a semi-WYSIWYG fashion. rapidly developing projects. They are not only LATEX A comparison of default mode and rich text mode editors but also offer a wide range of services in order is presented in Figure 2. This new mode is well to make working in an online environment easy and designed and preserves a clear structure of a LAT X effective. Both environments offer: E code. In my opinion it might be useful for beginners, • an editor (with syntax highlighting, line num- especially when editing complicated texts. bering and live preview), Another point I find interesting in this editor is • A an online LTEX compiler, that you do not have to register to use it. You can • file storage, just start writing right away after visiting the web • document templates, page. This opens a wide range of interesting appli- • sharing and collaboration options. cations. One such is to publish your document in First let us take a look at the Privacy and terms writeLATEX in such a way that it might be opened and of service, since we are offered an option of keeping A edited by other users. This mechanism is used e.g. our files in the cloud. For writeLT X, we read that: A E by the LTEX template page described in Section 3. By using our Services you provide us with in- As for ShareLaTeX, its interface is very similar formation, files, and folders that you submit to to that of writeLATEX (see Figure 3). At the start, it First published in BachoTEX 2014 proceedings, pp. 109–112. displays three panels—the leftmost one displays files Reprinted with permission. used in a given project; the middle one is an editor

Online LATEX editors and other resources 26 TUGboat, Volume 36 (2015), No. 1

Table 1: writeLATEX vs. ShareLaTeX (free accounts) writeLATEX ShareLaTeX storage quota 100MB no data tag projects yes yes Dropbox no no compilers pdfLATEX pdfLATEX, LATEX, X LE ATEX, LuaLATEX templates yes yes *.zip upload yes yes file history yes no limited number no no of projects mobile support yes poor edit without yes no registration collaboration unlimited with 1 user only

Figure 2: writeLATEX interface — regular vs rich text mode example

Figure 3: ShareLaTeX interface

and the rightmost is a preview. By default compila- tion is manual; you click “Recompile” to see changes in the preview. As in writeLATEX you can turn on Figure 4: VerbTEX on the Android device emacs or vim editor mode. It is worth stressing that registration is necessary to use ShareLaTeX. Very usefully, ShareLaTeX offers different com- 2 Go mobile pilers to use for your documents (via the Settings The editors presented in the previous section can section). Currently ShareLaTeX supports LATEX, be used on a mobile device (with a reasonably big pdfLATEX, X LE ATEX and LuaLATEX. At present, write- screen). But there is a tool that is designed especially LATEX only supports pdfLATEX, but adding X LE ATEX for mobile devices, namely VerbTEX[7]. VerbTEX is is planned (see [8, Help]). available for all popular mobile platforms, notably Both writeLATEX and ShareLaTeX are intuitive Android, iOS, and Windows 8. and easy to use and explore. Tutorials and help VerbTEX works in two modes: local (storing are also offered. A comparison of these editors in a your files on the mobile device) and cloud mode variety of categories is presented in Table 1. (keeping your files in the verbosus.com cloud). Files To conclude this section, it is worth mentioning in local mode can be synchronised with a Dropbox another interesting project: LATEXlab [2]. This editor account. Files are stored as projects. In the free is developed within Google Docs. One of its inter- version of this application you can have at most two esting features is that it allows using a local LATEX documents in one project. VerbTEX allows you to installation as an compiler. create, store and edit your documents on the mobile

Pawel Lupkowski TUGboat, Volume 36 (2015), No. 1 27

Figure 5: Detexify

device. Previously existing files can be uploaded Figure 6: Online table editor and to help in writing new documents, a custom new.tex document template is available. The editor (and other formats, such as HTML, plain text and offers syntax highlighting and line numbering, as Mathematica code). The tool allows you to decide can be noticed in Figure 4. Most important, to on the table borders, merge cells, add caption and compile your document you will need an Internet edit text align in cells. The interface is shown in connection. This keeps the application quite small — Figure 6. the Android version is only 1.7MB. The default Of course the short list given here is far from compilation output is PDF. being complete, but it represents resources that I find most useful in my everyday work. 3 Other online resources Let’s turn to other online resources useful for work- Summary ing with LATEX. The tool I use the most is certainly The way we work today is heavily influenced by Detexify [1]. The idea behind this tool is to make it the Internet and more and more by mobile devices. easy to find a command for a given listed in Tools and resources described in this paper enable [4]. All you have to do is draw your desired symbol us to work with LATEX according to these new trends. and then wait. You will obtain a list of recognised Document typesetting might be device-independent: symbols with commands. Furthermore, each com- we may easily create, edit and share document using a mand is supplemented with some information about or even a mobile phone. This opens new the package needed to use it. Detexify is presented possibilities for LATEX users, possibilities available in Figure 5. already for users of WYSIWYG editors, like Office Detexify enables a fast, efficient and very intu- Online or Google Docs. itive symbol search. The tool is also available for References mobile devices running Android or iOS. Another online resource worth mentioning here [1] Detexify. detexify.kirelabs.org. is the LAT X templates website [3]. The page hosts a [2] LATEXlab. docs.latexlab.org. E A large (and still growing) number of LAT X document [3] LTEX templates website. latextemplates.com. E A templates grouped in useful categories, such as aca- [4] Scott Pakin. The comprehensive LTEX symbol list. demic journals, articles, books, calendars, conference ctan.org/pkg/comprehensive, 2009. posters, etc. Each template is described in detail [5] ShareLaTeX. www.sharelatex.com. truben.no/latex/table and supplemented with an example. A very nice [6] Table editing online. . [7] VerbT X. verbosus.com. feature is that the templates can be edited online E [8] writeLATEX. www.writelatex.com. using writeLATEX by just a single click on the “Open with writeLaTeX” button, making the templates ⋄ Pawe lLupkowski even more useful and easy to use. Institute of Psychology A Our list of useful LTEX resources is closed by Dept. of Logic and Cognitive Science an online table editor. I often find it hard to easily Adam Mickiewicz University design a large table. [6] can help in such a situation. Pozna´n, Poland This online tool helps you to design a table in a pawel dot lupkowski (at) dot com WYSIWYG fashion and then export it to LATEX code http://amu.edu.pl/~p_lup/

Online LATEX editors and other resources 28 TUGboat, Volume 36 (2015), No. 1

Exporting XML and ePub from ConTEXt It is for this reason that in ConTEXt MkIV we can export the content in a reasonable structured Hans Hagen way to XML. Of course we assume a structured 1 Introduction document. It started out as an experiment because it was relatively easy to implement, and it is now an There is a pretty long tradition of typesetting math integral component. with TEX and it looks like this program will dominate for many more years. Even if we move to the web, 2 The output the simple fact that support for MathML in some The regular output is an XML file but as we have browsers is suboptimal will drive those who want a some more related data it gets organized in a tree. quality document to use PDF instead. We also export a few variants. An example is given I’m writing this in 2014, at a time when XML below: is widespread. The idea of XML is that you code your data in a very structured way, so that it can ./test-export ./test-export/images be manipulated and (if needed) validated. Text has ./test-export/images/... XML always been a target for which is a follow-up ./test-export/styles to SGML that was in use by publishers. Because ./test-export/styles/test-defaults.css HTML is less structured (and also quite tolerant ./test-export/styles/test-images.css with respect to end tags) we prefer to use XHTML ./test-export/styles/test-styles.css but unfortunately support for that is less widespread. ./test-export/styles/test-templates.css Interestingly, documents are probably among ./test-export/test-raw.xml the more complex targets of the XML format. The ./test-export/test-raw.lua reason is that unless the author restricts him/herself ./test-export/test-tag.xhtml or gets restricted by the publisher, tag abuse can ./test-export/test-div.xhtml happen. At Pragma we mostly deal with education- Say that we have this input: related XML and it’s not always easy to come up \setupbackend with something that suits the specific needs of the [export=yes] educational concept behind a school method. Even if we start out nice and clean, eventually we end up with \starttext a polluted source, often with additional structure \startsection[title=First] needed to satisfy the tools used for conversion. \startitemize We have been supporting XML from the day it \startitem one \stopitem showed up and most of our projects involve XML in \startitem two \stopitem \stopitemize one way or the other. That doesn’t mean that we \stopsection don’t use TEX for coding documents. This manual is \stoptext for instance a regular TEX document. In many ways The main export ends up in the test-raw.xml a structured TEX document is much more convenient to edit, especially if one wants to add a personal touch export file and looks like the following (we leave out and do some local page make-up. On the other hand, the preamble and style references, and some line TUGboat diverting from standard structure commands makes breaks are for ): the document less suitable for output other than PDF. There is simply no final solution for coding a

So we have a dilemma: if we want to have mul- 1 First tiple output, frozen PDF as well as less-controlled HTML output, we can best code in XML, but when There are other ways, like Markdown, that can be converted to intermediate formats like TEX, but that is only suitable for simple documents: the more ad- vanced documents get, the more one has to escape one from the boundaries of (any) document encoding, and then often TEX is not a bad choice. There is a good reason why TEX survived for so long.

Hans Hagen TUGboat, Volume 36 (2015), No. 1 29

two

one