Other posts related to lyx

 | March 8, 2012 12:15 am

For many writers, the act of writing (or placing one word after another) is synonymous with the tool that they use to do it. There’s a reason why writers feel so strongly about their moleskin notebooks, fountain pens, and computer software. I’m no different than any other writer. I have my preferred tools, and I love them dearly. They help to focus on my ideas and craft prose that I can be proud of.

When writing on a computer, the tool of choice for many writers (dare I say most?) is Microsoft Word. It’s everywhere and everyone has used it. It comes preinstalled on most computers and is a de-facto standard for exchanging written material with others.

Unfortunately, Word is not part of my preferred toolset. I prefer to write using LyX and an add-on I’ve written for it called LyX-Outline. But while I love my writing program, it makes it difficult to collaborate with other writers who use Word, as LyX doesn’t have a straightforward way to directly import Word files.

This isn’t a new problem and I’ve written about it before. I’ve even proposed a solutions. But while that solution was a good fit for me, it isn’t something that I would recommend to others.

For starters, it required a great deal of software to be installed. You needed a program to convert Microsoft Word documents to Open Office documents. You then had to use a second utility to convert it to HTML or LaTeX. After that, you used to a third utility to clean it up and import the LaTeX code into LyX. Three distinct steps, with a lot of places where things could go wrong.

Over the past few months, I’ve found that I need a better way, a tool that can directly import a Word document and cleanly translate its content. So, I decided to create one.


Show me more… »

 | November 29, 2011 8:34 pm

Sometimes it’s important to be extremely fussy about otherwise inconsequential things. There’s a reason why people fight over the proper pronunciation of már ‘habitation in Quenya (the m takes on an mb sound), pirates versus ninjas, and the proper placement of footnotes. It’s not that any of these particularly matter, but when pronounced, understood, or typeset correctly, such miscellanea greatly enrich the world.

For months, I’ve been distressed about how LaTeX handles footnotes. (Which, to be clear, is much better than how Word handles them.) Notes are used for subordinate details, which provide additional information, insight, and wit. In that role, they provide an important supplement to the main text.

Depending on which type of note you choose to use – foot, end, or side – there are certain rules which govern how they should be typeset. Robert Bringhurst, author of “The Elements of Typographic Style” and the authority on book typography lays it out pretty well:

Footnotes are the very emblem of fussiness, but they have their uses. If they are short and infrequent, they can be made economical of space, easy to find when wanted, and, when not wanted, easy to ignore …

In the main text, superscript numbers are used to indicate notes because superscript numbers minimize interruption. They are typographic asides: small because that is an expression of relative importance, and raised for two reasons: to keep them out of the flow of the main text, and to make them easier to find. In the note itself, the number is not an aside, but a target. Therefore, the number in the note should be full size.1


Unfortunately, this isn’t how LaTeX does it. Instead of having a superscript in the text and a full sized numeral in the notes, it uses superscript for both.2 Not only is it wrong (as far as anything can be wrong in a war of opinions), but it’s really hard to change. Most of the document classes only give you one or two options for the footnotes, and they’re not generally any better than the default. Nor does the heavy of all footnote packages, footmisc, provide a fix. Which means, if you want to adjust the way that the number appears, you have to hack the class at a lower level. (Sigh.)

Unless, you’re using memoir, that is.

It turns out that memoir provides hooks to customize everything about the footnotes. This includes the style, the size of the font, and … the numerical label. (If you’d like, you can even use symbols.) The code below will give you properly formatted references:

  • superscript in the text
  • full sized numeral in the note
  • numeral out-dented into the margin by 1 em
  • note text typeset left flush


The \footmarkstyle macro is used to remove the superscript, \footmarkwidth is the size of the box containing the note label, \footmarksep is how much to offset the numeral from the text.


  1. The footnote is flagged by a superscript in the text, but the note itself is introduced by an outdented figure of the same size for the text of the note. (Taken from “The Elements of Style,” page 69.)

2 Which is, frankly, unsightly and distracting.

 | March 28, 2011 4:57 pm

kde-iconNext Monday, I’m going to be giving a talk entitled “Writing and Publishing With Open Source Tools” at Camp KDE, the annual KDE conference for North America. For those interested in attending, the talk happens at 12:15 pm at the Hotel Kabuki, in San Francisco.

I’m really excited about the talk and I think it’s going to be excellent. (I know, having high expectations for your own performance is the route to obscurity, disappointment, and insanity.) If you live in the bay area, or are going to be near San Francisco next Monday and Tuesday, please consider coming.

Note: While I think you should come to hear me, you might also be interested in the conference as a whole. There are going to be a number of interesting talks that cover KDE developments and core technologies.

I’m particularly excited to hear about what KOffice/Calligra is up to. The abstract talks about “Office Engines” and how KOffice/Caligra can be used to build custom applications. I’m wondering if the technology might be adapted for a mobile project I’m working on. The talks on QtWebKit and the Qt Graphics tools also look neat.

One of the reasons why I’m so excited about my talk is that it brings developments with the book full circle. I first started writing “Writing With Open Source Tools” due to a request for proposals  launched by KDE nearly two years ago. Now, I’m going back to KDE to talk about the (nearly) finished project.

I’m also going talk on other developments I consider timely. For example:

  • How open source publishing tools can be used to target print, web, and eBook platforms from a single source file.
  • How editors, writers, designers, and production people can work together in a seamless, collaborative manner.
  • The strengths of an open approach and where things stand to improve. (Especially for writers and designers.)

While there will be motifs common to the Salt Lake Linux User’s group presentation, most of it is exciting and new. (Which also means untried and untested. So, if it goes well, you can expect to be enlightened. If it goes poorly, expect to be entertained. Either way, it should be a good time.) Since I haven’t quite finished the presentation, it’s also adaptable. If there is anything specific you’d like to see covered, let me know in the comments and I will try to oblige.

Show me more… »

 | March 26, 2011 10:15 pm

Though it’s not really related to my work, one of my side interests is is the workflow of writers. I’m fascinated by where ideas come from, the tools we use to corral them, and how great thinkers create. While a portion of that interest derives from a practical desire to emulate their techniques, I’m also very curious about the underlying ecosystem of success, creativity, and innovation.

As I’ve traipsed across the ideas landscape and meandered the moors of their implementation, there is one lesson that rears its head over and over: great success – whether intellectual or commercial – turns on the hinges of small details. Steve Jobs and his iPhone, for example, weren’t successful because iPhone was new and innovative – in most meanings of the word, it wasn’t – but because it superbly implemented a core set of powerful features. It, in effect, got all of the important things right.

While I can (and will actually, it’s part of the promotional plan for the book) write a whole blog post on this idea, I wanted to talk briefly about one example in a Lifehack post. (This is mostly because I stumbled across it the other day and have found it to be brilliantly useful.) Specifically:

What is the best way to structure margin notes and comments in a book or report?

Show me more… »

 | September 28, 2010 2:26 pm

Note: The normal programming of the website is still temporarily on hold in an effort to finish the Open Source Writing book.  I fully intend to pick things up very soon, but I must first send a finished draft to my editor/publisher.  They’ve been very patient and I’ve been irresponsible.

While I am trying to work in seclusion (or at least a reasonable approximation thereof) in order to finish the Open Source Writing Book, I put together a layout that I wanted to share.  (Mostly because I liked it and thought it cool.)

It covers the typographical niceties that distinguish a typesetting system from a traditional Word Processor and will appear in the “Writing and Editing” chapter of the book as a double page spread.  (In this layout, the material appears as a single, long-form poster.)  I’d love to hear people’s comments, thoughts or suggestions.  Particularly if there are any additional elements that I missed and you think might be included.

You can download a PDF version here.  Many thanks to Dario Taraborelli for creating his wonderful essay, the Beauty of LaTeX, from which this layout borrows heavily.

The poster is released under a Creative Commons Attribution Share and Share Alike license.  Copyright 2010, Rob Oakes.  Some Rights Reserved.

Typographical Detail

 | August 19, 2010 11:14 pm

Yesterday evening, I gave a presentation to the local Linux User’s Group about how to do research, write, and publish stuff using Linux.  In particular, I tried to provide a detailed summary (oxymoron?) about how many (excellent) open source tools can work together.

I think it went acceptably well.  Which mostly means that there were no death threats and few angry complaints.

Actually, that’s not really true.  Everyone was uniformly wonderful, understanding, helpful and gracious.  People asked great questions and made insightful comments.  It was wonderful a way to spend the evening.

As part of the meeting, I promised that I would share my slides and (rudimentary) speaking notes.  Thus,  as promised, you will find both in the image gallery below.  The speaking notes have been incorporated into the slideshow and can be accessed by clicking on the slide that interests you.

(If you would a PDF version of the slides, you can download those here, sans speaking notes.)

Show me more… »

 | August 17, 2010 7:07 pm

Though I love Ubuntu, there is one aspect of its package management that I am significantly less than thrilled with, the pace of incremental updates.

Prior to release, Ubuntu (and other software manufacturers) spend a great deal of time testing, tweaking and otherwise ensuring that the software they ship is of high quality.  This is a good thing, it ensures that the platform is stable and works well.

However, there is also a downside.  It means that, other than very minor security upgrades, software only gets updated during Ubuntu’s six month refresh cycle,  and, if you don’t upgrade to the newest Ubuntu, you will often get stuck using older versions.  (Even if those older versions have known bugs and issues.)

Most of the time, this isn’t a tremendously big deal.  After all, Ubuntu is completely free and upgrades are mostly painless.  Sometimes it is, though, and there is one case is currently having a negative impact on Ubuntu (10.04) users who use LyX.

Show me more… »

 | August 2, 2010 2:31 pm

Presidential-SealFrom a structural standpoint, memos are interesting documents.  They share some attributes in common with a letter, and others in common with a structured report.  Because of this, LaTeX uses have historically used a document class meant for one of those documents when composing memos.  There isn’t anything wrong with that.  It’s very easy to begin a new “article” and then add the needed “To”, “From”, “Subject” and “Date” lines manually.

However, while this is easy, it still requires that you do a bit of “finger painting”.  As a (more or less) dedicated user of LaTeX, I dislike finger painting.  Quite a bit, actually.  It might even be accurate to say that I am philosophically opposed to finger painting.

The major advantage of using LaTeX is that, like XHTML and CSS, it can separate your content from the markup and formatting that determines its appearance.  When you fingerpaint, however, you mix them all together.  Your appearance syntax and the content of your document get inseparably intertwined.  In some cases, you couldn’t separate them even if you wanted to.  For that reason, finger painting is just wrong.  But even though finger paining in LaTeX may feel wrong, I’ve never had a reason to create a better solution.

That is, until a few a weeks ago.

Quite recently, I’ve become involved in a new project and because of what the project is and the need to official keep records of communication, I’ve found myself writing memos.  Lot’s of memos.  More memos than I’ve ever written at any other point in my life.  Moreover, I’m going to be writing (many) memos for the foreseeable future.  On Friday, after finishing (yet another) memo, I decided that it was time to create a more formal memo template/document class for LaTeX.

I’m calling it texMemo.

Show me more… »

 | July 15, 2010 11:20 pm

Many Linux distributions package the most common LaTeX classes and utilities and then make them available through their repositories.  When you install programs such as LyX or Kile, these packages are downloaded and installed at the same time.

This is tremendously convenient.  It means that most of the software you would ever use is a simple apt-get away; and, under most circumstances, it’s a good idea to use the software available from your distribution repositories.  The package maintainers and other behind-the-scenes people make sure that the available versions are both secure and stable.

Sometimes, however, it can be advantageous to have both the “stable” LaTeX distribution and a “custom” LaTeX distribution installed side by side.  As one example of when this might be useful, consider the following: up until the most recent version of Ubuntu (version 10.04, Lucid Lynx), the only LaTeX distribution available through the package system was TeXLive 2007 (which had actually been released at the end of 2006), which was three years out of date.

During that time, the TeXLive developers had been very hard at work.  Thousands of bugs were resolved, new document classes were introduced, and (best of all) TeXLive added a package manager – which meant that you could add new packages without needing to manually download and install them.  Taken together, this meant that there were some very compelling reasons to use a newer version of TeXLive.

To simply replace TeXLive was possible, but could be difficult and time consuming.   Moreover, it caused problems with package dependencies and could break things.  There is nothing worse than trying to troubleshoot and fix a broken LaTeX solution.  The much better solution was to install only a few core utilities (thereby satisfying the package requirements of LyX, Kile and other tools) and then installing the newer version alongside the old.

This article will explain how you can do that.  It will show you how to manually install a LaTeX distribution and demonstrate how to configure the necessary variables so that the system will use it instead of the older version.

Show me more… »

 | July 13, 2010 6:38 pm

In the past few months, I’ve written several articles about the ways LyX can be customized.  These included a brief introduction to layout files and how they relate to document classes in addition to a tour of character styles and how you can add them to the LyX local layout.  What I have not written about, though, is one of the most important ways of extending LyX, the module.

Ever since version 1.6 of LyX, the core LyX developers have worked very hard to make LyX a modular system.  Instead of hard coding values and options – as they had done previously – they’ve instead placed all of the needed information in configuration files that can be edited and modified by users.  This is a Very Good Thng.  It means that (given enough motivation), you can customize LyX to behave exactly was you wish.  You can change the default document classes, styles, fonts and anything else that your little heart desires.  It also means that any extensions you create will exist as first-class citizens.  They have access to all of the internal wizardry as the default document classes and features.

In order to make this transition work, it was necessary to have certain chunks of code that could be switched on when needed and switched off when not required, and that’s how “modules” were born.  In a lot of ways, you might think of modules as document plugins.  They let you do stuff that, while not required, can greatly improve your editing experience.  (Modules are switched on and off from the “Document Settings” pane.)

They let you do things like run Sweave code, add additional theorem environments, or apply a different style to your text.  But unlike a layout file, they are not tied to any particular document class or type; which makes them very powerful.  In fact, nearly all of them they can be used with any document type that LyX supports.

There are two main types of modules:

  1. Modules that contain all of the code needed to implement a particular feature (or modify an existing one) and do not reference external packages.
  2. Modules that load existing LaTeX styles/packages and translate their features into insets, commands and headings.

In both cases, modules serve as a container for the code.  You can use a module to package code that would normally live in a document layout file, or you can use code that might have been placed in the local layout.  The code may be a document header, a new LaTeX command, a character style, a custom inset, or any other type of user customization that LyX supports.

The biggest difference between using a module instead of a layout, of course, is that when the code is placed in a module, you can then add it to any document on your system.  This makes modules a tremendously flexible way to reuse customizations that you’ve created.  In fact, in nearly all cases, they are the best way to package your customizations for use on your own system or for sharing with others.

In this article, I’d like to introduce the module.  I will explain its position in the larger LyX/LaTeX “big picture”, its internal anatomy and provide a few examples of how it can be used to add new features.

Show me more… »