Other posts related to latex

 | May 19, 2010 3:52 am

While LaTeX is a powerful way to prepare and typeset many types of publications, there are certain times when it is both more convenient and efficient to have a graphical user interface.  This is why the document processor, LyX, was created.

LyX combines many of the best characterizes of a Word Processor with the strengths of LaTeX; and the result is a program that gives you the power of semantic writing without having to laboriously climb the LaTeX learning curve.

But as wonderful as LyX might be, it isn’t perfect.

One of LyX’s biggest limitations is the relatively small number of LaTeX document classes that can be used with it.  This limitation is due to the fact that even though LyX uses LaTeX to create its final output, it isn’t able to directly read and parse LaTeX styles.  Rather, it requires a special type of file (known as a “layout”) to help translate between what a user sees on the screen and what eventually appears on the printed page.

Unfortunately, creating layout files is a bit of an arcane art; and as a result, many document classes are never adapted to work with LyX.

(For more information about how the relationship between LyX and LaTeX –including an example of how to create a custom layout from an existing document class – please see my earlier article, Customizing LyX: Create an NIH Grant Proposal Template.)

This is not something that I would like to see happen with my custom Curriculum Vitae document class, xetexCV.  I spent a great deal of time developing and debugging the document class and  as a result, I would like to see people using it, including LyX users.  As a result, in this article, I will introduce a layout file that allows you to use xetexCV from inside of LyX and I will show how LyX users can enjoy the same amenities (including an automatically generated bibliography) enjoyed by LaTeX purists.

What I will not discuss, however, are topics that I’ve written about previously.  This includes the overview of xetexCV, its use and installation; the dissection of the LaTeX code and my design choices; or a detailed set of instructions on how to automatically generate a list of references from your BibTeX database.  As some of that information is pertinent to things discussed here, you may wish to read the earlier entries in this series prior to proceeding.

Show me more… »

 | December 2, 2009 11:19 am

Publications are the currency of ideas.  Through them the experts, thinkers and dreamers of this world can share their thoughts and insights.  A good publication is not only influential, but it’s even capable of shifting the course of a whole society, as Martin Luther King demonstrated with his “Letter from a Birmingham Jail”.

Since publications are so important to the dissemination of knowledge, there is a rather high expectation that an academic author should publish prolifically.  The mantra “Publish or Perish” is not just a clever quip, but a very serious way of life.

It is ironic, then, that the most prolific of academic writers can suffer from a surprising problem: it can be very difficult to keep track of all of their work.  Yet, an up to date CV is very important.  After all, publishing your work in influential journals is an important first step toward establishing tenure!

Members of a research team or those who collaborate outside of their institution experience this same problem, only more so.  Such a person may work on many projects at once, but only have direct responsibility for one or two of them.  This places the researcher in the unenviable position of trying to track the work of others.  This situation becomes even more complicated if the collaborator refuses to play by the rules of common decency.

It would be nice, for example, if the primary author of a publication would notify the co-authors of its progress, or when it has been submitted.  But … that doesn’t always happen.  Academic researchers are busy people and soliciting feedback from all of your collaborators can be difficult … and there is a tendency for difficult things to go undone.  Thus, if you don’t follow what your team mates are working on, it is quite possible that an abstract might have gotten submitted while your back was turned.

To stay on top of the “delightful chaos”, you need to have some kind of system.  Personally, I keep my list of projects and publications in three places. The first (and perhaps most important) is the hand-written list in my experimental notebook. Any time I hear about a new project, it gets added to this list. I keep track of what I’ve contributed, what papers or abstracts have been created from the data, and what their status is. When I know that an abstract or paper has been accepted, I then create an entry for the item in my bibliography manager. Once in the bibliography manager, I can cite the reference in other documents such as proposals or related papers.

About once a year, I go through the tedious process of updating my CV. This typically involves manually sorting through both my project list and my reference database and account for new items or reconcile differences. Every time I do this, it’s painful; and because I’ve historically formatted the reference list by hand, it’s not uncommon for a typo to sneak its way in or for an author to accidentally get left off of a citation. These mistakes are never intentional, but they do happen.

When I find such an error in the reference database, I fix it. But since I often import these references from websites, the errors tend to be few and far between. Moreover, my reference database is something that I use every day; as a result, it gets a lot of scrutiny. My CV, on the other hand, gets updated much less frequently and errors tend to persist longer.

For a very long time, I’ve wanted to automate the process. Instead of keeping three separate lists – active projects, reference database, and CV – I’d prefer to keep only one (or two). But I’ve never found a really satisfactory way of doing so.  Or at least I hadn’t found a system until quite recently.

In my last review of different ways to typeset a CV, I came across an interesting article by Dario Taraborelli.  In it, he described how to create a CV based on the standard “article” document class.  It was well designed, elegant, simple and attractive.  From his work, I created the xetexCV document class.  Additional research turned up an add-on module that makes it convenient to automatically generate a list of publications.  So, for the first time  in a great while, I have finally found a way to automatically generate a publications list in a simple and automated manner.  In this article, I will demonstrate how that is done.

Show me more… »

 | November 30, 2009 2:54 pm

Many first-time users of LaTeX often mistakenly look at the language as a a type of glorified word processing software – albeit a particularly complicated one.  While such an analogy may be apt in helping new users become acclimatized to the language, it suffers from a rather nasty problem: LaTeX isn’t a word processor.

If anything, LaTeX shares more in common with a programming languages than any type of application.  In fact, the document processing system is really nothing more than a bunch of re-usable pieces of programming called macros.  Everything is a macro.  That includes the commands that every user is familiar with: \title{}, \section{}, \subsection{}; in addition to the internal formatting commands that allows LaTeX to function.  (Most of the macros were originally created or packaged by Leslie Lamport as a way of making TeX – the typesetting system created by Donald Knuth – easier to work with.)

This has some rather practical consequence; because everything in LaTeX is a macro, it is far more extensible than a word processor could ever hope to be.  If you require a feature that doesn’t yet exist, it typically isn’t all that difficult to add it.  And when your extension is packaged inside a style or class, you can use those customizations in anything that you want to write.

But though creating macros isn’t particularly complicated, it is a different beast than just using the stock macros for writing.  This is not surprising, the craft of design is inherently different than the craft of writing.  There are different conventions to follow and different topics to obsess about.  In the first article of this series, I introduced the xetexCV document class, which is one example of where I decided to don the designer hat.

But before you get too far down the road of customizing and extending, there are a some important things that you need to know.  These include the general conventions used when working with document classes, their internal anatomy, an understanding of how macros are created, and how to handle formatting and layout challenges.  In this article, I will look at these issues more in detail, particularly as they pertain to xetexCV.  In the process of reviewing these topics, I will also explain some of my design choices.

Show me more… »

 | November 25, 2009 12:02 am

Very few documents are more personal than a curriculum vitae (CV).  A CV lists a person’s educational history, who they’ve worked for and what they’ve accomplished.  Moreover, a CV is frequently used to judge a person’s inherent worth and value (or at least exploitability).  A quality curiculum vitae matters, a lot.

For that reason, a CV not only needs to include all the pertinent information of a person’s life, but it also needs to look good. An attractive CV with good spacing and contrast leaves a positive impression and makes it easier to find information.  When laid out correctly, a reviewer might just find themselves scouring past accomplishments for interesting tidbits: “I didn’t realize that this applicant organized a lecture series with Patch Adams and other notables, that’s interesting!”

Show me more… »

 | November 14, 2009 5:00 pm

Imagine for a minute that you’re writing a book or technical manual.  Let’s say it’s a book on technology, maybe the open source tools used for scientific writing (to randomly pick an example).  As you write this book, you realize that you need some way to cue the reader into different parts of the text.

For instance, you might want all definitions to appear in bolded text so that a reader pick out key terms quickly.  Or you might want code examples to appear in a different font than the regular text, again, so they’re easy to find.  What’s the best way to do this?

Sure, you could just bold the definitions, or manually change the font for the code examples.  But that’s painful!  Changing typeface and size every time that you have a section of code will eventually result in a lot of lost time.  Moreover, you might make a mistake, which destroys your consistency and makes your writing look unprofessional.  There must be a better way!

Thankfully, there is.  It’s through the consistent use of styles.

Show me more… »

 | November 2, 2009 6:21 pm

LyX is a wonderful writing program.  It’s easy to use and produces beautifully typeset output.  More importantly, though, it lets an author focus on the content and structure of his writing; rather than the formatting.

It isn’t so easy to customize, though; and this limits its usefulness in a big way.  What if you need to create a new layout or take advantage of one of the thousands of specialized  LaTeX styles?  How, exactly, do you go about doing that?

That’s why this article was written.  Recently, I was asked to help with a National Institutes of Health (NIH) R21 grant proposal.  After some talk amongst the different investigators, it was decided that we would use LaTeX and LyX to draft it.  Unfortunately, we hit a rather substantial hurdle early in the process:  LyX doesn’t have an NIH grant template.

After additional debate, we decided to proceed with LyX anyway.  But in the process, I found myself saddled with an additional job.  In addition to responsibilities as research flunky and copy editor, I was tasked with creating a LyX and LaTeX template for our NIH grant.  This article will summarize the steps I took and describe how to create a custom template using an available style on CTAN.


Note: All of the files in this tutorial can downloaded here (.zip).

Show me more… »