Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

LaTeX question: Can you show a simple example of creating your own LaTeX command?

Here is an example LaTeX file where I'm experimenting with various newcommand and renewcommand capabilities. The file actually contains six LaTeX examples, and in each step I add one more LaTeX feature that is a little harder than the previous step.

The LaTeX "html" package (html.sty) can be very useful for the times that you want to conditionally controlling the output in LaTeX documents, but very specifically, when you want one set of output for normal Latex processing (LaTeX PDF output), and another set of output for LaTeX HTML processing.

Here's a very simple example of how you can use this LaTeX HTML package to conditionally control what is output by the LaTeX processor:

The "versions" package (versions.sty) can be very useful in conditionally controlling your output in LaTeX PDF and HTML documents.

LaTeX conditional output

Here's a very simple example of how you can use this package to conditionally control what is output by the LaTeX processor:

Here's a link to an "FTP applet" (named "U-Upload") a company is selling. The applet can serve as an FTP client for your customers. This may help solve a problem that we have with an existing client.

I also created a quick tip that shows how to create multine comments in LaTeX documents. I found out how to do that today, and it's extremely useful.

 

I often have a need to create LaTeX comments that span multiple lines. Of course you can create single line comments in LaTeX using the percent character like this:

% this is a comment

But I want to be able to create LaTeX comments that go on for multiple lines. Fortunately, if you know that you're supposed to include the verbatim package, this is pretty easy.

LaTeX multiline comments example

The first step is to include the verbatim package, like this:

If you've never heard of the "Golden Ratio" and how it applies to user interface design, you may want to search it up at google.

Here's one link where the author refers to it as the "Golden section ratio (phi)". It doesn't get into the UI part, but has a nice history with references to Euclid, pyramids, and Fibonacci numbers.

 

Yawn ... nothing major so far today. I spent a long night last night working on a manuscript for something totally not related to computing, so I'm pumping in the coffee this morning.

Have you ever had one of those mind-blowing experiences where you are really, really struggling with a problem ... struggling for hours, days, or weeks, and then suddenly - bam! - you find exactly what you need? I had that experience this morning, and it was truly awesome.

Last week during a meeting a user at a customer site asked why it wasn't easy to "copy" behavior from one part of an application to another. My answer to this is so general that I thought I would include it here. Here's a link to an explanation of why some changes to application behavior aren't as easy as a user might think.

(From an email I sent to one of my clients regarding our software project.)

Last week we left the meeting with an open item to have [CUSTOMER_NAME] IT staff work w/ [DEVELOPER_NAME] to understand why some programming changes are easy, and some are not. More specifically, I think the question pertained to times when an application works one way in one part of the application, and then a user would like to see that same behavior in another part of the application. The question was something to the effect of "Why isn't this easy?"

I've been working with the ABLE Toolkit from IBM for a few months now, in particular trying to use it as a rules engine for my home grown anti-spam software. I'm using this experience for a paper I'm writing for the upcoming Borland Developers Conference.

Here are three JavaScript examples I don't want to forget. When you click on the links below I'm opening three different types of JavaScript dialogs, specifically an Alert, a Confirm, and a Prompt dialog.

The CSS Zen Garden is a great example of what can be done using style sheet magic. They take the same content, and let you view it in at least eight different designs. Of course, having a good artistic touch doesn't hurt either. :)

Here's a n example Linux shell script (Bourne shell to be specific) that I use to send a list of directories to one of our invoicers. She uses this list as part of a cross-checking process to make sure she bills each one of our customers who have a directory allocated to them. The list is sent to her automatically from a Linux crontab entry I created for her.

Without any further ado, here is the Linux shell script that sends the email. (Note that although I keep writing "Linux mail", this should also work on other Unix systems.)

It's funny in life how you don't hear about something, or know about something, and then it comes up over and over again in unrelated situtations. The "Wonderlic test" is like that for me. I'd never heard it until three recent unrelated conversations.

My obsessive use of LaTeX continues. Here's a link to a sed script I'm creating to convert HTML to LaTeX.

I actually have a reason to do this. During a requirements phase I'm doing a lot of work with HTML prototypes, but the actual specification is being created using LaTeX, and I want to incorporate the HTML prototypes in the LaTeX document. Hence this conversion effort. I know that it can never fully succeed, but I think I'll be pretty happy with 90-95% success here.

 

The crazy sed script below is my first attempt at a script that will convert as much HTML as possible to LaTeX. For my purposes I'm mostly interested in tables, lists, buttons, and comboboxes, but I included a few other things as well.

This is in an extremely experimental state, and is included here as much for backup purposes and sharing as anything else.

Here's how you run the sed script on an HTML file named test.html:

sed -f html2latex.sed test.html > test.tex

That being said, here's the current source code for the html2latex.sed file:

Here's a link to a cool "Green plant hyperbolic tree demo". Don't give up on it too quick. If you start exploring the tree, especially by following the Moniliformopses path, you'll start to see some very interesting power here. I'm looking for a new menu/navigation paradigm, and a co-worker sent me down this road.

In other news, here's a recent conversation between me and a Support Guy ("SG" for short):

Over the weekend I saw that I'm on Borland's speaking schedule for their annual conference, BorCon 2004. I guess I better get to work on my presentations. :) Actually, I'm ready to go. I'm set to give one talk on Java Performance Tuning and another on Function Point technology. Giddyup.

I haven't frequented it before, but the Java & Internet Glossary at mindprod looks pretty good.

 

I guess it's pretty serious when the Department of Homeland Security says "Don't use Internet Explorer":