Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
1 to 22 of 22
I've never tried it, but I presume you've seen this?
The nLab uses some sort of LaTeX plugin for instiki called iTeX
Fellow Opera user? Yay!
Instiki does use iTeX to convert the mathematical expressions to MathML. If you can run Instiki, you can run iTeX but you have to do it explicitly. I've never tried compiling it on a windows machine, but so long as you can install the dependencies then you shouldn't have any difficulty. I keep the nLab version of Instiki very close to the official one - the only changes are some stuff to do with logging so don't affect any of the rendering or "public" aspects of the software. So if you have Instiki+iTeX then you will be fully able to compose pages as you like.
If you want to compose stuff for the nLab offline then I recommend that you stick as close to the nLab set-up as possible. For your own wiki, then of course you can use whatever you like. There are several methods of converting mathematical syntax to something that a browser can understand, the full details are on the instiki instiki. If it is only for "personal use" then I have no particular recommendations. If for public, then I strongly advise against anything that needs excessive client-side rendering. One major strength of the instiki setup is that all the conversion is done server-side. What javascript there is is fairly minor and (probably) completely unnecessary for most users.
(If you do intend to add extra javascript, there are better ways to do it than that described by Jonas. That method would break if the main 'page_helper.js' file got updated. Better is to modify the page renderer template. I can help with that if that is the way you want to go.)
Links: * The main instiki instiki: http://www.instiki.org/ * Jacques Distler's instiki: http://golem.ph.utexas.edu/instiki/show/HomePage * My notes from setting up the nLab: http://www.math.ntnu.no/~stacey/HowDidIDoThat/nLab/nlab.html
(Note that I was migrating the nLab from one setup to another and that introduced many hiccoughs. A fresh install wouldn't have most of those.)
Any further questions, feel free to ask. This is an absolutely fine place to ask about setting up Instiki.
The problem with links in headers is not a bug, it's fairly unavoidable. It's to do with the automatic table-of-contents. That creates links to each header using the header text as the link text. If that already contains a link then this creates a double link, which is invalid XHTML. So it fails. Of course, it would be useful if it failed with a little more information, but that's another issue. So you can have links in headers, but only if that header is not contained within a table-of-contents.
Andrew suggested that I report on my progress and my problems, so here it is (most information can be found on the help pages and in the readme files):
First you need a C-compiler (Windows does not come with one), so my choice was to install cygwin (current version is 1.7.5). Cygwin is a Windows-Emulation of a Unix-Shell with all those useful command line tools that everybody will miss who worked with Unix before. You have to tell the installer that you need all the gcc tools, these will not be installed by default.
You need Ruby, so I chose to use the version 1.8.7 "one click installer" for Windows.
Download Instiki version 0.17. Since Ruby is installed, you can simply start Instiki and it works, only the rendering of Tex does not. But somehow I ran in an odd situation I don't fully understand: Cygwin has a rbconfig-file that specifies the operating system. Oddly enough it sets it to "cygwin". Well, the real problem is in the file "instiki-0.17\vendor\plugins\sqlite3-ruby\lib\sqlite3\driver\dl\api.rb", because this tests an input string of equality with "win32" to test if it runs on windows, but when I execute it, the input string is "i386-ming32", which results in a fatal error. I'm not entirely sure how this comes, but I helped myself by adding this case to the api.rb, which is a hack (never change software that you don't own).
For Tex support as in the nLab you need itex2MML. The distribution contains the C-Sources and make-Files, but no Windows-Binary (which makes sense), but in a first step you can use the make of cygwin to compile a Windows-Executable itex2MML.exe.
Now we need a bridge from Ruby to the itex2MML.exe, the README of the itex2MML-Distribution tells how: You have to download SWIG, a tool for creating bridges between C resp. C++ and a bunch of other programming languages.
Use the MAKEFILE of the itex2MML to compile a itex2MML.so. itex2MML thankfully has Unit-Tests, too, that should be executed now (I don't know exactly what they do, but I guess I don't need to, because they reported no error).
I have to put both itex2MML.so and itextomml.rb files in one of the directories that my Ruby installation searches for libraries - on a Unix machine this obviously is done by the install_ruby - target of the makefile, but that puts the files in the cygwin-directory and my Ruby does not look into that (because I did something wrong, I guess).
Right now I have two problems, one simple, one not so: the itex2mml.rb loads two modules:
require 'stringsupport'
require 'itextomml'
The first one is not found on my machine, which results in a "itextomml not found - " error message, because the author thought that the case 'stringsupport not found' is impossible :-) Well, I guess I will have to download that module somehow.
The second statement finds the itex2MML.so file and then runs into the error "126: module not found". I guess that 126 is a line number or something, and the module that is not found is the itex2MML.exe
I tried to put itex2MML.exe and a renamed itex2MML in the same folder als the itex2MML.so and put both on the path (these four combinations one after the other), which did not change the error message. So now I'm stuck. But since that is an itex2MML-installation problem I guess I will have to pester Jaques Distler.
A safe place to put the itextomml.rb and itex2MML.so files is in the ’lib’ directory of the instiki installation itself. My installation of instiki has ’stringsupport,rb’ already in that directory so I really think that it is the ’require itextomml’ that is not working. I remember having troubles with this on the nlab - trying to ensure that ruby looked in the right places, but decided that it was quickest just to put itex directly in the instiki directory.
You don’t need the binary, by the way. The ’swig’ stuff allows ruby to look right into the C++ library file (itex2MML.so) which is faster than calling a binary.
So: put itextomml.rb and itex2MML.so into the ’lib’ directory of the instiki installation itself and see if that works.
Ok, that seems to have done something :-)
Now nothing happens when I submit a page, no logging message, nothing. The last logging message I see is the processing of the edit request.
Any idea?
Hmm. Are you running it via the command line - with the inbuilt webserver? That is, no proxying behind another webserver and you can see the logs on the command line?
If you have the sqlite3 tools installed, you can check the database itself to see if anything got through. But it’s really bizarre not to see any message and yet nothing happen at all.
I start it with the inbuild webserver via the instiki.bat, no proxying, logs on the commandline.
Checking the database is a good idea - but is there a way to increase the logging level itself?
I don’t know how to increase the logging. There might be more recorded in the actual logs, rather than just on the command line. They’re in the “log” directory.
Unfortunatly not, command line and log file contain the same information...
Okay, try running it in “development” mode. In Unix, I would do this by typing:
RAILS_ENV=development ./instiki
Cygwin is probably the same. If not, try
export RAILS_ENV=development
./instiki
(or whatever you use to call instiki.) That should increase the debugging level (it will also mean that it uses a different database, so don’t be surprised when everything you’ve done so far doesn’t seem to be there!).
If cygwin complains about the syntax, then also tell me the result of echo $SHELL
in your next post.
I think I succeeded in setting that variable, by setting it as an environment variable in Windows. At least I got a few more messages. Is there a foolproof way to test the variable is set? But I did not get any helpful information on the problem.
The situation is this: I can do everything except submitting pages with changes that have tex - content (). If I delete the itex2MML.so file from the lib directory of Instiki, then this works too except that the formula is not rendered as tex, but displayed as the string literal between the $-signs. So, there must be a problem with the call to tex2MML.so. As I said before, I can compile the provided sources of itex2MML without error, and can execute the provided unit tests without error (make targets “ruby” and “test_ruby”).
echo $RAILS_ENV
to test that it’s set.
Do you still have the binary that you complied in the lib
directory? The ruby file itextomml.rb
has the line require 'itex2MML'
. Normally, it will actually load the file itex2MML.so
because the .so
extension is added. However, it may be that that extension is only added if the specifically named file does not exist. So if you have itex2MML
in that directory then it is trying to load that, failing, and failing badly.
So I would clean out all the itex stuff that you’ve scattered around your hard drive, remake the ruby files (do make clean
first), and put just itextomml.rb
and itex2MML.so
into the lib
directory of instiki.
Quite a display of endurance on your part, thanx, I appreciate that :-)
echo $RAILS_ENV
That’s the way it is if I work with a Unix shell, but I start Instiki via the Windows command shell using the instiki.bat, and don’t know how it works there. I’ve also tried starting Instiki with cygwin via the instiki-shell skript. It starts, and when I try to load the home page I get the generic error page of the web server (I guess), without further information to be found anywhere. (That’s cute, BTW, it says “Something very bad just happend. I just know it. Do you smell smoke?” You should not display messages like these to customers who paid you 1 million bucks for the system, though, they can get quite aggressive).
Maybe I should look further into that.
So I would clean out all the itex stuff that you’ve scattered around your hard drive, remake the ruby files…
Good point, did that. But the fact that
If I delete the itex2MML.so file from the lib directory of Instiki, then this works too…
made me expect that Instiki uses the itex2MML.so from it’s lib-directory, and, unfortunatly, that seems to be true and the situation is still the same. That file is now the only file with the name “itex2MML.so” and there is no file with the name “itex2MML” on my computer. Does the itex2MML.so have further dependencies? Or is it standalone? Maybe I should try the whole stuff from scratch on a different computer.
If someone paid me $1 million then I wouldn’t display that error message!
Hmm, I’m at a bit of a loss, now. I’m beginning to wonder if it’s a difference between Cygwin and Windows. You’ve compiled itex with gcc from Cygwin, right? But are running Instiki from a normal Windows shell. The itex module is unlikely to be statically linked so will itself depend on some other libraries. Those libraries will be on your system (otherwise you couldn’t have compiled itex), but maybe only Cygwin knows where they are. So you may have to define some more environment variables to tell Windows where to find Cygwin’s libraries. On Unix, this would be LD_LIBRARY_PATH
but I don’t know about Windows - if Cygwin has an easy-to-find start-up script, looking at that might help.
If you do ruby -e "require itextomml.rb"
inside the lib
directory of instiki, that ought to just do nothing. If it complains, the error message may be more informative than that you’ve been getting.
have to run, but wanted to clarify: I do not get the million, that is distributed over collegues, bosses, share holders, diverse institutions of the German government and a tiny rest lands in my hand. Enough to live, though. But if you present the software to the customer in a meeting, than of course you represent the guys who cashed up and then made fun of it.
Tim! I didn’t think you did! I didn’t associate that remark with anything you do, just a general comment on the helpfulness of error messages (which I fully admit are not as helpful as they could be).
1 to 22 of 22