Texinfo: Writing Plain Spanish

After a few weeks of researching we finally decided for Texinfo as our technical writing platform of choice. But before we did the switch, there was a serious complain about Texinfo: The inability to write plain spanish!!!

For us results really odd to write @’a for an a with accent, we still prefer á. So we found a workaround from Vladimir Támara (http://www.geocities.com/sl_edu_colombia/soluciones/vladimir/linux_esp.html), that used sed to replace all accents in our original texi file.

So here’s the howto:

Step 1

Create a file called encodetexi.sh (or name it whatever makes sense for you), and put the following bash code in it:

sed -f <b>encondetexi.sed</b> $1 &gt; tex/$1

This script will encode your accents to the formal Texinfo way with sed, and put them in the subdirectory tex/ (don’t forget to create it or change the script to handle the new subdir creation).

Once created give execute permitions to the script:

chmod 775 encodetexi.sh

Step 2

Create a file named encodetexi.sed which contains the substitution patterns for sed. Here is the content of the file:


This will replace all accents, tildes, etc. from our original texi file and create a well encoded file in tex/ subdir.

Step 3

Now plunge your texi files in plain spanish, use accents and tildes at will.

Step 4

Run the script (again, make sure you got tex/ subdir):

$ encodetexi.sh your_file.texi

Final thought

Funny… after revisiting this post it would make much more sense to be written in spanish :|

Texinfo: Writing Plain Spanish

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s