THE UNIVERSITY OF AKRON Mathematics and Computer Science. JJ Game Class. D. P. Story

Similar documents
THE UNIVERSITY OF AKRON Mathematics and Computer Science. JJ Game Class. D. P. Story

AcroTEX: Acrobat and TEX Team Up

L A TEX Gotchas - Common Pitfalls and Debugging

Square cells: an array cooking lesson

Math 235: Introduction to LaTeX

Formatting Instructions for NIPS*2006

Package epsdice a scalable dice font

Techniques of Introducing Document-level JavaScript into a PDF file from a L A TEX Source

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

Homework # You ll want to use some LaTeX editor to edit and compile your.tex files

Using Adobe Contribute 4 A guide for new website authors

Introduction to Scientific Typesetting Lesson 1: Getting Started

Index. Jennifer Harder 2017 J. Harder, Enhancing Adobe Acrobat DC Forms with JavaScript, DOI /

Documentation for colortab: Shading and coloring TEX tables, v. 1.0

L A TEX Primer. Randall R. Holmes. August 17, 2018

Adobe Acrobat 8 Professional Forms

makempy Including text as graphics is far from trivial. First it has to be typeset, and of course we want to use

Table Basics. The structure of an table

TeXnicCenter v1 Beta Frank Van Puyvlde ICT for Research K.U.Leuven

PDF Specification for IEEE Xplore (Part A-Core Requirements)

The preview Package for L A TEX Version 11.91

Part of the adjustbox bundle. Martin Scharrer Version v /04/08. Abstract

IX. Format Tips. Row & column autofit

Dvipdfm User s Manual

The auto-pst-pdf package

The widetable package

Manual. C. V. Radhakrishnan. May 16, 2002

Homework # (Latex Handout) by Laura Parkinson

Using Microsoft Excel

Form into function. Getting prepared. Tutorial. Paul Jasper

The ocgtools package

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass.

L A TEX: Online module 6

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

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

Introduction to MCS 220 and L A TEX

-Using Excel- *The columns are marked by letters, the rows by numbers. For example, A1 designates row A, column 1.

Unit 9: Excel Page( )

Absolute L A TEX Beginner

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.

Getting Started with L A TEX

PSD to Mobile UI Tutorial

Getting started with Latex

Xerox Wide Format IJP Variable Information with Xerox FreeFlow Design Express Solution Guide

Latex Manually Set Font Size For Tables

Creating and ing ERC Forms

Acrobat PDF from TEX

SlickEdit Gadgets. SlickEdit Gadgets

1 Introduction to Using Excel Spreadsheets

Help with PDF Files Is there a way someone else can do this for me? What Software Do I Need to Create PDF Files?

Lesson Skill Matrix Skill Exam Objective Objective Number

Spreadsheet Software

User Guide. Web Intelligence Rich Client. Business Objects 4.1

Installing the TX/PX fonts for SWP5/pdfTeX

CSS worksheet. JMC 105 Drake University

A brief introduction to L A TEX

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

Understanding Acrobat Form Tools

Chapter 25. Build Creations with Your Photos

Compressed Images in PostScript and PDF with L A TEX HOWTO

Functions and text files

Audio is in normal text below. Timestamps are in bold to assist in finding specific topics.

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #43. Multidimensional Arrays

Lesson 5 Styles, Tables, and Frames

Use lists. Use loops. Use conditionals. Define and use functions. Create and use code modules

HarePoint Business Cards

The talk Document Class

Chapter 4 Creating Tables in a Web Site Using an External Style Sheet

Unit 21 - Creating a Navigation Bar in Macromedia Fireworks

Preparing and Submitting Electronic Files for the 2016 IEEE International Electron Devices Meeting

Style template and guidelines for SPIE Proceedings

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

What do we mean by layouts?

1 Getting started with Processing

The supertabular environment

Custom Label and Paper Sizes Guide

Manual for uoftexam.sty by Martin J. Osborne Version 1.8, October 2017

The rtsched package for L A TEX (version 1.0)

Bombardier Business Aircraft Customer Services. Technical Publications. SmartPubs Viewer 3.0 User Guide. Updated January 2013 [2013]

Guide - The limitations in screen layout using the Item Placement Tool

Using ShareLaTeX to make Trees

Meeting One. Aaron Ecay. February 2, 2011

Manual for Package pdfmarginpar

Working with Charts Stratum.Viewer 6

Advanced Reporting Tool

Preparing and Submitting Electronic Files for the IEEE International. Reliability Physics Symposium

InfoSphere goes Android Flappy Bird

How to set up a local root folder and site structure

Barchard Introduction to SPSS Marks

What you will learn 2. Converting to PDF Format 15 Converting to PS Format 16 Converting to HTML format 17 Saving and Updating documents 19

CAN I SEE TEXT MESSAGES ONLINE ATT CAN I SEE TEXT PDF WHY CAN'T I SEE THE TEXT IN A FORM UNTIL I CLICK ON THE

eps2pdf v4.0 for Windows

The dashrule package

Putting problem sheets on the Web in PDF format

IQReport Documentation

Trevor Darrell. PostScript gures are automatically scaled and positioned on the page, and the

GNU Emacs as a Front End to L A TEX

A Sample L A TEX Document

A Short L A TEX Introduction

The PD System: Integrating Programs and Documentation

Transcription:

THE UNIVERSITY OF AKRON Mathematics and Computer Science JJ Game Class D. P. Story c 2000-2001 dpstory@uakron.edu Last Revision Date: April 19, 2001 Version 2.0

Table of Contents 1 Introduction 3 2 Unpackaging the Class 3 3 Options 3 4 Designing the Game 4 4.1 Stuff for the Preamble... 4 Banners and Backgounds... 5 Game Design... 5 4.2 The Instructions... 7 4.3 The Questions... 8 5 Building the Game 8

Section 1: Introduction 3 1. Introduction The JavaScript Jeopardy Game, a.k.a., jj game, isal A TEX class file that can be used to construct a Jeopardy-like game board and the accompaning answers and questions. The jj game is capable of constructing game board for an arbitrary number of categories and an arbitrary number of question per category. There are options for the user of dvipsone (from Y&Y), dvips, pdftex and dvipdfm. There is also an option to use foils; this enables you to construct a game board that might be suitable for presentations, perhaps in the classroom. For people using using dvipsone and dvips pay particular attention to Building the Game on page 8, this section has special instructions for you. For the people who use pdftex, jj game uses the \pagecolor command to produce background colors and requires v0.03f or later of pdftex.def, which is part of the standard L A TEX command from the Graphics Bundle. I do hope there will be people out in Cyberland who will use jj game and construct some interesting games for us to enjoy. Now, I simply must get back to work. DPS 2. Unpackaging the Class To unpack the jj game.dtx, latex the installation file jj game.ins. If you use Acrobat 5.0, open the file jj game.ins in your favorite editor and change the line \def\acrobatoption{acrobativ} % Acrobativ or Acrobatv to \def\acrobatoption{acrobatv} % Acrobativ or Acrobatv then do a latex jj game.ins. When you distill with the Acrobat Distiller 5.0, the document-level JavaScripts needed to operate this game are automatically inserted when the game is opened in Acrobat for the first time. See the section Building the Game on page 8 for more details. 3. Options As if this writing, there are seven options. \documentclass[dvipsone]{jj_game} The dvi-to-ps converter by Y&Y. In this case, the Adobe Acrobat Distiller must be used to convert from Postscript to PDF.

Section 4: Designing the Game 4 \documentclass[dvips]{jj_game} The dvi-to-ps converter that comes with many TEX systems. The Adobe Acrobat Distiller must be used to convert from Postscript to PDF. \documentclass[pdftex]{jj_game} The tex-to-pdf converter. The distiller is not needed in this case. \documentclass[dvipdfm]{jj_game} The dvi-to-pdf converter. The distiller is not needed in this case. \documentclass[dvips,foils]{jj_game} This class seem to work well with jj game. There is a switch, \iffoils, that you can use if you what to switch between a formatting that does not use foils, and foils. \documentclass[pdftex,debug]{jj_game} In the developmental stage, you can use the debug option that will give you more information in the log about what is going on. \documentclass[dvipsone,double]{jj_game} The face values of all cells are doubled. (Double JavaScript Jeopardy!) \documentclass[dvipdfm,final]{jj_game} After you have completed your jj game, you can, optionally, build it one more time with the final option. This option removes the menu, the toobar, the GUI interface of the Acrobat Viewer; all that is left is your game. You can also set your favorite driver as the default. Just create a file named jj game.cfg and place in it the command \ExecuteOptions{dvipsone} (This sets dvipsone as the default driver.) 4. Designing the Game The following sections outline out to design the game. If you don t specifiy a particular part of the design of the game, then a default value will be substituted. The sample file jj test.tex pretty represents prototype game that you can modify. 4.1. Stuff for the Preamble There is potentially a lot stuff that goes into the design of the game. Again, all have default values, but there are some required design parameters.

Section 4: Designing the Game 5 Banners and Backgounds On the first page, where the instructions are usually placed is a horizontal rule with a game title in it. The text and colors are controlled by the following macros and values. All the following can be redefined. % Title of the game, that appears in the opening banner \titlebanner{the \TeX\ Game!} % required! % color for background and text on running banner \definecolor{fillbanner}{rgb}{0.5,0,0.5} \definecolor{textbanner}{rgb}{1,1,0} % yellow \renewcommand\bannertextfont{\sffamily\huge} % color text the categories appear in game board \definecolor{textboard}{rgb}{1,1,0} % yellow % background colors for different categories of pages \definecolor{fillinstructions}{rgb}{0.98,0.92,0.73} \definecolor{fillgameboard}{rgb}{1,0.8,0.6} \definecolor{fillquestions}{rgb}{1,0.8,0.6} % Background color for the cells, after a cell is chosen \definecolor{fillcells}{rgb}{0.98,0.92,0.73} Game Design \GameDesign: In order to design a game you must have categories and questions in each category. The \GameDesign is the macro that is used for this purpose. \GameDesign { Cat: \TeX, % list the categories Cat: \LaTeX, % " Cat: Classes \&~Packages, % " NumQuestions: 2, % number questions per category Goal: {3,500}, % set a goal, just for fun GoalPercentage: 0, % goal as a percentage of money CellWidth: 1in, % cell width CellHeight:.5in, % cell height ExtraWidth: 0pt, % additional width if needed ExtraHeight:.2in, % additional height if neede } The key-value pairs can appear in any order. Required Keys: The Cat and NumQuestions keys are required, though this is not enforced. The format is <key>: <value>,, there must be a space after the colon, and a comma following the value. If the value contains a comma, enclose the value in braces, as I did above with the Goal.

Section 4: Designing the Game 6 Each key, except Cat, has a default value. The values of these keys may need to be adjusted depending on the number of categories, number of questions, and font size. The value of Cat has an optional argument, you can say Cat: [\small] Classes \&~Packages, The value of the optional argument is inserted just before the Classes & Packages in the category heading of the game board. In this case, I ve reduced its size to fit into the bounding rectangle. The parmeter GoalPercentage needs comment. You can set the goal by setting the percentage of the total money in the game; i.e., GoalPercentage: 90, sets the goal to 90% of the total money. If GoalPercentage is present in the \GameDesign, and its value differs from the default value of zero (0), then the value of the Goal parameter, if present, is discarded, and a new goal is calculated based on the percentage of the total money, which is a function of the number of categories, the number of questions per category, and whether the double option has been invoked. The jj game takes these entries and computes the \paperheight, \paperwidth, \textheight and \paperwidth. I ve used some code from Radhakrishnan C V s pdfscreen. In that regard, you can use \marginsize to set the margins around the page, the default is \marginsize{.25in}{.25in}{.25in}{.25in} There is a hidden banner above the game board that is revealed when the game is over (all questions are answered) and the goal, set in \GameDesign, is met. The \APHidden controls the appearance of this hidden banner. \APHidden { Champion: You are a Champion!,% this text appears if goal met Font: TiRo, Size: 20, TextColor: 0 0 1, BorderColor: 0 0 0, FillColor: 0.98 0.92 0.73, } \APDollar: The \DesignGame just sets basic parameters, it does nothing towards defining color. For that, I have the \APDollar macro: \APDollar { Font: TiRo, % font to be use for the dollar amounts

Section 4: Designing the Game 7 } Size: 20, TextColor: 0 0 1, BorderColor: 0 0 0, FillColor: 1.35 1, % size of font % color of text of dollar % color of border % the fill color for the cell face The above are all the defaults. the \APDollar macro does not have to appear, unless you want to change one of the defaults. For example, you might want to say \APDollar{Size: 30}, in the case of the foils option. \APRight and \APWrong: Under the face of the cells are two hidden text fields, one for a Right answer, one for a Wrong answer. The two macros \APRight and \APWrong have the same key-value arguments. \APRight{ Font: TiRo, Size: 20, TextColor: 0 0 1, Message: Right!} \APWrong{ Font: TiRo, Size: 20, TextColor: 1 0 0, Message: Wrong!} \APScore: There is a text field to keep track of the score. The following macro designs the score board. \APScore{ Font: TiRo, Size: 20, TextColor: 0 0 1, BorderColor: 0 0 0, FillColor: 0.98 0.92 0.73, CellHeight: \the\cellheight, % default same as cells CellWidth: \the\cellwidth, % default same as cells AutoPlacement: true, % auto placement of score Score: "", % score text Currency: "$", % currency } Then AutoPlacement is true, the \ScoreBoard is centered directly under the game board. If false, then you have to provide a placement for the \ScoreBoard. Use the \PlaceScoreBoard macro: \PlaceScoreBoard{\vfill\hspace{\rulewidth}\hspace{\extraWidth}% \medskip\scoreboard} This places the score board at the bottom of the page, aligned with the left edge of the game board. 4.2. The Instructions The first page of the game is the instructions. Place the instructions in the instructions environment.

Section 5: Building the Game 8 \begin{instructions} <instructions go here>... <perhaps a graphic as well> \end{instructions} The \end{instructions} ends the page, and inserts the game board on the next page. 4.3. The Questions Following the instructions environment comes the question and multiple choice alternatives. For this, there is a Category environment, within which is placed a series of Question environments. The number of questions per category must be the same as declared as the value of NumQuestions in the \GameDesign macro. The format is as follows: \begin{category}{<category_name>} \begin{question}[<num_of_columns>] <Text of the question> \Ans0... % a wrong answer \Ans1... % the right answer \Ans0... % another wrong answer \end{question} \end{category}...... The number of categories must be the same as was listed in macro \GameDesign. The <category_name> is required; it is used to send messages to the log about whether you are listing the categories in the correct order. It doesn t have to be exactly the same as was defined in \GameDesign. The macro \Ans typesets the answers, it takes one argument. An argument of 0, e.g., \An0, means that answer is wrong, an argument of 1, e.g., \An1, means the answer is the correct one. The default behavior is a column listing of the answers. You can have a tabular format by specifying an optional number in the brackets, <num_of_columns>. And that s all there is to it! 5. Building the Game For people using pdftex or dvipdfm, there is no special processing. Just pdflatex-it or dvipdfm-it, and you are ready to play!

Section 5: Building the Game 9 For dvipsone and dvips, some additional steps are necessary. The jj game class uses Document Level JavaScripts to control the game as it progresses. For dvipsone and dvips, the Document Level JavaScripts need to be inserted after distillation. The method of insertion depends on the version of Acrobat used. For users of Acrobat 5.0, the document-level JavaScript is automatically inserted when Acrobat is opened for first time, provided the.pdf was saved back into the same folder as the source file. (It is in this folder that TEX has written the DLJS in the form of an FDF file.) Note: You must have unpacked jj game with the Acrobatv option, see the section entitled Unpackaging the Class on page 3 for a discussion. Finally, do a Save As... from Acrobat to save the DLJS that have just been inserted. You are now ready to play! For users of Acrobat 4.0 4.05, the file jjg dljs.pdf, which comes with the distribution, can be used to introduce the JavaScripts. This file contains the JavaScripts in it already; all you have to do is to transfer them to the newly build game. Here are the steps for easily doing that: 1. The newly distilled game is open in Acrobat. Click on Document > Insert Pages, browse, and choose the PDF file jjg dljs.pdf. 2. The file is now inserted. Now, click on Document > Delete Pages and delete the page you just inserted! 3. Do a Save As, reload the file, and you re ready to play! When the file is inserted, its Document Level JavaScripts become part of the combined file. When you delete that page again, the scripts stay. This is an easy way of insert scripts at the document level.