Skip to content →

Tag: mac

le travers – april 2006

Here is a
solution to the Intel-Mac schizo-situation of having GAP running on the
Mac-partition, whereas Singular and Maxima had to run on the
WindowsXP-partition (see this post for
the problems) : get and install Sage!

Crete de
l’espinasse : Wednesday 20.17h Alt. 750m. The nearest place having
mobile reception. It takes a walk of 1.25km and a climb of 150m to get a
signal…

Croix
Blanche : Tuesday 14.03h : Alt. 897m : the end of a 6km climb from
450m…

Le
Travers : Monday 19hrs Alt. 604m, 19 C…


Chapelle
St Regis : Sunday 11.45h Alt. 719m. The highest point of the
bicycle-tour : le Travers-Dompnac-Pourcharesse-St Melany-le Travers
(27.2 km).

Leave a Comment

make your own mopp

If you
want to make your own ‘My Online Publications Page’ (MOPP) similar
to mine here’s what you have to do :

  1. in case you are running
    Linux, all you need is the mopp package and
    follow the instruction on this page.
  2. if you are onto Mac OSX you have to get and compile a few more
    packages. To start, go to the BibTeX bibliography tools page and
    download the bibclean file. Go to
    the directory, do a ./configure and a
    make and copy the resulting executable bibclean to the
    bibtools/bin folder of your mopp-folder (see first
    step).
  3. get the latest gawk package. Do a
    ./configure, then a make and a
    sudo make install and gawk gets installed at
    /usr/local/bin/gawk. Make a symbolic link (or use a
    bruteforce copy) to /usr/bin/gawk.
  4. Make a
    symbolic link or a bruteforce sudo cp /bin/ksh
    /usr/bin/ksh
    .
  5. If you are using only scanned
    pdf-files it is sufficient to get DjVu-versions of them using the Any2DjVu service. If you want
    to do the conversion from Pdflatex-files yourself, get the DjVuLibre package, configure,
    make and install it as before. All programs get installed under
    /usr/local/bin, write down the files in the
    djvu/bin folder of the mopp-folder, remove them and
    copy your compiled version of them from /usr/local/bin to the djvu/bin
    directory.
  6. Open the work/mopp.sh script of
    the mopp-folder in an editor, comment out the recode
    line and change the awk line into
    awk -v
    THENAME=”$MOPP_NAME” -v
    THELOGO=”$MOPP_LOGO” -f bib2html.awk \
    (that is
    add a space after the two -v options).
  7. You should now be
    able to follow the remaining instruction from the How to make “My
    Online Publications Page” page
    to get a mopp-page which looks
    roughly like this one.
  8. If you want to change the layout of that page, you should
    modify the work/bibtex2html.awk file to fit your taste.
    If you want to have a layout similar to mine email me and I’ll send you my bibtex2html.awk file.

    One Comment

MyLife@300dpi

Three years ago I did spend three weeks next to my Canonscan, painstakingly scanning all individual pages of every preprint I ever wrote. Next, I converted every page to PDF, resized it (in order to control the size) and bundled them into PDF-files. A typical preprint would take me roughly three quarters of an hour and the final result was mediocre. For example, here a blown-up sample from the original 1992 ‘Moduli
spaces of right ideals of the Weyl algebra’ -preprint, resulting in a 1.7Mb PDF-file

Recentlty, the department bought a Ricoh-copier which makes scanning a lot more fun. To scan a preprint at 300dpi and convert it into a single PDF-file takes under a minute (actually, downloading the file using a web-interface takes longer…). For this particular preprint, the resulting PDF-file took up 1.2Mb and looks a lot nicer

Still, 1.2Mb is a huge file but converting it to a DjVu-file (DjVu=deja vu) using the handy Any2DjVu Service gives us a mere 236Kb file which comes a lot closer to the filesize of a PDFLaTeX-file and the output is still very legible

So, I decided to rescan my entire life at 300dpi and convert it into DjVu. Next, I got the MOPP-package (MOPP = My Online Publications Page) working using the instructions from this page and some obvious MacOSX-modifications (if I can do it, so can you but perhaps I’ll write up the details in another post, just to remind myself). You can see the result at my homepage. I’ll update the latter one regularly (there are still some preprints missing, as are all my courses etc. and cross-references) and only afterwards I’ll update my homepage again. So far there is 250Mb to download (including all versions of the noncommutative geometry@n book, including the published ones…) so this should keep you busy for a while…

Leave a Comment

Inform

Once
upon a time, not so long before the video-games era, people needed the
command-line and knowledge of esoteric commands like _examine_,
_look_, _take_, _drop_, _go south_ etc. to
get into the mysterious worlds of dungeons &
dragons
. If you have nostalgia to the heroic times of text-based
adventure games (nowadays called IF for _interactive fiction_),
there is a short message : get Inform(ed)! Here’s a
slightly longer message for those who have a mac running OSX and want to
know the quickest way to get to a screen like and start
playing Christminster (or another of 300 IF-games) (if you’re on a
different system, things will be just as simple but you’ll have to find
it out yourself starting from the Inform-Z
machine page
). step 1 : Get a
copy of an inform installation and expand it to get an
Inform-folder and place this in your Home-folder. step 2
:
Go in the Finder to Inform/Games/MyGame1 and double click on
the _MyGame1.command_ file. A Terminal window will open and exit
and you will see that a new file appeared in the Folder :
_MyGame1.z5_. Double click it and a warning message will appear
that this is the first time you will open _Zoom_, tell it’s ok
and Zoom will launch and you can play your first (though primitive)
Inform game! step 3 : If you want to play other
games (such as Christminster), go to the Z-
code archive
and pick one of the 346 games. For example, click on
the minster.z5 link and the file will download to your
Desktop. Place it in the Inform/Games folder (not necessary) double
click it and you should see the above wellcoming message. That’s it,
start playing. step 4 : If you don’t know how to
play such games, there are excellent tutorials
available on the Inform site.

Leave a Comment

added to MyBrain : arXiv

Clearly, someone who
subscribed to your brain
shouldn’t have to check the arXiv every morning only to find out
that you still haven’t posted _the_ paper s(h)e is expecting of
you, based on your recent BrainActivity…

So why not
package this into your Brain subscription? It is easy enough to get all
posts by a specific author from the archive but, unfortunately, the
arXiv doesn’t provide RSS-feeds of this information (at least, not to my
knowledge). Still, it is possible to fix this with a tiny
Perl-script
.

So copy the code and adjust it replacing MyInfo
by Yours (or sligthly safer, get the arxivpost.pl
file as I had to add a few spaces to get it un-parsed) and safe it
somewhere on your system.

So how to put this to use? Btw. I know
that all of you know this by heart and that I may have given you the
(false, i swear) illusion to be fairly knowledgeable writing a
Perl-script in half an hour, but believe me, in two months (and sooner
when it’s up to me) I will have completely eradicated all this
techie-stuff from MyBrain. Then, it will take me infinitely longer to
remember/reconstruct things than it will take me now to blog this here,
so please either bear with me or go somewhere more interesting.

You’d better have Perl installed on your system, but then you have to
install extra modules from CPAN the
Comprehensive Perl Archive Network (this is to Perl what CTAN is to TeX for the mathematicians
among us). That’s pretty easy if you remember the correct commands. The
generic way to do this is by firing up your Terminal and typing things
like

 iBookLieven:~ lieven$ sudo perl -MCPAN -e shell
Password:  cpan shell -- CPAN exploration and modules installation
(v1.83) ReadLine support enabled  cpan> install Template::Extract

and similarly for the other modules you’ll need,
LWP::Simple and XML::RSS. You may be asked questions but just go for the
default. If something goes wrong and you get a message that the module
failed to install, you have to go for a manual override…

Go to CPAN and do a search on the module’s name. You’ll
be given a list op files to download, go for the one you need and
download the souce somewhere. Then, again in Terminal do the following
routine

  • cd to the downloaded and extracted directory
  • perl Makefile.PL
  • make
  • make test
  • sudo make install

Even if the test fails with
certain errors, just go ahead (it will not matter for the trivial uses
we have for these modules) and the last command is Mac OSX only (I’m
pretty certain that Linux-fanatics know what to do instead and for
Windows-diehards, well….).

Having all modules installed
you can execute the file with

perl arxivpost.pl

(assuming you created the Directory in which the program
is supposed to safe the arxivXXX.rdf file and assuming you made it
writable). That’s it. You now have your own RSS feeds of all your papers
on the arXiv which you should make for of YourBrain subscription).

Just one more thing you should do. Make this a cron
job
. Check at what local time the arXiv puts online the new papers
of the day (assume it is 3am) then do a sudo crontab -e
and then add a line to the file as

5 3 * * Mon-Fri perl
/pathtowhereitis/arxivpost.pl

and your subscribers will
only have to wait 5 minutes to know whether you did it…(or not).
You can check it out either by subscribing to MyBrain or subscribing to
http://www.
neverendingbooks.org/FOAF/arxivLLB.rdf
.

Leave a Comment

latexrender plugin for wordpress under tiger

Promises and pie-crusts are made to be broken, a wiser man once
said. Still, promises have a much longer life-span and sometimes their
real content becomes redundant over time.

A year ago, I
promised
to document how I got the
LaTeXRender Plugin for WordPress
working under OS X. The procedure
consisted of some trial-and-error operations, installing non-standard
versions of software and hardcoding certain directories throughout
certain files…

Not something I was looking forward
to when I decided to upgrade this WordPress blog but,
surprisingly, things went pretty smoothly this time (Mac-technology
has improved a lot). So, please don’t worry too much about this
post
and follow the (late) instructions below.

First
things first : I will assume you have the ‘generic’ LaTeX
running under Tiger (10.4),that is, use the i-Installer to download BOTH
LaTeX and Imagemagick! Further, in order to get WordPress up and
running, have the standard
MySQL 4.0 package
installed for 10.3 (not version
4.1…) and don’t use the generic Mac-PHP version, but
instead download Marc
Liyanage’s PHP5 package
which has plenty of additional
packages installed (notably, GDlib and MCRYPT which comes in handy if
you want to fight spam-comments using BotCheck).

\r
\n

Download wp-
latexrender.zip
and follow the instructions given to the letter
(there is one undocumented extra directory you have to fill in at the
start of the latexrender-plugin.php file). There is
just one additional thing to do. Find in the
class.latexrender.php file the line starting
with

// convert dvi file to postscript using
  dvips

and include the following lines just before it
:

// begin of workaround // extending the PATH
  environmental variable Soldpath =
  getenv(“PATH”); Swhere_imagemagick_is =
  “/usr/local/bin”; if (Soldpath) { Swhere_imagemagick_is .=
  “:Soldpath”;} putenv(“PATH=Swhere_imagemagick_is”); //
  end of workaround 

activate the plugin and it
should work! Still, there are three things you may want to change. In
the latex.php file uncomment the indicated lines as
you will be using htmlArea to input your posts. In addition, if you
have the MarkDown-plugin enabled, it is best to append additional
lines such as

 Slatex_formula =
  str_replace(“_”,”_”,Slatex_formula);     Slatex_formula
  =
  str_replace(“_”,”_”,Slatex_formula); 

(
between the first ” ” should be the beginning and end
em-tag respectively) or underscores will be interpreted as em-tags.
If you run into additional similar problems, the procedure is to
comment-out the line

 
  unlink(Sthis->_tmp_dir.”/”.Sthis->_tmp_filename.”.tex”); 
  

near the end of class.latexrender.php , look in the
tmp directory for the TeX-file, detect the problem and add similar
lines to the ones above to solve it. Another useful thing to do
is to add TeX-packages in the class.latexrender.php file. My own
version has the following predefined symbols and loaded
packages

 function wrap_formula(Slatex_formula) { 
  Sstring  =
  “\\documentclass[“.Sthis->_font_size.”pt]{“.Sthis->_latexclass
  .”}\\n”;  Sstring .=
  “\\usepackage[latin1]{inputenc}\\n”;  Sstring .=
  “\\usepackage{amsmath}\\n”;  Sstring .=
  “\\usepackage{amsfonts}\\n”;  Sstring .=
  “\\usepackage{amssymb}\\n”;  Sstring .=
  “\\usepackage{xy}\\n”;  Sstring .=
  “\\xyoption{all}\\n”;  Sstring .=
  “\\\\newcommand{\\vtx}[1]{*+[o][F-]{Scriptscriptstyle
  #1}}\\n”;  Sstring .= “\\\\newcommand{\\mathbb{C}c}{\\Bbbk}\\n”; 
  Sstring .= “\\\\newcommand{\\mathbb{C}}{\\mathbb{C}}\\n”;  Sstring .=
  “\\\\newcommand{\\mathbb{Q}}{\\mathbb{Q}}\\n”;  Sstring .=
  “\\\\newcommand{\\mathbb{Z}}{\\mathbb{Z}}\\n”;  Sstring .=
  “\\\\newcommand{\\mathbb{N}}{\\mathbb{N}}\\n”;  Sstring .=
  “\\\\newcommand{\\mathbf}[1]{{\\\\text{\\em \\usefont{OT1}{cmtt}{m}{n}
  #1}}}\\n”;  Sstring .= “\\pagestyle{empty}\\n”;  Sstring
  .= “\\begin{document}\\n”;  Sstring .=
  “S”.Slatex_formula.”S\\n”;  Sstring .=
  “\\end{document}\\n”;          return Sstring;     }  
  

which, among other things, allow all commenters to add
quiver-pictures using xymatrix and vtx to depict vertices. Oh yes, you
can allow comments to include LaTeX-code by uncommenting the
line

  // add_filter(‘comment_text’,
  ‘addlatex’); 

in the latexrender-plugin.php
file (but before you do make sure you have spam under control, such as
with BotCheck mentioned above). That’s all for now. If you want
to use TeX in a comment, make sure to put the code between tags [ tex
] and [ /tex ] (omitting the extra spaces). If you want me to add
other LaTeX-packages, leave a comment.

Leave a Comment

publish

A quick reply to some of the comments
to the lulu/neverendingbooks post.

_Are they also
responsible for the graphical design in your books ?_ No! In fact it
was one of the more pleasant experiences of the last couple of weeks to
develop our own format, LaTeX-style and covers. The usual gang had their
say in all of this but it is only fair to say that Jan did most of the work. We developed
the cover-concept (that is, macro shots of games in duotones and placing
of titles etc) by trial and error. Jan is responsible for the
photo-shoot, I did choose the shots to be used and did the initial
coloring and placing of titles and left the final tweaking to Jan, who
did some lay-out work before. We, at least, are happy with the
result… As mentioned before, the LaTeX-style sheets were made
using the
memoir package
.

_Who is responsible for trying to sell
the book, you or them?_ I dont think we are doing great efforts to
try to sell the books, yet. Up to now, you can only get to the
book-sites via this blog or via my homepage. Lulu claims that they will only make
money if we do… and as this is clearly sales-talk (they make money
on every book they print) it involves no (or a very small) financial
risk on our part. Anyone who wants to have a copy of one of our books,
orders them at Lulu, they print it and ship it to you. But beware! They
have several shipping options and for most of them it costs you more to
get them shipped than to buy the books… In fact, that was the main
reason why we didnt put the URL online before we had two volumes out.
The reason being that if you buy for over 25dollars you can have them
shipped via their “SuperSaver” option, that is, shipping is free (but
probably slow). But, based on my own experience it works well (I ordered
a few copies of book 1 via SuperSaver and another one via their
InternationalShipment and got the free SuperSaver package a day before
the costly other shipment…). Our real investment is that we have
bought ISBN-numbers for the books (at a price of 35dollars/book) and
hope to earn this back from a small royalty we get from each book (the
Lulu-rule is that they get 25% of any royalties you set). Even though we
are not entirely happy with the distribution process we opted for this
series for an unusual book-format making it handy and fun to use (the
square 7.5 x 7.5 inch format is very pleasing to read and the
coil-binding makes it extremely handy to lay flat on the table). So we
view this series as a student-edition of the books and we keep them as
cheap as possible. At a later stage it may happen that we will also have
a library-edition of the books which will have global distribution
(meaning that you can order them via Amazon or your local bookshop). For
this to work, you have not so much freedom in your book-format and can
only have regular binding. Besides, buying such a global-ISBN is more
costly and will make this edition (a lot) more expensive. But, as you
can see from the picture, the books get printed and shipped and look
VERY nice. In fact, of the few copies I ordered, I had to hand out
already two because some people just liked the feel and touch of it. I
think, people will only gradually be willing to buy their own copy when
(1) they have glanced through a copy at some meeting or seminar and (2)
if more volumes come out and they have a greater choice in bying 2
volumes to get free shipping. On this last issue : already three people
have expressed interest in writing a book in our series. My own hunch is
that the next book out will have to do with Poisson noncommutative
geometry and will have a macro shot of a war-game on its cover (authors
can give suggestions for which games they want on their cover), curious
how this will work out…

_How many have you sold so
far?_ Well, not enough so far to get our ISBN-investment back…
But, once again, I think it will take some time for people to trust the
series enough to buy a volume or two. In the first week we made the URL
available we sold 16 books, so if you want to increase our sales-index
please do by going to this
page
for the first volume and to this page for the second
volume. But perhaps it is easier to bookmark the lulu/neverendingbooks if
you want the latest news on the series. I”ll keep you posted on our
sales via this page. If you buy a book and like the result, please tell
others about it (or even better, let them see and feel the copy.
Hopefully you will get it back…)

Leave a Comment

color schemes

In the unlikely event that we will ever be publishing a
_series_ of books, we’d better have a strategy to design the
_next one_ as we don’t want to go through this time-consuming
process each time. So we need a concept, a consistent
lay-out and a consistent color scheme.

Think of the O’Reilly
hacks books
. Their concept is to have a white background with a
black&white photo of a tool on it, their layout is : a huge colored
title at the top and the authors at the bottom, their color-scheme is
set according to the topic but always using just one color! Pretty
simple, but extremely effective in creating a common look-and-feel for
the series.

Our concept is to take a macro photo of a
mathematical game in duotone
.

Clearly, the game will vary throughout the series and may
even depend on the author (the example-game is Gipf). Duotone (that is,
converting the photo to grayscale and replacing white by another color
and adjusting saturation) because we are no graphic designers and have
no control on the final result if we would go for something more
involved.

Of course, the second color will also change
throughout the series. As we have no time to read interesting books such
as the color harmony workbook we just went for a
variation of the triad
color idea
. That is,

Any three colors
with a balanced triangular relationship are triads. The basic triad
consists of three colors equidistant on the color wheel. The best known
of all color schemes are: the primary colors, red, yellow, and blue; the
secondary colors, orange, green and violet; and the remaining tertiary
colors, like red-orange and blue-violet. Triadic colors are usually
considered pleasing to the eye.

Given the
first color, we add first 120 and then 240 to its hue-value. For the 4th
color we take the opposing color (+180) and the 5th and 6th colors make
a second triad. For the 7th color we then have to go for +150 and form
another triad and so on and so on. An example of how such a series might
look is given at the top.

Finally, as for the lay-out, well,
it’s far from perfect but it’s the best we managed to do before
we got fed up with it. But, perhaps you might appreciate the stylish
hyphens in subtitle and in the numbering line, compatible with our own
chapterstyle.

Leave a Comment

neverending.sty

You don’t
know how lucky you are to be able to begin a LaTeX-document with
something like \documentclass[a4]{amsart}. This simple line
tells the machine what the size of paper is it has to print to, which
part of that paper has to be filled with text, what the design of
titles, sections etc. is (and probably more). Just convince yourself
(for the sake of argument) that you want to produce a readable
mathematical book on paper of dimensions say 6 by 9 inch. How would you
do this? Simple : all you have to do is to adjust certain TeX-parameters
the way you want! Well, that’s exactly what the _neverendingbooks
design department_ has been doing for the last couple of weeks!

The package we would use was easy enough to find. A long time ago, Geert suggested that we
should use the
memoir package
. The fun starts the moment you are foolish enough to
print the manual : 300 pages! After an inspiring account of
book-printing basics over the ages, you are told that you have total
freedom to set your _stock paper size_, how it needs to be
_trimmed_ to get the final result, how you should designs
everything from the title, over abstract, acknowledgement, thanks, table
of contents contents, dedications etc. down to chapter, section and page
styles. In short : ULTIMATE FREEDOM!!!

But, as some of you may
know from experience, there is nothing more frightening to the moderate
autist (and frankly, are there any other mathematicians?) than ultimate
freedom! So, we set up a task-force, had daily brain-storm sessions,
produced numerous trial-prints and eventually came out with something
that came very close to the _better designed book_. Let’s face it
: can you name me _one_ (yeah right, just 1) well-designed
mathematical book? If you don’t believe me, browse through the recent
mathematics-books on amazon (as our design-department
did for a whole week-end, deprived of beverages and other pleasures).
Found anything? Yes?? Please, please let us know! On the other hand, if
you browse through the Art, architecture and
photography section
you will spot several extremely good-looking
books very soon. Well, after a week we succeeded in designing the
_arty-farty-fanshi-wanshi_ (as PD1 would name it, jealous that
she was not in on the fun) mathematical book! And, what did we do with
the labours of all this hard work? NOTHING! We simply dropped the whole
idea (if you are a graphics-designer trying to survive within a
mathematics publishing firm (not easy we know, you have all our
sympathy) and want to do something more fun, contact us and if we can
reach an adequate financial agreement we will be happy to send you our
ideas).

So, what went wrong? Nothing really, it just dawned on
us that _NeverEndingBooks.org_ should not go for the
better-designed mathematics book. All our (potential) authors can
publish as easily at Oxford University
Press
, the European Mathematical
Society
or, if they have no moral objection, at the AMS. So, why
would they choose us instead of these more established publishing
houses? Just because our books look slightly (well let’s face it : a
lot) better? Probably not. We, at neverendingbooks.org should not go for
the better-designed book, we should not go for the book concept at all,
we should invent something entirely NEW & SEXY & USABLE & DESIRING & (I
hope you get the drift!). Next time, I’ll let you in on the first ideas
of our design-department!

Leave a Comment

tiger tracks

I got
Tracks working under Tiger by trial and error starting with a suggestion
from Jan who found a fix here. From this I stumbled on for an hour or so on my iMac
untill near the very end I found that the tracks-page itself now
has a Tiger-section. So, let’s try to do it all over again from fresh on
my regular machine (a little iBook).

Start with
this page
and read it all the way to the comments. There is a
comment by Jamie on installing Rails and MySQL on a fresh Tiger which
looks like the thing I want followed immediately by another post by Jose
Marinez on
Installing Ruby on Rails on Tiger
which I decided to follow by the
letter (with one noticeable exception!). So first I downloaded the Rails
installer on Tiger
. Next, an install of the Standard version of
MySQL. I used version 4.0 for OS
X 10.3 !!!! NOT 4.1 !!!!
. I installed MySQL and the StartUpItem.
Next, I opened Terminal and typed the following commands

– cd
/usr/local/mysql
– sudo chown -R mysql data/
– sudo echo
– sudo ./bin/mysqld_safe &

and verified it by performing a
simple test

/usr/local/mysql/bin/mysql test

Next, I
secured everything by having a root-password

/usr/local/mysql/bin/mysqladmin -u root password
__*

Then I remembered that I’d better
not have to type the whole path so I did a

echo ‘export
PATH=/usr/local/mysql/bin:$PATH’ >> ~/.bash_profile

Also, I want
to admin MySQL via phpmyadmin so I
installed it. Then I enabled my webserver to use PHP using this post though I
did use vi rather than pico! Next, i did a check whether everything
worked fine by typing in safari

http://localhost/~lieven/phpmyadmin/index.php

Followed by
a

sudo gem install mysql –
–with-mysql-dir=/usr/local/mysql

Now, it is time to get the Tracks-package
and to follow these instructions And, it works! Here is the proof :

Leave a Comment