StarT E X at E X for beginners

Similar documents
StarTEX A TEX for Beginners

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

L A TEX Document Formatting Examples

LATEX, BibTEX, and Friends. Robert Buels. Outline. What is LATEX. Using BibTEX LYX the graphical LATEX Managing your BibTEX references Further reading

1 Introduction. 2 About L A TEX. Page 1(6) Why LATEX is used for review report typesetting within the TDB. project

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

Introduction to Scientific Typesetting Lesson 7: Graphics and Floats

Helen Cameron. A Brief Overview of LATEX

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

Very Short Introduction to LaTeX

An introduction. C.D. Emmery & M.M. van Zaanen. October 22, Tilburg University

Electronic Production Guidelines

What is L A T E X? Dan Yasaki. June 4, 2018 REU at Elon University. UNC Greensboro. Dan Yasaki What is LAT E X? 1 / 22

A brief introduction to L A TEX

Latex Tutorial. CIS400 Senior Design 9/5/2013

COMS 6100 Class note

PHYS-4007/5007: Computational Physics

LaTeX. Information Literacy II EN(IL2) Course

A Short L A TEX Introduction

L A T E X crash course

Programming with Python

Document Preparation Word Processors

An Audio View of (L A )TEX Documents Part II

L A TEX examples. a b c a b c b b a c b c c b a. This table was typeset with the following commands.

عمادة البحث العلمي جامعة الملك سعود

The Honours Dissertation Class for L A TEX2e. Cara MacNish

LaTeX. Information Literacy II EN(IL2) Course

L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

Math 3820 Project. 1 Typeset or handwritten? Guidelines

Getting Started with L A TEX

Getting started with Latex

Statistics Statistical Computing Software

Mikkel Madsen

My Mathematical Thesis

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Using LaTex and BibTex to Write Academic Documents. Ligang He Department of Computer Science University of Warwick

The AES Convention Paper LATEX class Adam H. Lewenberg (October 18, 2008) 1

A LAT E X Tutorial. Evangelos Milios. March 15, 2004

1. The Joy of TEX. Check out this example!

A Sample L A TEX Document

Helen Cameron. A Brief Overview of LATEX

The EJASA L A TEXTemplate An introduction for authors

11.1 Segmentation: Generalized Base/Bounds

A L A TEX-Package for IEEE PES Transactions

Dec. 27 th, 2010 University of Isfahan

Math 395 Homework #1 Due Wednesday, April 12

Began as TeX, in 1982 (Knuth). Purely a typesetting tool. LaTeX added macros, maintaining TeX as it s typesetting engine (Lamport).

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

David Helmbold, October 2005, Revised October 2007

Contents. Foreword. Examples of GeoGebra Applet Construction 1 A Straight Line Graph... 1 A Quadratic Graph... 6 The Scalar Product...

Week - 01 Lecture - 04 Downloading and installing Python

Square cells: an array cooking lesson

Introduction to Scientific Typesetting Lesson 1: Getting Started

Manuscript Preparation Guidelines for Authors

The basics of LaTeX. Cédric Buron. April 25, 2016

Introduction to L A TEX

An Introduction to L A TEX

Welcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay.

PART COPYRIGHTED MATERIAL. Getting Started LEARN TO: Understand HTML, its uses, and related tools. Create HTML documents. Link HTML documents

Introduction to LaTeX. Paul Fodor Stony Brook University

How to Prepare Your Paper in L A T E X for IOE Graduate Conference 2017

EXP FOR WINDOWS, VERSION 5.1

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why?

Word-to-L A TEX specification

Notes on Turing s Theorem and Computability

Document Preparation Using L A TEX

Hypertext Markup Language, or HTML, is a markup

CSE 440: Introduction to HCI User Interface Design, Prototyping, and Evaluation

Guide to using L A TEX

Part I. Introduction to Linux

Acrobat PDF from TEX

Latex Manually Set Font Size For Tables

Graduate School of Library and Information Science Spring Document Processing (LIS 450 )

MATLAB for the Sciences

How to use abdnthesis.cls

This chapter is intended to take you through the basic steps of using the Visual Basic

Introduction to L A T E X

Getting ready for L A TEX. Alexis Dimitriadis. Version: March 28, 2013

Authoring World Wide Web Pages with Dreamweaver

An Introduction to LATEX

Scheduler User Guide. Version 6

Creating Tables and Figures with L A T E X

In another markup scheme it will be like as given hereunder:

beginlatex /12/ : page #199

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version):

Author s Guide to the ACM SIGPLAN Class (sigplanconf.cls)

LATEX and Beamer. L A TEX and Beamer. Software Freedom Day, Indian Statistical Institute, Kolkata. September 16, 2011.

Latex. K.R. Chowdhary, Professor of CS web:krchowdhary.com

Scientific Communication CITS4008. Designing and Writing Web Pages Rachel Cardell-Oliver 2013 Based on notes by Robyn Owens

Network Working Group Request for Comments: 1049 March 1988 A CONTENT-TYPE HEADER FIELD FOR INTERNET MESSAGES

Using L A TEX Tom Edgar

History of Compilers The term

SOFTWARE ARCHITECTURE 4. TEXT FORMATTING SYSTEM

An Introduction to LATEX

A Brief Introduction to L A TEX

CSE 440: Introduction to HCI User Interface Design, Prototyping, and Evaluation

Research Method and Report Writing Lecture 4: An Introduction to L A TEX

A Demonstration of the L A TEX 2ε Class File for the Oxford University Press Ltd Journal. First Author 1 and Second Author 2.

Reduced Instruction Set Computers

WELCOME TO L A TEX 2ɛ!

Transcription:

StarT E X at E X for beginners Dag Langmyhr Department of Informatics University of Oslo dag@ifi.uio.no 1 Background In many courses taught at the Department of Informatics at the University of Oslo, students are required to write a short report or essay, typically 3 8 pages. A suitable text processing tool for this must fulfill the following requirements: It must run under UNIX, as all our student computers use UNIX. That excludes Scientific Word as well as Word and similar programs. It must not be too expensive. That excludes FrameMaker. It must provide quality mathematical typesetting, as several courses involve substantial amounts of mathematics. That excludes Word Perfect and Eqn+Troff. It should be easy to learn and use, yet robust. This is a point against L A TEX. My conclusion is that the ideal text processing tool for this group of users does not yet exist. It ought, however, to be possible to make a better tool for them, and the result of this project is StarTEX ( astarter stex ). 1.1 Choosing T E Xasbase To achieve the desired quality in mathematics, it was decided to develop StarT E XasaT E X extension, making it a kind of simple cousin of L A TEX s. The text processing program T E X was created by Donald Knuth[1] in 1982. It is recognized as probably the best available tool for mathematical typesetting today, and it is widely used in academic institutions. It runs on all commonly used computers, and it is available free.

Figure 1: The implementation levels of LAT E X and StarT E X User code L A TEX definition T E Xdefinition T E Xprimitives LATEX User code StarTEX definition T E Xdefinition T E Xprimitives StarTEX TEX provides only a low-level set of commands, but it has a macro language for building extensions; the best known such extensions are L A TEX[2] and AMS-TEX[3]. 2 Designing StarT E X StarT E X was designed to be an improvement on L A T E X for one particular group of users: students writing their first report. StarT E X is not for general use. This implies that the set of commands should be chosen with our users in mind. In particular, StarT E X should have fewer and simpler commands than LAT E X, and these commands should be more specialized for our use. StarTEX should provide a notation that causes the user fewer problems. StarT E X should be more robust than L A T E X. StarT E X should provide better error messages and error recovery than L A TEX. 2.1 Abstraction levels Even though L A TEX is a complete package implemented on top of TEX, it does not provide a separate abstraction level, as there is no separation between the various implementation levels. The users can call their own macrosaswellasl A TEX macros, plain TEX macros and TEX primitives, as shown in figure 1. This lack of separation means that the L A TEX users have access to several hundred commands unknown to them. This can lead to various kinds of problems; for example, a student defined a macro for her name: \def \else {Else Hansen}

This unintentional redefinition of a TEX primitive resulted in utter chaos. StarT E X makes it impossible for its users to call T E X macros and internals. 2.2 Command notation StarT E X uses a different command notation than L A T E X: <command> rather than \command. This notation originally proposed in the TEX world by Philip Taylor[4] has the following advantages: There is only one special character ( < ) rather than ten ( \, {, }, #, $, %, ^, _, ~ and & ). Spaces following the command are no longer a problem. (L A T E X generally ignores spaces following a command, but not always.) It is possible to enforce complete separation between the various implementation levels. It is easy to check every command when it is called, thus enabling better error detection. The commands may now contain almost any character, not just letters. The commands can be insensitive to casing, making <startex> and <STARtex> and even <startex> variant forms of the same command. The notation is the same as in HTML with which some students are familiar. 2.2.1 Environments L A T E X uses three different notations for environments: {\bf text} and \textbf{text} and \begin{bf}text\end{bf} This abundance of notation is the cause of many student problems: It is difficult to remember which one to use. For instance, if you write \abstract{this is...} rather than the correct

\begin{abstract} This is... \end{abstract} no errors will be reported, but the whole document will be set with a smaller font. It is difficult to match the environment initiator and terminator. If you get a message about \end occurred at level 1, it is not obvious how to detect the unmatched { or \begin causing the problem. It is more difficult for LAT E X to correct errors. StarT E X solves these problems by using the same notation as HTML for environments: <title>...</title>. 2.3 Specialized commands L A TEX has an impressive graphics package for inserting illustrations in various kinds of formats. The user may also control such insertion parameters as scaling, rotation, and whether the illustration may float to a nearby page. All this is necessary when writing complex documents like a book, but it complicates life for the novice users. For instance, just to include a simple POSTSCRIPT illustration, something like the following code is necessary: \usepackage[dvips]{epsfig} : \begin{figure} \caption{caption text} \begin{center} \epsfig{file=filename.eps,...} \end{center} \end{figure} Even though it is straightforward, there are two environments and two commands involved. StarT E X is more specialized in its notation: Since all out printers use POSTSCRIPT, the illustrations must be in that format, so there is no need to specify it. All illustrations are regarded as floating material. The illustrations are automatically scaled to a suitable size (80% of the text width or 40% of the text height, whichever is the smaller).

Table 1: A small table sample Index Data 12 199 17 0 This makes it possible to define a simpler notation (at the cost of less user control): <psfig>[filename.eps]caption </psfig> text 2.4 Robust notation As mentioned in the preceding paragraph, the L A T E Xnotationisreasonably straightforward, but it is not very robust. If you for instance want a simple table like the one shown as table 1, the L A T E X code would be: \begin{table} \caption{a small table sample} \begin{center} \begin{tabular}{ c c } \hline \textbf{index}& \textbf{data}\\ 12& 199\\ \hline 17& 0\\ \hline \end{tabular} \end{center} \end{table} \hline If you make a small mistake and forget a \\, you will get a long burst of error messages, none of which will indicate the real cause of the trouble. When defining StarTEX, I tried to devise a notation providing less room for errors. One example is the notation for tables. The StarT E X code for generating table 1 is <table>a small table sample <row> <b>index</b> <col> <b>data</b> <row> 12 <col> 199 <row> 17 <col> 0 </table> employing only one environment (<table>...</table>) and two simple commands: <row> starts another row, and <col> starts another column. As any combination of these two commands is legal, there will be fewer user errors.

2.5 Structural versus visual markup Like L A TEX, SGML and HTML,StarTEX provides a system using structural markup in which the user indicates the structure of the document with (ideally) no regard to its appearance. This is in contrast to systems like FrameMaker and Word that emphasize the visual side of publishing. While both kinds of systems have their merits and proponents, I believe that it will be an advantage for the students to have a working knowledge of structure-based text markup. Since StarTEX was designed to cater for a very limited range of documents, it goes even further than LAT E X and provides absolutely no visually oriented commands. (Even though L A TEX is primarily a structural system, it does provide some visual commands like \vspace, \rlap, \raisebox and others which are necessary when fine-tuning the document.) 2.6 Processing speed Even though L A T E X is not slow it processes 4 10 pages per second on a Sun Sparc it does take some time to start it. A sample 2 1 / 2 -page L A T E X document takes 2.8 seconds to run on a Sun SparcStation 20 and 8.7 seconds on a Silicon Graphics Indy. Starting times in this range are not important when writing long documents, but the potential users of StarT E X tend to have quite short ones. They also process their documents very frequently, as they are yet unfamiliar with L A TEX and want to see the effect of a command or test for an error. Since StarTEX ismuchsmallerthanl A TEX and uses only one configuration file, it is faster to start. The sample document mentioned above takes 0.9 seconds on the SparcStation and 1.6 seconds on the Indy. 2.7 Error recovery The philosophy of error recovery in T E X(andL A T E X) is based on user interaction: when an error is detected, TEX enters an interactive mode in which the user may attempt to locate the error and manually insert or delete code so that processing may continue. This technique was designed in the days when computers were slow compared to current ones: a 100 page document that takes 20 seconds to process today could take more than an hour 10 years ago. So far, I have found no students taking advantage of this interactive error correction. They either terminate the run after the first error, or they let L A T E X run to completion hoping to find the error in the log file afterwards. Running a batch-oriented text processor has a lot in common with compiling, so StarTEX tries to benefit from experience gained in this field.

Figure 2: A minimal StarT E X document <body> <title> <startex><--->a <tex> for beginners </title> <author> Dag Langmyhr<p> Department of Informatics<p> University of Oslo<p> <tt>dag@ifi.uio.no</tt> </author> <info> <today> </info> <abstract> This document describes <startex>, a special <tex> format for students writing their first project report. </abstract> <h1> The basic philosophy of <Startex> </h1> <Startex> was designed for novice <tex> users. It employs a different notation and a different set of commands from <latex>, and the idea is that this makes it more user-friendly for these users than plain <tex> or <latex>. <p> The notation used in <startex> resembles HTML and some of the commands are the same, but the philosophy of the two is different. HTML was designed to display hypertext information on a computer screen, while <startex> is used to produce a student report on paper. </body> It runs in non-stop mode, and attempts to recover from any errors it detects. Using named environment terminators makes this easier, so an error like <h1>using <b>bold text</h1> is easily detected and rectified. 2.8 An example Figure 2 shows an example of a minimal StarTEX document. 3 Comparison with SGML and HTML Since the notation used in StarTEX is so similar to HTML, someusers have wondered why I did not instead implement an HTML processor in TEX. There are several reasons for that:

HTML is not yet stable. New versions are appearing regularly, and various companies introduce their own extensions. No-one knows what HTML will look like a few years from now. It has not been decided how advanced will be the support for mathematical typesetting in HTML. It is possible to define new user commands in StarTEX, and I think this is very useful when working with a system like StarT E X. There is no possibility for such definitions in HTML. It is difficult to write a robust parser for HTML in TEX. It would, however, be possible to combine StarTEX and SGML (except for the problem with user-defined commands). One could envisage an environment in which the user edits his or her document using an SGML editor connected to a StarTEX DTD. Once the document is finished and verified by the editor, StarT E X could serve as its printing processor. Development of such a system is a future project. 4 Concluding remarks StarTEX was created to help one particular group of students; it was not designed to replace L A T E X for general work. Instead, it is a tribute to the versatility of TEX which so easily permits the design of a completely new user interface. StarTEX was completed early this autumn. It is available by anonymous FTP from ftp.ifi.uio.no in the directory pub/tex/startex. References [1] Donald E. Knuth. The T E Xbook. Addison-Wesley, 1984. [2] Leslie Lamport. L A T E X User s Guide & Reference Manual. Addison-Wesley, 1994. Second edition. [3] Michael Spivak. The joy of T E X. American Mathematical Society, 1986. The guide to AMS-TEX. [4] Philip Taylor. TEX: an unsuitable language for document markup? Talk given at the EuroTEX 1995 conference; does not appear in the proceedings., 1995.