Extending Gnu Troff to Produce Html Through the Technique of Next Event Simulation

Total Page:16

File Type:pdf, Size:1020Kb

Extending Gnu Troff to Produce Html Through the Technique of Next Event Simulation G. MULLEY and W.LEMBERG: EXTENDING GNU TROFF TOPRODUCE HTML EXTENDING GNU TROFF TOPRODUCE HTML THROUGH THE TECHNIQUE OF NEXT EVENT SIMULATION GAIUS MULLEY and WERNER LEMBERG School of Computing,University of Glamorgan, CF37 1DL, UK E-Mail: [email protected] Kl. Beurhausstr.1,44137 Dortmund, Germany E-Mail: [email protected] Abstract: This paper reports on a technique used to generate accurate HTML output from GNU Troff. GNU Troff is a typesetting package which reads plain text mixed with formatting commands and produces formatted output. It supports a number of devices and nowsupports the production of HTML.The paper discusses the design of the HTML device driver grohtml and modifications made to GNU Troff. The front end program troff wasmodi- fied to maintain a reduced state machine which is examined each time a glyph is passed to the back end device driver(post-grohtml). Anychange in system state between the production of twoglyphs results in a sequence of events being passed to the device driver. There is a direct correspondence between this technique and creating ascript for a next event simulation queue. Furthermore the device driverreconstructs the system state and for- mats the HTML according to state changes caused when processing the event queue. This technique works well, as it minimises the state information passed from front end to back end device driverwhilst still preserving the high levellayout of the text. Using this technique GNU Troffeffectively translates input source into another mark-up language and thus this technique could be extended to translate GNU Troffdocuments into anyofthe OpenOffice supported formats. Troffhas been in use for three decades nowand is still actively used by authors. Troff’sbiggest use, however, istoformat manual pages for GNU/Linux and other UNIX likeoperating systems. Introducing this facility into GNU Troffprovides users with the ability to translate legacy documents into HTML and in the future to a format supported by OpenOffice. Ke ywords: groff, troff, grohtml, HTML, simulation. table [Lesk, 1976a], picture [Kernighan, 1991, Wyk, 1982] and equation handling [Kernighan, 1977, INTRODUCTION Kernighan, 1976] (refer, tbl, pic and eqn respec- tively). These programs were executed in a pipeline GNU Troffisareimplementation of the program and troff transformed the heavily preprocessed troff which is available on the UNIX operating sys- formatting commands and text into device dependent tem. The original troff waswritten in PDP-11 output [Kernighan, 1978]. Although the input to assembly language by Joe Ossanna in 1973. Tw o troff wasdevice independent it was also very low years later it was rewritten in C and afterwards it leveland therefore users were encouraged to use went through a series of revisions until Joe Ossanna macro sets when producing documents [Lesk, died in 1977. 1976b]. During the 1980s the internals were mod- estly revised and a number of newmacro sets were Brian Kernighan continued troff development for the next 15 years and it is testament to the original written [Allman, 1980, Smith, 1980]. The macro design that the input language remained the same. sets provided freedom in document styling (similar Much of the original documentation receivedminor to modern HTML style sheets) and theyincluded: arbitrary style headers and footers; arbitrary style changes as new troff releases were issued and therefore Joe’sname was retained on these manu- footnotes; automatic sequence numbering for para- als [Ossanna, 1992]. graphs, sections, etc; multiple column output; dynamic font and point-size control; arbitrary hori- Brian Kernighan modified troff so that it could zontal and vertical local motions at anypoint; math- produce output for a number of different typesetting ematical bracket construction, and line drawing devices, while at the same time retaining the same functions [Ossanna, 1992]. input language specification. The input language wassorobust that a number of preprocessors were During the 1980s troff wasextended to handle written to provide reference [Tuthill, 1986], manydifferent devices, this was accomplished by I.J. of SIMULATION Vol. 6 No 7-8 37 ISSN 1473-804x online, 1473-8031 print G. MULLEY and W.LEMBERG: EXTENDING GNU TROFF TOPRODUCE HTML splitting the task of troff into twocomponents. commands to format abstracts, titles, footnotes, para- The front end ditroff produced device indepen- graphs, lists, hanging indents etc. Consequently, dent code and the back end device driverwhich sim- translating troff input source into HTML cannot be ply translated the device independent code into the achievedbywriting a device driverwhich simply target device commands. reads ditroff input and produces HTML output. Consider the diagram in figure 1 which shows the James Clark begantowork on the GNU implemen- keycomponents of a simple groff command line tation of the troff family of tools in 1989. This was invocation together with a synopsis of the data pass- to be a completely newimplementation of all the ing though the pipeline. In figure 1 the troff input preprocessors, the ditroff program and the macro consists of requests or calls to macros (lines prefixed sets. The first release of groff (version 0.3.1) with a period) and text. Troffinput might also occurred in June 1990 and it included a replacement include text with escapes, for example the word for ditroff, eqn, tbl and pic.Italso included a program can be typeset by temporarily reducing the replacement for the me macros and the man macros. point size by 1 and altering the font to Courier.The The replacement programs were mostly written in word and escapes can be encoded as \s-1\fCpro- C++ and often supported extensions and removed gram\s+1\fP.Infigure 1 the final output is Post- various static data size limitations. Since 1999 the Script (the default device) and the invocation also groff package has had newmaintainers and has includes the ms macro package. Figure 2 shows how undergone active dev elopment. It supports the com- aPostScript printer interprets the output from Figure mon macro sets associated with troff (man, me, ms, 1. mdoc and mm). However groff also provides a modern macro set (mom)and also provides newpre- processors and support for colour. Abasic title DESCRIPTION OF THE PROBLEM 1. Heading at level1 1.1. Heading at level2 Troffwas widely used in the 1970s and 1980s. All UNIX documentation, release notes for both the 1.1.1. Heading at level3 First paragraph body AT&T and BSD UNIX variants was written in troff.Manypapers in the CACM and Software Figure 2: displaying the PostScript output Practice and Experience journals were also produced Notice howthe ditroff output only knows which using troff.Eventoday all UNIX and GNU/Linux font is to be used, the font size and position that the manual pages are written in troff using the man glyph should be placed. Another example that an macro set and some authors advocate using troff HTML device drivermust translate accurately is above other WYSIWYG tools to typeset their shown in figure 3. books [Tanenbaum, 1997, Stevens, 1998, Schaffter, 2004]. The start of an indented paragraph example in which line 1, line 2 and line 3 are Groffprovides compatibility with troff as well as vertically aligned. manymodern enhancements, image handling, colour .LP and limited pdf mark capability.Clearly the addition .IP once of an HTML device driverwould be useful. line 1 .IP twice line 2 GNU Troffcopied the original design of UNIX Troff .IP threefold ,which maps the input source onto a physical device line 3 through the use of a device independent language. Figure 3: examples of indented paragraphs Through this language it effectively plots each glyph at Cartesian coordinate position on a page. The dif- Here we see from the output shown in figure 4 that ficulty in translating troff source into HTML is the ms macro set diverted the indented paragraph exacerbated by the fact that both HTML and troff label parameter once, twice and threefold into a source are mark-up languages. As the GNU Troff macro. It then tests to see whether the macro width and original UNIX Troffpackages rely heavily on the is greater than a default length and if so it breaks the pipeline principle it has naturally led to the pre- line before starting the indented paragraph. Clearly processors (pic, tbl and eqn)translating their high the HTML device driverneeds to cope with these levelcommands onto much lower level troff com- constructs, as theyare also heavily used in manual mands. In turn, this has meant that much of the high pages. levelinformation (for example where a table starts and ends) is lost. Furthermore, using anyofthe macro packages will result in manylow lev el I.J. of SIMULATION Vol. 6 No 7-8 38 ISSN 1473-804x online, 1473-8031 print G. MULLEY and W.LEMBERG: EXTENDING GNU TROFF TOPRODUCE HTML Troffsource ditroffintemediate language postscript output .TL xTps %!PS-Adobe-3.0 Abasic title xres 72000 %%Creator: groff .NH 1 xinit %%DocumentNeed Heading at level1 troff-ms p1 grops %%+font Times-Ro .NH 2 xfont 6 TB %%DocumentSupp Heading at level2 f6 %%Pages: 1 .LP s12 H123k V 123k %%PageOrder: Asc First paragraph tA %%Orientation: body wh3000 %%EndComments tbasic Figure 1: Simple title, heading and paragraph Forexample HTML has a restricted set of mathemat- The start of an indented paragraph example in which line 1, line 2 and line ical glyphs and it is restricted in its ability to accu- 3are vertically aligned. once line 1 rately position these glyphs [Musciano, 1998]. Groff twice in contrast can be used to typeset mathematical for- line 2 mulae and users will at least expect the groff HTML threefold line 3 device drivertoreproduce the formulae as an image. Figure 7 shows Troffinput, which describes the defi- Figure 4: result of processing figure 3 with groff -ms nite integral.
Recommended publications
  • Markdown Markup Languages What Is Markdown? Symbol
    Markdown What is Markdown? ● Markdown is a lightweight markup language with plain text formatting syntax. Péter Jeszenszky – See: https://en.wikipedia.org/wiki/Markdown Faculty of Informatics, University of Debrecen [email protected] Last modified: October 4, 2019 3 Markup Languages Symbol ● Markup languages are computer languages for annotating ● Dustin Curtis. The Markdown Mark. text. https://dcurt.is/the-markdown-mark – They allow the association of metadata with parts of text in a https://github.com/dcurtis/markdown-mark clearly distinguishable way. ● Examples: – TeX, LaTeX https://www.latex-project.org/ – Markdown https://daringfireball.net/projects/markdown/ – troff (man pages) https://www.gnu.org/software/groff/ – XML https://www.w3.org/XML/ – Wikitext https://en.wikipedia.org/wiki/Help:Wikitext 2 4 Characteristics Usage (2) ● An easy-to-read and easy-to-write plain text ● Collaboration platforms and tools: format that. – GitHub https://github.com/ ● Can be converted to various output formats ● See: Writing on GitHub (e.g., HTML). https://help.github.com/en/categories/writing-on-github – Trello https://trello.com/ ● Specifically targeted at non-technical users. ● See: How To Format Your Text in Trello ● The syntax is mostly inspired by the format of https://help.trello.com/article/821-using-markdown-in-trell o plain text email. 5 7 Usage (1) Usage (3) ● Markdown is widely used on the web for ● Blogging platforms and content management entering text. systems: – ● The main application areas include: Ghost https://ghost.org/
    [Show full text]
  • Using NROFF and TROFF
    Using NROFF and TROFF Part Number: 800-1755-10 Revision A, of 9 May 1988 UNIX is a registered trademark of AT&T. SunOS is a trademark of Sun Microsystems, Inc. Sun Workstation is a registered trademark of Sun Microsystems, Inc. Material in this manual comes from a number of sources: NrofflTroff User's Manual, Joseph F. Ossanna, Bell Laboratories, Murray Hill, New Jersey; A Troff Tutorial, Brian W. Kernighan, Bell Laboratories, Murray Hill, New Jersey; Typ­ ing Documents on the UNIXSystem: Using the -ms Macros with Troff and Nroff, M. E. Lesk, Bell Laboratories, Murray Hill, New Jersey; A Guide to Preparing Documents with -ms, M. E. Lesk, Bell Laboratories, Murray Hill, New Jersey; Document Formatting on UNIXUsing the -ms Macros, Joel Kies, University of California, Berkeley, California; Writing Papers with Nroff Using -me, Eric P. Allman, University of California, Berkeley; and Introducing the UNIXSystem, Henry McGilton, Rachel Morgan, McGraw-Hill Book Company, 1983. These materials are gratefully acknowledged. Copyright © 1987, 1988 by Sun Microsystems, Inc. This publication is protected by Federal Copyright Law, with all rights reserved. No part of this publication may be reproduced, stored in a retrieval system, translated, transcribed, or transmitted, in any form, or by any means manual, electric, electronic, electro-magnetic, mechanical, chemical, optical, or other­ wise, without prior explicit written permission from Sun Microsystems. Contents Chapter 1 Introduction . 1.1. nrof f andtrof f . Text Formatting Versus Word Processing TheEvolutionof nr of f andt ro f f Preprocessors and Postprocessors 1.2. tr of f, Typesetters, and Special-Purpose Formatters ............ 1.3.
    [Show full text]
  • GNU Emacs Manual
    GNU Emacs Manual GNU Emacs Manual Sixteenth Edition, Updated for Emacs Version 22.1. Richard Stallman This is the Sixteenth edition of the GNU Emacs Manual, updated for Emacs version 22.1. Copyright c 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being \The GNU Manifesto," \Distribution" and \GNU GENERAL PUBLIC LICENSE," with the Front-Cover texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License." (a) The FSF's Back-Cover Text is: \You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." Published by the Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA ISBN 1-882114-86-8 Cover art by Etienne Suvasa. i Short Contents Preface ::::::::::::::::::::::::::::::::::::::::::::::::: 1 Distribution ::::::::::::::::::::::::::::::::::::::::::::: 2 Introduction ::::::::::::::::::::::::::::::::::::::::::::: 5 1 The Organization of the Screen :::::::::::::::::::::::::: 6 2 Characters, Keys and Commands ::::::::::::::::::::::: 11 3 Entering and Exiting Emacs ::::::::::::::::::::::::::: 15 4 Basic Editing
    [Show full text]
  • Linux from Scratch Linux from Scratch
    Linux From Scratch Linux From Scratch Table of Contents Linux From Scratch............................................................................................................................................1 Gerard Beekmans.....................................................................................................................................1 Dedication............................................................................................................................................................2 Preface................................................................................................................................................................10 Who would want to read this book..................................................................................................................11 Who would not want to read this book...........................................................................................................12 Organization......................................................................................................................................................13 Part I − Introduction...............................................................................................................................13 Part II − Installation of the LFS system.................................................................................................13 Part III − Appendixes.............................................................................................................................13
    [Show full text]
  • Downloads." the Open Information Security Foundation
    Performance Testing Suricata The Effect of Configuration Variables On Offline Suricata Performance A Project Completed for CS 6266 Under Jonathon T. Giffin, Assistant Professor, Georgia Institute of Technology by Winston H Messer Project Advisor: Matt Jonkman, President, Open Information Security Foundation December 2011 Messer ii Abstract The Suricata IDS/IPS engine, a viable alternative to Snort, has a multitude of potential configurations. A simplified automated testing system was devised for the purpose of performance testing Suricata in an offline environment. Of the available configuration variables, seventeen were analyzed independently by testing in fifty-six configurations. Of these, three variables were found to have a statistically significant effect on performance: Detect Engine Profile, Multi Pattern Algorithm, and CPU affinity. Acknowledgements In writing the final report on this endeavor, I would like to start by thanking four people who made this project possible: Matt Jonkman, President, Open Information Security Foundation: For allowing me the opportunity to carry out this project under his supervision. Victor Julien, Lead Programmer, Open Information Security Foundation and Anne-Fleur Koolstra, Documentation Specialist, Open Information Security Foundation: For their willingness to share their wisdom and experience of Suricata via email for the past four months. John M. Weathersby, Jr., Executive Director, Open Source Software Institute: For allowing me the use of Institute equipment for the creation of a suitable testing
    [Show full text]
  • Deployment of XML for Office Documents in Organizations
    JYVÄSKYLÄ LICENTIATE THESES IN COMPUTING 16 Eliisa Jauhiainen DeployPent of XML for OfÀFe DoFXPents in Organizations JYVÄSKYLÄ LICENTIATE THESES IN COMPUTING 16 Eliisa Jauhiainen Deployment of XML for Office Documents in Organizations UNIVERSITY OF JYVÄSKYLÄ JYVÄSKYLÄ 2014 Deployment of XML for Office Documents in Organizations JYVÄSKYLÄ LICENTIATE THESES IN COMPUTING 16 Eliisa Jauhiainen Deployment of XML for Office Documents in Organizations UNIVERSITY OF JYVÄSKYLÄ JYVÄSKYLÄ 2014 Editor Mauri Leppänen Department of Computer Science and Information Systems, University of Jyväskylä URN:ISBN:978-951-39-5600-4 ISBN 978-951-39-5600-4 (PDF) ISBN 978-951-39-5599-1 (nid.) ISSN 1795-9713 Copyright © 2014, by University of Jyväskylä Jyväskylä University Printing House, Jyväskylä 2014 ABSTRACT Jauhiainen, Eliisa Deployment of XML for office documents in organizations Jyväskylä: University of Jyväskylä, 201, 63 p. (+ four included articles) (-\YlVN\Ol/LFHQWLDWH7KHVHVLQ&RPSXWLQJ ISSN) ,6%1 (nid.), 978-951-39-5600-4 (PDF) Licentiate Thesis Majority of the content in organizations is stored as documents. Structured documents, like XML documents, allow the structure definitions, document instances, and layout specifications to be handled as separate entities. This is an important feature to realize from a document management point of view. A class of similar documents with the same structure constitutes a document type. The documents are built from components that are logical units of information within the context of the document type. Office documents are typically authored using word-processing software, they are relatively short in length, and intended for human consumption. The development of open office standards brought XML to organizations’ office en- vironments and changed the capabilities of using document content in ways that were previously impossible or difficult.
    [Show full text]
  • Mandoc: Becoming the Main BSD Manual Toolbox
    mandoc: becoming the main BSD manual toolbox BSDCan 2015, June 13, Ottawa Ingo Schwarze <[email protected]> Cynthia Livingston’sOTTB “Bedifferent” (c) 2013 C. Livingston (with permission) > Ingo Schwarze: mandoc page 2: INTROI BSDCan 2015, June 13, Ottawa Brief history of UNIX documentation • The key point: All documentation in one place and one format. Easy to find, uniform and easy to read and write. Be correct, complete, concise. • 1964: RUNOFF/roffmarkup syntax by Jerome H. Saltzer,MIT. Unobtrusive,diff(1)-friendly,easy to hand-edit, simple tools, high quality output. • 1971: Basic manual structure by Ken Thompson and Dennis Ritchie for the AT&T Version 1 UNIX manuals, Bell Labs. • 1979: man(7) physical markup language for AT&T Version 7 UNIX. • 1989: mdoc(7) semantic markup by Cynthia Livingston for 4.3BSD-Reno. Powerful, self-contained, portable. • 1989: GNU troffbyJames Clarke. • 2001: mdoc(7) rewrite by Werner Lemberg and Ruslan Ermilovfor groff-1.17. • 2008: mandoc(1) started by Kristaps Dzonsons. • 2010: mandoc(1) is the only documentation formatter in the OpenBSD base system. • 2014: mandoc(1) used by default in OpenBSD, FreeBSD, NetBSD, illumos. 16:19:30 What is the mandoc toolbox? → < > Ingo Schwarze: mandoc page 3: INTROIIBSDCan 2015, June 13, Ottawa What is the mandoc toolbox? User perspective:man(1), the manual viewer One comprehensive tool! Normal operation always proceeds in three steps: 1. Find one or more manuals in the file system or using a database by manual name — man(1) — or by search query — apropos(1) =man -k The result of this step can be printed out with man -w.
    [Show full text]
  • Looking to the Future by JOHN BALDWIN
    1 of 3 Looking to the Future BY JOHN BALDWIN FreeBSD’s 13.0 release delivers new features to users and refines the workflow for new contri- butions. FreeBSD contributors have been busy fixing bugs and adding new features since 12.0’s release in December of 2018. In addition, FreeBSD developers have refined their vision to focus on FreeBSD’s future users. An abbreviated list of some of the changes in 13.0 is given below. A more detailed list can be found in the release notes. Shifting Tools Not all of the changes in the FreeBSD Project over the last two years have taken the form of patches. Some of the largest changes have been made in the tools used to contribute to FreeBSD. The first major change is that FreeBSD has switched from Subversion to Git for storing source code, documentation, and ports. Git is widely used in the software industry and is more familiar to new contribu- tors than Subversion. Git’s distributed nature also more easily facilitates contributions from individuals who are Not all of the changes in the not committers. FreeBSD had been providing Git mir- rors of the Subversion repositories for several years, and FreeBSD Project over the last many developers had used Git to manage in-progress patches. The Git mirrors have now become the offi- two years have taken the form cial repositories and changes are now pushed directly of patches. to Git instead of Subversion. FreeBSD 13.0 is the first release whose sources are only available via Git rather than Subversion.
    [Show full text]
  • Linux from Scratch Version 6.2
    Linux From Scratch Version 6.2 Gerard Beekmans Linux From Scratch: Version 6.2 by Gerard Beekmans Copyright © 1999–2006 Gerard Beekmans Copyright (c) 1999–2006, Gerard Beekmans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: • Redistributions in any form must retain the above copyright notice, this list of conditions and the following disclaimer • Neither the name of “Linux From Scratch” nor the names of its contributors may be used to endorse or promote products derived from this material without specific prior written permission • Any material derived from Linux From Scratch must contain a reference to the “Linux From Scratch” project THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Linux From Scratch - Version 6.2 Table of Contents Preface
    [Show full text]
  • Curriculum Vitae
    Vancouver, BC Canada +1.604.551.7988 KipWarner [email protected] Senior Software Engineer / Co-chairman OPMLWG 07 August 2021 *** WARNING: MANGLED TEXT COPY. DOWNLOAD PDF: www.thevertigo.com/getcv.php?fix Education 2007 Artificial Intelligence, BSc (Cognitive Systems: Computational Intelligence & Design) Department of Computer Science, University of British Columbia 2005 Associate of General Science Kwantlen Polytechnic University Professional Experience Jul 2015 - Cartesian Theatre, Vancouver, British Columbia Present Senior Software Engineer Techniques: Artificial intelligence, asymmetric cryptography, build automation, continuous integration testing, digital signal processing, machine learning, MapReduce, REST architecture, SIMD, and UNIX server daemon. Technologies: AltiVec / POWER Vector Media Extension; Apport; Assembly; AVX, Autopkgtest; Avahi / Apple’s Bonjour; Bash; C++17; CppUnit; cwrap (nss_wrapper); DBus; debhelper; GCC; GDB; Git; GNU Autotools; GNU/Linux; init.d; libav / FFmpeg; lsbinit; M4; OpenBMC; OpenSSL; Pistache; pkg-config; PortAudio; PostgreSQL; PPA; Python; QEMU; quilt; sbuild / pbuilder; setuptools; SQLite; STL; strace; systemd; Swagger; Umbrello; and Valgrind. Standards: Debian Configuration Management Specification; Debian Database Application Policy; Debian Policy Manual; Debian Python Policy; DEP-8; Filesystem Hierarchy Standard; freedesktop.org; GNU Coding Standards; IEEE 754; JSON; LSB; OpenAPI Specification; POSIX; RFC 4180; RSA; SQL; UNIX System V; UML; UPnP; and Zeroconf. Hardware: Ported to 64-bit PC
    [Show full text]
  • Unix Programmer's Manual
    There is no warranty of merchantability nor any warranty of fitness for a particu!ar purpose nor any other warranty, either expressed or imp!ied, a’s to the accuracy of the enclosed m~=:crials or a~ Io ~helr ,~.ui~::~::.j!it’/ for ~ny p~rficu~ar pur~.~o~e. ~".-~--, ....-.re: " n~ I T~ ~hone Laaorator es 8ssumg$ no rO, p::::nS,-,,.:~:y ~or their use by the recipient. Furln=,, [: ’ La:::.c:,:e?o:,os ~:’urnes no ob~ja~tjon ~o furnish 6ny a~o,~,,..n~e at ~ny k:nd v,,hetsoever, or to furnish any additional jnformstjcn or documenta’tjon. UNIX PROGRAMMER’S MANUAL F~ifth ~ K. Thompson D. M. Ritchie June, 1974 Copyright:.©d972, 1973, 1974 Bell Telephone:Laboratories, Incorporated Copyright © 1972, 1973, 1974 Bell Telephone Laboratories, Incorporated This manual was set by a Graphic Systems photo- typesetter driven by the troff formatting program operating under the UNIX system. The text of the manual was prepared using the ed text editor. PREFACE to the Fifth Edition . The number of UNIX installations is now above 50, and many more are expected. None of these has exactly the same complement of hardware or software. Therefore, at any particular installa- tion, it is quite possible that this manual will give inappropriate information. The authors are grateful to L. L. Cherry, L. A. Dimino, R. C. Haight, S. C. Johnson, B. W. Ker- nighan, M. E. Lesk, and E. N. Pinson for their contributions to the system software, and to L. E. McMahon for software and for his contributions to this manual.
    [Show full text]
  • Typing Documents on the UNIX System: Using the –Ms and –Mcs
    Typing Documents on the UNIX System: Using the ±ms and ±mcs Macros with Troff² L. L. Cherry M. E. Lesk AT&T Bell Laboratories Murray Hill, New Jersey 07974 ABSTRACT This document describes a set of easy-to-use macros for preparing documents on the UNIX operating system. The macros provide facilities for paragraphs, sections headings (optionally with automatic numbering), page titles, footnotes, equations, tables, two-column for- mat, and several formats of cover pages for papers. This memo includes, as an appendix, the text of ``A Guide to Preparing Documents with ±ms and ±mcs,'' which contains additional examples of features of ±ms. Introduction. This memorandum describes a package of commands to produce papers using the troff formatting program. As with other formatting programs, text is prepared interspersed with formatting commands. However, this package, which itself is written in troff commands, provides higher-level commands than those pro- vided with the basic troff program. A separate set of macros, ±mcs, produces an official AT&T style internal docu- ment cover sheet. The ±mcs macros automatically invoke the ±ms macros. Although the basic ±ms macros work with nroff, the ±mcs macros do not. Macro names were selected in ±mcs to avoid collisions with the original ±ms macros and thereby maintain backward compatibility. This document reflects the new macros. The commands available in this package are listed in Appendix A; the cover sheet commands and their order are in Appendix B. Text. Type normally, except that instead of indenting for paragraphs, place a line reading ``.PP'' before each paragraph. This will produce indenting and extra space.
    [Show full text]