Setting up Gummi to use TeX Live & other external packages

I’ve been delving into Gummi recently. As a LaTeX editor, it’s simple and clean, and I appreciate that it balances the directness of the commands (win!) with instant visual reassurance of the output format (double win!).

“Simple”, though, means that it isn’t entirely obvious how to get Gummi to use additional external packages (like, say, geometry, which is included in texlive-latex-base from the Ubuntu Software Center — that package worked for me only when building the file from the command line).  Since people have asked about getting Gummi to play nice with other style and class files but haven’t gotten responses (like here and here), I thought I’d post my solution.

The short answer: To use other packages with Gummi, you need to let Gummi know where those materials are.  Enter the magical symbolic link.

With details:

  1. Figure out where your Gummi configuration files are.  (For me, they live at /home/pt/.config/gummi/.  Yes, that’s a hidden folder.  If you’re working from the GUI file browser,  CTRL+H will toggle hidden visibility.)

  2. Figure out where you installed the extra packages, from TeX Live or whatever else.  (For me, they live at /usr/share/texmf-texlive/.)

  3. Create a symbolic link within the Gummi configuration folder to the TeXLive files:

    cd ~/.config/gummi  
    ln -s /usr/share/texmf-texlive
    

Experimentation suggests that pointing Gummi at the top-level directory is sufficient for access to all of the subfolders.  If it fits the structure of your machine better, you could also copy or move the files — but I’d stick with a symbolic link unless you have a good plan in mind.

This solution is the result of a bit of experimentation based on guesses about how Gummi might be coded.  I am not a Gummi developer, and I’d welcome insights from anyone who knows the intended design or codebase.

Screenshot of Gummi -- LaTeX code on left, preview on right

Screenshot of Gummi in Action

Introduction to ASL Linguistics

During the discussion we focused on introducing different non-voiced communication forms and on linguistic anthropology/linguistic creativity.  We postponed theoretical linguistics until another time (in which we did some experiential learning on morphology). This page consists of a set of links, prepared videos, and notes designed to support real-time interaction with students at the linguistics club at Montgomery Blair High School.

The big take-away is that American Sign Language is not “English on the hands”.  ASL is independent from English both in grammar and linguistic culture.

Introduction

  • Caveats for posterity: I’m hearing, I don’t possess native-like fluency in ASL, and I don’t have an advanced degree in this; I do have general and ASL linguistic training, I read widely, and I’m more or less aware of what I don’t know
  • What are some ways deaf people communicate? [YouTube]
  • Compare ASL structure [.avi | .ogv | .gif] with PSE structure [.avi | .ogv | .gif] with English structure [.txt]
  • Charts might help [fingerspelling: ASL | BSL | LSF] [cued speech]

Anthropological Linguistics

  • Big idea: Linguistic creativity
  • ABC stories [YouTube]
  • Sign jokes [King Kong, “please but”, environments, CODAs]
  • Music & poetry [YouTube]
    • Rhyme (handshape, movement path, location, non-manual markers)
    • Rhythm (movement, handedness)
    • Meter (heavy & light syllables)
  • Also, Black ASL [WaPo | HuffPost | YouTube (uncaptioned but 5:37 has a chart)]

Theoretical Linguistics [postponed]

  • Big idea: Spatial grammar
  • Basic structure
    • English consonants have place and manner of articulation, plus voicing [IPA chart]
      • Place of articulation (cat/tat/pat)
      • Manner of articulation (pat/bat/mat)
    • ASL signs have five “parameters”
      • Handshape (think/know) *
      • Location (summer/dry) *
      • Palm orientation (sock/star)
      • Movement (sit/chair) *
      • Nonmanual markers (late/not yet)
  • The movement piece is more complicated (Christian/Congress, one-handed children/die) –> movement-hold theory
    • M (always)
    • H (color, study)
    • M H (think, know, my, sit)
    • H M H (week, guess)
    • M H M H (Congress, flower)
    • M M M H (chair, school, paper)
    • Other structures are possible, but not any other structure (e.g., exclude H M)
  • Nonmanual markers are extremely important grammatical markers; they are frequently unrecognized by hearing people
    • Questions (yes-no/wh)
    • Rhetorical questions
    • Adjectives and adverbs (mm, th, cha, cs — more in a .doc)
    • Topicalization
  • Grammatical use of space of ASL (verb classes, classifiers, aspect, etc.)

Further Resources

  • Deaf people with linguistics training
  • ASL [language | grammar]
  • Gallaudet University [map]
    • 10th-12th grade summer ASL immersion [link]
    • Linguistics department [dept. | event blog]
    • Center for Continuing Studies teaches ASL courses for $230/credit (most classes are 3 credits) [dept.]
    • Theatre performances are captioned or voice-interpreted [link]
  • Books
    • Linguistics of American Sign Language by Valli et al. (ASL linguistics textbook)
    • Signing Naturally (ASL language textbook series)
    • The American Sign Language Handshape Dictionary by Tennant and Brown (dictionary)
    • For Hearing People Only by Moore and Levitan (deaf culture/language in context)
  • Apps
    • ASL Dictionary — 5000 signs [Android | iPhone]
    • ASL spelling game — beginner’s fingerspelling app [Android]
    • Marlee signs — phrases and words [iPhone]
  • Media
    • “Switched at Birth” (ABC Family)
    • YouTube has a variety of performances, lectures and vlogs

Linguistics and Amateur Radio

Screenshot of title slide

In noisy conditions on the airwaves, it can be hard to exchange information effectively. Rather than throwing more power or another $1000 of equipment at the problem, radio operators can often improve reception by adjusting the signal at its source: their articulatory organs. By enunciating, focusing on vowels, using recognized phonetic alphabets, and matching listeners’ expectations about pitch, amateur radio operators can effectively boost the quality of their signal.

To download the presentation in .pdf format, click on the image at right or the preceding link.

Context for Non-Hams

Relevance of Amateur Radio

Since the 1960s and 1970s, public interest in amateur radio has waned as reliable mobile communication has become available for minimal cost. Our dependence on such systems, however, has left us increasingly vulnerable to natural and man-made disasters. When the communication infrastructure is destroyed or severely overloaded (such as the 2011 Japanese earthquake and tsunami, Hurricane Katrina, the Marine Corps Marathon, and presidential inaugurations), hams continue to provide robust, decentralized communication.

Beyond practical uses, ham radio is also a hobby like any other, worthwhile for the enjoyment it brings.

“Noise” on the Air

The amateur radio bands do not always provide a perfect channel for communication. In especially bad conditions, trying to understand a message can be akin to listening to shouting from half a block away, on a windy day with city traffic. Although some atmospheric and noise conditions are uncontrollable, amateur radio operators do our best to produce cleanly intelligible signals, and we hone the skills required to understand content despite bad conditions.

Calculating and visualizing standard deviations in two dimensions

The spread of points in one dimension is easy to calculate and to visualize, but the spread of points in two (or more) dimensions is less simple. Instead of familiar error bars, standard deviational ellipses (SDEs) represent the standard deviation along both axes simultaneously. The result is similar to a contour line that traces the edge of one standard deviation, as on a topographic map or an isochore map. The calculation of a standard deviational ellipse can be tricky, because the axes along which the ellipse falls may be rotated from the original source axes.

Figure 4.14 from CrimeStat III -- points representing locations of car thefts in Baltimore, with an ellipse indicating the highest density of thefts.
The standard deviational ellipse algorithm is described here and here, and it was implemented in aspace, an R library for geographic visualization work developed by Randy Bui, Ron N. Buliung, and Tarmo K. Remmel. The SDEs are calculated by calc_sde and are visualized by plot_sde. (The people who are most interested in multi-dimensional standard deviations seem to be geographers visualizing point data; an example of visualizing auto theft in Baltimore appears at right.)

The aspace SDE implementation is a very useful implementation.  I’m going to talk about implementing three extensions to it:

  • Giving better example code for how to use the package.
  • Fixing a bug in which the ellipse is often incorrectly rotated by 90 degrees. [This has been fixed by the authors in aspace 3.2, following contact from me.]
  • Adding a feature that shows more than one standard deviations.

This post addresses each in turn.

More Thorough Example Usage Code for aspace::plot_sde

plot_sde doesn’t take the result of calc_sde as a parameter, and its documentation doesn’t indicate how R knows which SDE to draw. To draw an SDE, run plot_sde immediately after calc_sde. R uses an implicit object hidden from the user to pass data. A better usage example is:

# Example aspace::calc_sde and aspace::plot_sde Code
library(aspace)
# Create the data and rotate it
x = rnorm(100, mean = 10, sd=2)
y = rnorm(100, mean = 10, sd=4)
t = -pi/4 # Illustrates normal case (rotated to right from vertical)
#t = pi/4 # Illustrates the bug described below (rotated to left from vertical)
transmat = matrix(c(cos(t),-sin(t),sin(t),cos(t)),nrow=2,byrow=TRUE)
pts = t(transmat %*% t(cbind(x,y)))
# Create the plot but don't show the markers
plot(pts, xlab="", ylab="", asp=1, axes=FALSE, main="Sample Data", type="n")
# Calculate and plot the first standard deviational ellipse on the existing plot
calc_sde(id=1,points=pts);
plot_sde(plotnew=FALSE, plotcentre=FALSE, centre.col="red",
         centre.pch="1", sde.col="red",sde.lwd=1,titletxt="",
		 plotpoints=TRUE,points.col="black")
# Label the centroid, explicitly using the hidden r.SDE object that was used in plot_sde
text(r.SDE$CENTRE.x, r.SDE$CENTRE.y, "+", col="red")

The above code will plot the data without axes, layering the SDE ellipse on top of a plot that does not display data markers (as illustrated at below right).

Correct Visualization Regardless of Major Axis
Original ellipse is off by 90 degrees from the scattered points; improved ellipse is not.

14 August 2012: This has been fixed by the authors in aspace 3.2 following contact from me.

The aspace 3.0 calc_sde code (accessible by typing the function name without parentheses at the R prompt) includes the lines:

if (tantheta < 0) {
	theta <- 90 - atan_d(abs(tantheta))
} else {
	theta <- atan_d(tantheta)
}

This code seems to aim to ensure that theta is a positive number — but the first line doesn’t ensure that. Instead it causes negative rotations to end up at 90 degrees to where they should be (as in the illustration at right). Instead that first if-clause could be:

if (tantheta < 0) {
	theta <- 180 - atan_d(abs(tantheta))
} else {
	theta <- atan_d(tantheta)
}

This code is one of multiple options that fixes the off-by-90-degrees issue.

Display of Multiple Standard Deviations

The aspace 3.0 calc_sde code only will only trace an ellipse of one standard deviation in each direction. To change this, add a multiplicative factor to sigmax and sigmay immediately before (or immediately after) the following lines:

if (sigmax > sigmay) {
	Major <- "SigmaX"
	Minor <- "SigmaY"
}
else {
	Major <- "SigmaY"
	Minor <- "SigmaX"
}

For instance, to calculate (and therefore plot) two standard deviations around the centroid, add in the lines:

sigmax=sigmax*2
sigmay=sigmay*2

These lines double the length of the single-standard-deviation major and minor axes.


Updated 2012-08-14.

Exporting standalone batch runs in Repast Simphony: start_model.sh

As discussed in Exporting standalone batch runs, Christof Zellweger developed a .sh file for Repast that will run in “batch mode” on non-development Mac and *nix machines. That file and his comments appear below. (I’ve also posted a sample .bat file and a sample .command file, both contributed by others. You may get some benefit from looking at those as well.)

start_model.command, modified by Christof Zellweger in 2012 to use BatchMain

#!/bin/bash
# The version of Repast Simphony being used.
export VERSION=2.0.0
# The installed path of Repast. Quotes may be necessary if there is a space character in the path.
export REPAST="/path/to/your/repast/home/folder"
# The installed path of Eclipse. Quotes may be necessary if there is a space character in the path.
export ECLIPSE=$REPAST/eclipse
# The plugins path of Eclipse.
export PLUGINS=$ECLIPSE/plugins
export REPAST_SIMPHONY_LIB=$PLUGINS/repast.simphony.runtime_$VERSION/lib
# The Eclipse workspace containing the Repast model.
export WORKSPACE=/path/to/your/workspace/
# The name of the model. This might be case-sensitive. This is the name of your package. It should 
# be the package at the top of all your .java files and match the "package" listed in your 
# model.score file (when viewed as a text file).
export MODELNAME=
# The folder of the model. This might be case-sensitive. This is the base folder of your 
# project in the file system.
export MODELFOLDER=$WORKSPACE/
# The file containing the batch parameters. For some additional information, see Repast 
# documentation of batch parameters at http://repast.sourceforge.net/docs/reference/SIM/Batch%20Parameters.html
# and/or an example batch_params.xml file at 
# http://www.pamelatoman.net/blog/2010/08/sample-batchparamsxml/.
# The following is the usual location within your Repast workspace - change according to your location / system
export BATCHPARAMS=$MODELFOLDER/batch/batch_params.xml
# Change to the root folder of your project so that the relative paths are handled correctly
cd $MODELFOLDER
# Execute in batch mode.
java -classpath $MODELFOLDER/lib/*:$MODELFOLDER/bin:$PLUGINS/repast.simphony.scenario_$VERSION/bin:
$PLUGINS/repast.simphony.batch_$VERSION/bin:$PLUGINS/repast.simphony.runtime_$VERSION/lib/*:
$PLUGINS/repast.simphony.runtime_$VERSION/bin:$PLUGINS/repast.simphony.core_$VERSION/lib/*:
$PLUGINS/repast.simphony.core_$VERSION/bin:$PLUGINS/repast.simphony.data_$VERSION/lib/*:
$PLUGINS/repast.simphony.score.runtime_$VERSION/lib/*:$PLUGINS/repast.simphony.score.runtime_$VERSION/bin:
$PLUGINS/repast.simphony.dataLoader_$VERSION/bin:$PLUGINS/repast.simphony.data_$VERSION/bin:
$PLUGINS/repast.simphony.score_$VERSION/bin:$REPAST_SIMPHONY_LIB/saf.core.runtime.jar:
$REPAST_SIMPHONY_LIB/commons-logging-1.0.4.jar:$REPAST_SIMPHONY_LIB/groovy-all-1.5.7.jar:
$REPAST_SIMPHONY_LIB/javassist-3.7.0.GA.jar:$REPAST_SIMPHONY_LIB/jpf.jar:$REPAST_SIMPHONY_LIB/jpf-boot.jar:
$REPAST_SIMPHONY_LIB/log4j-1.2.13.jar:$REPAST_SIMPHONY_LIB/xpp3_min-1.1.4c.jar:
$REPAST_SIMPHONY_LIB/xstream-1.3.jar repast.simphony.batch.BatchMain -params $BATCHPARAMS $MODELFOLDER/$MODELNAME.rs

Christof Zellweger writes:

I’ve tested this on Mac OS X Snow Leopard 10.6.8. I didn’t have a Linux box available but seeing that OS X uses a XNU (Unix Mach/BSD hybrid) kernel, I would assume that this script runs on many *NIX platforms unchanged and if not, only small changes would be necessary.

The main difference in this script (apart from usage of the *NIX ‘export’ equivalent to Window’s ‘set’ command) was that I’ve added 2-3 search locations/directories in the classpath argument. Plus I’ve added a few comments.