Skip to content →

Tag: wordpress

Loading a second brain

Before ChatGPT, the hype among productivity boosters was a PKMs or Personal knowledge management system.

It gained popularity through Tiago Forte’s book ‘Building a second brain’, and (for academics perhaps a more useful read) ‘How to take smart notes’ by Sönke Ahrens.



These books promote new techniques for note-taking (and for storing these notes) such as the PARA-method, the CODE-system, and Zettelkasten.

Unmistakable Creative has some posts on the principles behing the ‘second brain’ approach.

Your brain isn’t like a hard drive or a dropbox, where information is stored in folders and subfolders. None of our thoughts or ideas exist in isolation. Information is organized in a series of non-linear associative networks in the brain.

Networked thinking is not just a more efficient way to organize information. It frees your brain to do what it does best: Imagine, invent, innovate, and create. The less you have to remember where information is, the more you can use it to summarize that information and turn knowledge into action.

and

A network has no “correct” orientation and thus no bottom and no top. Each individual, or “node,” in a network functions autonomously, negotiating its own relationships and coalescing into groups. Examples of networks include a flock of birds, the World Wide Web, and the social ties in a neighborhood. Networks are inherently “bottom-up” in that the structure emerges organically from small interactions without direction from a central authority.

-Tiago Forte, Tagging for Personal Knowledge Management

There are several apps you can use to start building your second brain, the more popular seem to be Roam Research, LogSeq, and Obsidian.

These systems allow you to store, link and manipulate a large collection of notes, query them as a database, modify them in various ways via plugins or scripts, and navigate the network created via graph-views.

Exactly the kind of things we need to modify the simple system from the shape of languages-post into a proper topos of the unconscious.

I’ve been playing around with Obsidian which I like because it has good LaTeX plugins, powerful database tools via the Dataview plugin, and one can execute codeblocks within notes in almost any programming language (python, haskell, lean, Mathematica, ruby, javascript, R, …).

Most of all it has a vibrant community of users, an excellent forum, and a well-documented Obsidian hub.

There’s just one problem, I’m a terrible note-taker, so how can I begin to load my ‘second brain’?

Obsidian has several plugins to import data, such as your Kindle highlights, your Twitter feed, your Readwise-data, and many others, but having been too lazy in the past, I cannot use any of them.

In fact, the only useful collection of notes I have are my blog-posts. So, I’ve uploaded NeverEndingBooks into Obsidian, one note per post (admittedly, not very Zettelkasten-like), half a million words in total.

Fortunately, I did tag most of these posts at the time. Together with other meta-data this results in the Graph view below (under ‘Files’ toggled tags, under ‘Groups’ three tag-colours, and under ‘Display’ toggled arrows). One can add colour-groups based on tags or other information (here, red dots are posts tagged ‘Grothendieck’, the blue ones are tagged ‘Conway’, the purple ones tagged ‘Connes’, just for the sake of illustration). In Obsidian you can zoom into this graph, place a pointer on a node to highlight the connecting dots, and much more.



Because I tend to forget such things, and as it may be useful to other people running a WordPress-blog making heavy use of MathJax, here’s the procedure I followed:

1. Follow the instructions from Convert wordpress articles to markdown.

In the wizard I’ve opted to go only for yearly folders, to prefix posts with the date, and to save all images.

2. This gives you a directory with one folder per year containing markdown versions of your posts, and in each year-folder a subfolder ‘img’ containing all images.

Turn this directory into an Obsidian-vault by opening Obsidian, click on the ‘open another vault’ icon (third from bottom-left), select ‘Open folder as vault’ and navigate to your directory.

3. You will notice that most of your LaTeX cannot be parsed because during the markdown-process backslashes are treaded as special character, resulting in two backslashes for every LaTeX-command…

A remark before trying to solve this: another option might be to use the wordpress-to-hugo-exporter, resulting in clean LaTeX, but lacking the possibility to opt for yearly-folders (it dumps all posts into one folder), and it makes a mess of the image-files.

4. So, we will need to do a lot of search&replaces in all files, and need a convenient tool for this.

First option was the Sublime Text app, which is free and does the search&replaces quickly. The problem is that you have to save each of the files, one at a time! This may take hours.

I’ve done it using the Search and Replace app (3$) which allows you to make several searches/replaces at the same time (I messed up LaTeX code in previous exports, so needed to do many more changes). It warns you that it is dangerous to replace strings in all files (which is the reason why Sublime Text makes it difficult), you can ignore it, but only after you put the ‘img’ folders away in a safe place. Otherwise it will also try to make the changes to these files, recognise that they are not text-files, and drop them altogether…

That’s it.

I now have a backup network-version of this blog.



As we mentioned in the previous post a first attempt to construct the ‘topos of the unconscious’ might be to start with a collection of notes (the ‘conscious’) and work on the semantics of text-snippets to unravel (a part of) the unconscious underpinning of these notes. We also mentioned that the poset-structure in that post should be replaced by a more involved network structure.

What interests me most is whether such an approach might be doable ‘in practice’, and Obsidian looks like the perfect tool to try this out.

What we need is a sufficiently large set of notes, of independent interest, to inject into Obsidian. The more meta it is, the better…

(tbc)

Previously in this series:

Next:

The enriched vault

Leave a Comment

The joys of running a WordPress blog

Earlier today, John Duncan (of moonshine fame) emailed he was unable to post a comment to the previous post:
“I went to post a comment but somehow couldn’t convince the website to cooperate.”

There’s little point in maintaining a self-hosted blog if people cannot comment on it. If you tried, you got this scary message:

Catchable fatal error: Object of class WP_Error could not be converted to string in /wp-includes/formatting.php on line 1031

The days I meddled with wordpress core php-files are long gone, and a quick Google search didn’t come up with anything helpful.

In despair, there’s always the database to consider.

Here’s a screenshot of this blog’s database in phpMyAdmin:

No surprise you cannot comment here, there isn’t even a wp_comments table in the database! (though surprisingly, there’s a table wp_commentmeta…)

Two weeks ago I moved this blog to a new iMac. Perhaps the database got corrupted in the process, or the quick export option of phpMyAdmin doesn’t include comments (unlikely), or whatever.

Here’s what I did to get things working again. It may solve your problem if you don’t have a backup of another wordpress-blog with a functional wp_comments table.

1. Set up a new WordPress blog in the usual way, including a new database, let’s call it ‘newblog’.

2. In phpMyAdmin drop all tables in newblog except for wp_comments.

3. Export your blog’s database, say ‘oldblog’, via the ‘quick export’ option in phpMyAdmin to get a file oldblog.sql.

4. If this file is small you can use phpMyAdmin to import it into newblog. If not you need to do it with this terminal-command

mysql -h localhost -u root – p newblog < oldblog.sql

and have the patience for this to finish.

5. Change in your wp-config file the oldblog database to newblog.

Happy commenting!

Leave a Comment

From WordPress to ePublishing (1)

Perhaps, the tips and tricks I did receive to turn a selection of wordpress-posts into a proper ePub-file may be of use to others, so I will describe the procedure here in some detail.

It makes a difference whether or not some of the posts contain TeX. This time, I’ll sketch the process for non-LaTeX posts and hence we will turn the Bourbaki-code posts into ePub-format to read on your iPad, rather than merely into a pdf-file as last time. Next time, I’ll add some tricks to repeat this when some of your posts do contain LaTeX.

1. Install the ePub export plugin

Get the epub export wordpress plugin, install and activate it in the usual way. ePub Export automatically creates an ePub file when a post or page is published or updated. The ePubs are stored in the uploads directory. For later use, remember that your uploads directories are located under BLOGHOME/wp-content/uploads.

2. Update the posts you want to include

Decide which posts you want to include in your eBook, edit them (or not) and press for each one of them the update-button. This will populate today’s uploads-directory with a number of epub-files. Transfer them all, for example using Transmit, to a directory on your home-computer, named say MyFirstEBook.



3. Unpack the epub-files

The crucial fact to remember about epub-files is that they are really zipped archives containing xhtml-, css- and other files and directories. As we want to edit some of those, we first have to unpack the directories. So, change the .epub extensions to .zip and double-click on them to create the directories.



The crucial files in each directory are preface.xhtml (containing title author and blog-name), text.html (containing the blog-post) and the images-directory (containing copies of all the images used in the post).

4. Rename the directories user-friendly

As all the posts will be chapters in our eBook in some specific order, we will rename the numbers of the directories to something more user-friendly such as shortened blog-titles. To do this, double-click in each of the directories on the preface.xhtml file. This will open Safari and will show the title of the blog-post. Use it to rename that directory. For convenience let us call the directory corresponding to the first chapter in our book MasterDirectory

5. Move all images to the master directory

For each of the other chapter-directories, drag all the files contained in the images-subdirectory to MasterDirectory/images.

6. Edit the MasterDirectory/text.xhtml file

Because we will have to open and copy-paste all the text.xhtml files of the different directories, it is perhaps best to rename momentarily the MasterDirectory/text.xhtml file to something like master.xhtml.

Now, open this file with a text-processor such as TextWrangler. Edit it to remove unwanted html-code (such as links to other posts at the start if you are using the series-plugin, or previous/next post links at the end). Also add the title of the blog-post between h1-tags (and if you want to include a table of contents later, give it an anchor-name).

Go to the directory of your second chapter, open that text.xhtml file and copy/paste only the post-content over to the master-xhtml file at the appropriate place. As before, add title/anchor before the copied post-content.

Repeat this procedure, in order, for all the chapters of your eBook.

Once finished, doubleclick the master.xhtml file and correct remaining errors (as it is an xhtml-file, it is rather picky about opening and closing tags) and see whether all your images are included. If you’re satisfied with it, rename the master.xhtml to text.xhtml (don’t forget this!).

7. Edit the MasterDirectory/preface.xhtml file

Open the preface.xhtml file and change the first blogpost-title to the title of your booklet, alter your name (by default it uses your wp-nick) and add a frontipiece-picture if you so desire.

8. Re-package the directory into an epub-file

This is the (only) tricky part. E-book readers require that the mimetype file is the first one in the zip document. What’s more, to be fully compliant, this file should start at a very specific point – a 30-byte offset from the beginning of the zip file (so that the mimetype text itself starts at byte 38).

Here’s how to do this on a Mac (Linux-users being the geeks they are will have given up on reading this post a while ago and as to Windows-users, yeah well …). Open Terminal.app and cd to your MasterDirectory. Now type:

zip -X MyFirstEBook.epub mimetype

Next, type:

zip -rg MyFirstEBook.epub * -x *.DS_Store

(of course you’ll have to change your book-title to whatever you want). If you want to know more about these 2 magical commands, read this post.

9. Edit metadata

Get Calibre and add the MyFirstEBook.epub to Calibre by clicking on the ‘Add Books’ button.



You can preview your eBook by clicking on the ‘View’-button. Next, click the ‘Edit metadata’-button and alter the title and author entries (and whatever else you want to include) and click the OK button. Then click ‘Save to disk’.

10. Read your eBook on your iPad

Finally, we want to see how it looks on the iPad. Mail MyFirstEBook.epub to yourself as attachement, open it with iBooks and enjoy!

Leave a Comment

changes (ahead)

In view or recents events & comments, some changes have been made or will be made shortly :

categories : Sanitized the plethora of wordpress-categories to which posts belong. At the moment there are just 5 categories : ‘stories’ and ‘web’ (for all posts with low math-content) and three categories ‘level1’, ‘level2’ and ‘level3’, loosely indicating the math-difficulty of a post.

MathJax : After years of using LatexRender and WP-Latex, we’ll change to MathJax from now on. I’ll try to convert older posts as soon as possible. (Update : did a global search and replace. ‘Most’ LaTeX works, major exceptions being matrices and xymatrix commands. I’ll try to fix those later with LatexRender.)

theme : The next couple of days, the layout of this site may change randomly as I’ll be trying out things with the Swift wordpress theme. Hopefully, this will converge to a new design by next week.

name : Neverendingbooks will be renamed to something more math-related. Clearly, the new name will depend on the topics to be covered. On the main index page a pop-up poll will appear in the lower right-hand corner after 10 seconds. Please fill in the topics you’d like us to cover (no name or email required).

This poll will close on friday 21st at 12 CET and its outcome will influence name/direction of this blog. Use it also if you have a killer newname-suggestion. Among the responses so far, a funnier one : “An intro to, or motivation for non-commutative geometry, aimed at undergraduates. As a rule, I’d take what you think would be just right for undergrads, and then trim it down a little more.”

guest-posts : If you’d like to be a guest-blogger here at irregular times, please contact me. The first guest-post will be on noncommutative topology and the interpretation of quantum physics, and will appear soon. So, stay tuned…

2 Comments

NeB : 7 years and now an iPad App

Exactly 7 years ago I wrote my first post. This blog wasn’t called NeB yet and it used pMachine, a then free blogging tool (later transformed into expression engine), rather than WordPress.

Over the years NeB survived three hardware-upgrades of ‘the Matrix’ (the webserver hosting it), more themes than I care to remember, and a couple of dramatic closure announcements…

But then we’re still here, soldiering on, still uncertain whether there’s a point to it, but grateful for tiny tokens of appreciation.

Such as this morning’s story: Chandan deemed it necessary to correct two spelling mistakes in a 2 year old Fun-math post on Weil and the Riemann hypothesis (also reposted on Neb here). Often there’s a story behind such sudden comments, and a quick check of MathOverflow revealed this answer and the comments following it.

I thank Ed Dean for linking to the Fun-post, Chandan for correcting the misspellings and Georges for the kind words. I agree with Georges that a cut&copy of a blogpost-quoted text does not require a link to that post (though it is always much appreciated). It is rewarding to see such old posts getting a second chance…

Above the Google Analytics graph of the visitors coming here via a mobile device (at most 5 on a good day…). Anticipating much more iPads around after tonights presents-session I’ve made NeB more accessible for iPods, iPhones, iPads and other mobile devices.

The first time you get here via your Mac-device of choice you’ll be given the option of saving NeB as an App. It has its own icon (lowest row middle, also the favicon of NeB) and flashy start-up screen.

Of course, the whole point trying to make NeB more readable for Mobile users you get an overview of the latest posts together with links to categories and tags and the number of comments. Sliding through you can read the post, optimized for the device.

I do hope you will use the two buttons at the end of each post, the first to share or save it and the second to leave a comment.

I wish you all a lot of mathematical (and other) fun in 2011 :: lieven.

3 Comments

WikiLeaks’ collateral damage : web-anarchy?

NeB’s web-stats are orders of magnitude out of normal behavior, something must be going on…

  • Spam filter : normally between 10 and 20 spam-comments are trapped. They are removed automatically every 14 days so I only look at them when someone complains a valid comment didn’t get through. This moment, there are 1007 spam-comments held (already 1020 by the time I post this).
  • Akismet-plugin : for those who don’t run a blog, Akismet is an extremely useful WordPress-plugin getting rid of most spam-comments (before entering the spam-filter). I must admit I don’t check Akismet-stats regularly but today the message reads : ‘Akismet has protected your site from 104,145 spam comments already’ (which is about 10% of all visits…).
  • Mail-notifications : this week my email-account is bombarded with spam-comments to approve. Usually there are 1 to 2 such comments a week, now about 20 a day. Part of the problem was that the Akismet-servers were obstructed earlier this week, but the problem persists.
  • Today’s stats show more than 4000 hits, 500 uniques. About 3 times average.

Do we all really need to get caught in the cross-fire between WikiLeaks- and government-hackers?

I have no intention to post my take on WikiLeaks, simply because it won’t be original. As to Assange’s problems with justice : until further evidence comes to light I’m with Naomi Wolf on this (thanks Kea for the link).

If NeB goes off-line for a while, you know why…

One Comment

Link problems : Markdown versus latex2wp.py

As John Baez (and hopefully others) noticed most links here on NeB are now screwed up.

For years I’ve used the Markdown syntax to include links in posts (that is something like [this is what you see](and here is the URL)). NeB used an older version ( Version 1.0.1k) of php Markdown to convert these to proper links (as I did have problems with the newer version).

Ever since the Return to LaTeX post, I’m trying to re-educate myself to write posts in LaTeX and convert them into wp-format using the Latex2WP python script.

Unfortunately this script doesn’t go together nicely with the Markdown-syntax, forcing me to go over the converted latex-file almost line by line fixing errors in order to be able to post. Not the time-saver I had in mind…

I hope to post a lot of new material once the semester finishes and therefore disabled the Markdown-plugin. This causes all links to remain in Markdown-format, which is a nuisance but, if you really want to follow the link it is still there for you to copy-paste. Depending on how exciting the christmas-break will be I’ll try to hard-code the links in some of the more popular posts.

If someone knows of an elegant solution, such as a micro-markdown wp-plugin only parsing links, please drop a comment.

UPDATE : I have downloaded the Markdown quicktags plugin. It replaces the standard HTML-editor of WordPress with a Markdown-editor. There is an option “Render” which transforms Markdown to HTML and then updating the post will save the HTML-version. This looks like a relative quick way to get my old post-links back. So far, I’ve rescued the posts of the last year, more later. Hopefully, this causes no overload in your RSS-aggregator…

3 Comments

NeB not among 50 best math blogs

Via Tanya Khovanova I learned yesterday of the 50 best math blogs for math-majors list by OnlineDegree.net. Tanya’s blog got in 2nd (congrats!) and most of the blogs I sort of follow made it to the list : the n-category cafe (5), not even wrong (6), Gowers (12), Tao (13), good math bad math (14), rigorous trivialities (18), the secret blogging seminar (20), arcadian functor (28) (btw. Kea’s new blog is now at arcadian pseudofunctor), etc., etc. . Sincere congrats to you all!

NeverEndingBooks didn’t make it to the list, and I can live with that. For reasons only relevant to myself, posting has slowed down over the last year and the most recent post dates back from february!

More puzzling to me was the fact that F-un mathematics got in place 26! OnlineDegree had this to say about F-un Math : “Any students studying math must bookmark this blog, which provides readers with a broad selection of undergraduate and graduate concerns, quotes, research, webcasts, and much, much more.” Well, personally I wouldn’t bother to bookmark this site as prospects for upcoming posts are virtually inexistent…

As I am privy to both sites’ admin-pages, let me explain my confusion by comparing their monthly hits. Here’s the full F-un history



After a flurry of activity in the fall of 2008, both posting and attendance rates dropped, and presently the site gets roughly 50 hits-a-day. Compare this to the (partial) NeB history



The whopping 45000 visits in january 2008 were (i think) deserved at the time as there was then a new post almost every other day. On the other hand, the green bars to the right are a mystery to me. It appears one is rewarded for not posting at all…

The only explanation I can offer is that perhaps more and more people are recovering from the late 2008-depression and do again enjoy reading blog-posts. Google then helps blogs having a larger archive (500 NeB-posts compared to about 20 genuine Fun-posts) to attract a larger audience, even though the blog is dormant.

But this still doesn’t explain why FunMath made it to the top 50-list and NeB did not. Perhaps the fault is entirely mine and a consequence of a bad choice of blog-title. ‘NeverEndingBooks’ does not ring like a math-blog, does it?

Still, I’m not going to change the title into something more math-related. NeverEndingBooks will be around for some time (unless my hard-disk breaks down). On the other hand, I plan to start something entirely new and learn from the mistakes I made over the past 6 years. Regulars of this blog will have a pretty good idea of the intended launch date, not?

Until then, my online activity will be limited to tweets.

4 Comments

Return to LaTeX

To most mathematicians, a good LaTeX-frontend (such as TeXShop for Mac-users) is the crucial tool to get the work done. We use it to draft ideas, write papers and courses, or even to take notes during lectures.

However, after six years of blogging, my own LaTeX-routine became rusty. I rarely open a new tex-document, and when I do, I’d rather copy-paste the long preamble from an old file than to start from scratch with a minimal list of packages and definitions needed for the job at hand. The few times I put a paper on the arXiv, the resulting text resembles a blog-post more than a mathematical paper, here’s an example.

As I desperately need to get some math-writing done, I need to pull myself away from the lure of an ever-open WordPress admin browser-screen and reacquaint myself with the far more efficient LaTeX-environment.

Perhaps even my blogging will benefit from the change. Whereas I used to keep on adding to most of my tex-files in order to keep them up-to-date, I rarely edit a blog-post after hitting the ’publish’ button. If I really want to turn some of my better posts into a book, I need them in a format suitable for neverending polishing, without annoying the many RSS-feed aggregators out there.

Who better than Terry Tao to teach me a more proficient way of blogging? A few days ago, Terry announced he will soon have his 5th (!!) book out, after three years of blogging…

How does he manage to do this? Well, as far as I know, Terry blogs in LaTeX and then uses a python-script called LaTeX2WP ’a program that converts a LaTeX file into something that is ready to be cut and pasted into WordPress. This way, you can write, and preview, your post in LaTeX, then run LaTeX2WP, and post into WordPress whatever comes out.’ More importantly, one retains a pure-tex-file of the post on which one can keep on editing to get it into a (book)-publishable form, eventually.

Nice, but one can do even better, as Eric from Curious Reasoning worked out. He suggests to install two useful python-packages : WordPressLib “with this library you can control remotely a WordPress installation. Use of library is very simple, you can write a small scripts or full applications that allows you to automate publishing of articles on your blog/site powered by WordPress” and plasTeX “plasTeX is a LaTeX document processing framework written entirely in Python. It currently comes bundled with an XHTML renderer (including multiple themes), as well as a way to simply dump the document to a generic form of XML”. Installation is easy : download and extract the files somewhere, go there and issue a **sudo python setup.py install** to add the packages to your python.

Finally, get Eric’s own wplatex package and install it as explained there. WpLaTeX has all the features of LaTeX2WP and much more : one can add titles, tags and categories automatically and publish the post from the command-line without ever having to enter the taboo WordPress-admin page! Here’s what I’ve written by now in TeXShop

I’ve added the screenshot and the script will know where to find it online for the blog-version as well as on my hard-disk for the tex-version. Very handy is the iftex … fi versus ifblog … fi alternative which allows you to add pure HTML to get the desired effect, when needed. Remains only to go into Terminal and issue the command

wplpost -x http://www.neverendingbooks.org/xmlrpc.php ReturnToLatex.tex

(if your blog is on WordPress.com it even suffices to give its name, rather than this work-around for stand-alone wordpress blogs). The script asks for my username and password and will convert the tex-file and post it automatic.

5 Comments

Snow leopard + wordpress + latex problem

Ever since I’ve upgraded to Snow Leopard I’ve been having problems with the webserver.

At first there were the ‘obvious’ problems : mysql-connection lost and php-error message. These were swiftly dealt with using the excellent Snow Leopard, Apache, PHP, MySQL and WordPress! advice from ‘tady’.

Right now, access to this blog is extremely slow (and often impossible), certainly via the admin-page. The problem appears to be that most of my CPU is used by lots of pdfetex-processes owned by www. Hence the conjecture that it is a problem with either LaTeXRender or WP LaTeX.

Anyone experiencing a similar problem, or knowing a trick to resolve it? Takk.

Leave a Comment