Not signed in (Sign In)

Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

  • Sign in using OpenID

Site Tag Cloud

2-category 2-category-theory abelian-categories adjoint algebra algebraic algebraic-geometry algebraic-topology analysis analytic-geometry arithmetic arithmetic-geometry book bundles calculus categorical categories category category-theory chern-weil-theory cohesion cohesive-homotopy-type-theory cohomology colimits combinatorics complex complex-geometry computable-mathematics computer-science constructive cosmology deformation-theory descent diagrams differential differential-cohomology differential-equations differential-geometry digraphs duality elliptic-cohomology enriched fibration foundation foundations functional-analysis functor gauge-theory gebra geometric-quantization geometry graph graphs gravity grothendieck group group-theory harmonic-analysis higher higher-algebra higher-category-theory higher-differential-geometry higher-geometry higher-lie-theory higher-topos-theory homological homological-algebra homotopy homotopy-theory homotopy-type-theory index-theory integration integration-theory k-theory lie-theory limits linear linear-algebra locale localization logic mathematics measure-theory modal modal-logic model model-category-theory monad monads monoidal monoidal-category-theory morphism motives motivic-cohomology nforum nlab noncommutative noncommutative-geometry number-theory of operads operator operator-algebra order-theory pages pasting philosophy physics pro-object probability probability-theory quantization quantum quantum-field quantum-field-theory quantum-mechanics quantum-physics quantum-theory question representation representation-theory riemannian-geometry scheme schemes set set-theory sheaf sheaves simplicial space spin-geometry stable-homotopy-theory stack string string-theory superalgebra supergeometry svg symplectic-geometry synthetic-differential-geometry terminology theory topology topos topos-theory tqft type type-theory universal variational-calculus

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome to nForum
If you want to take part in these discussions either sign in now (if you have an account), apply for one now (if you don't).
  1. would it be possible to set up an nLab page with something like an upload box or a blank text box where one can drop in a latex file cick a button and get back its itex conversion? I see that Andrew’s script is still in a developing stage, but it alredy works very nicely (much better than by-hand conversion), so maybe such an automatic conversion page can already be set up.

    • CommentRowNumber2.
    • CommentAuthorAndrew Stacey
    • CommentTimeFeb 28th 2011

    Yes, it would be possible, but no I’m not going to do it. If someone else wants to take the script and host it, then that’s up to them.

    The reason is simple: since TeX is actually a programming language, it is really easy to tie it up in knots. \def\a{\a} will do it. This is a major argument for not having \newcommand in iTeX, by the way (the other is to do with ensuring ease of editing others’ work).

    On the other hand, I am quite happy to make my script publicly available, and to have proper “stable” and “unstable” versions. It is a perl script so all you need is a working installation of perl in order to use it.

    (Also, as it is still very much at the development stage, it isn’t really possible yet to take a LaTeX document and just drop it in; one starts by doing that and then working backwards to implement all the macros that were used but that haven’t been put in to the script yet.)

    • CommentRowNumber3.
    • CommentAuthordomenico_fiorenza
    • CommentTimeFeb 28th 2011
    • (edited Mar 1st 2011)

    The reason is simple: since TeX is actually a programming language, it is really easy to tie it up in knots.

    I see the point.

    On the other hand, I am quite happy to make my script publicly available, and to have proper “stable” and “unstable” versions. It is a perl script so all you need is a working installation of perl in order to use it.

    good! so, Andrew, could you please make a beta version available? (or at least send me a copy via email.. :) ) thanks!

    • CommentRowNumber4.
    • CommentAuthorFinnLawler
    • CommentTimeMar 1st 2011

    I too would find such a script very useful. It’d be great if you could make it available for download.

    • CommentRowNumber5.
    • CommentAuthorAndrew Stacey
    • CommentTimeApr 15th 2011

    With mild apologies for taking a while to do this, I’m pleased to announce the alpha release of this script. You can download it, and read some details about what it can (and can’t) do at the following page:

    Comments, bugs, and other random witterings can be made here, of course.

    • CommentRowNumber6.
    • CommentAuthorFinnLawler
    • CommentTimeApr 16th 2011

    Thanks for this. One minor bug – the script refers to the module tex instead of Text::TeX. I changed it and the errors from Perl went away, but I get no output at all (the program seems to hang) from a small-ish LaTeX file that uses external packages. Does the script choke on commands (like usepackage) that it doesn’t recognise, or could I have tied it up in knots some other way?

    • CommentRowNumber7.
    • CommentAuthorAndrew Stacey
    • CommentTimeApr 16th 2011

    Whoops! Thanks for the bug report on the location. I originally had everything in the same directory, and then I decided that I ought to put things in their “standard” place. Obviously, I didn’t move everything.

    No, external packages aren’t supported. In particular, the \usepackage command isn’t defined. It ought to complain when it reaches something it doesn’t understand rather than just hang. Did you pass the file to it as standard input, or just on the command line? filename

    won’t work, it has to be < filename

    (I ought to fix it so that the first one does work, I’ll put that on the TODO list.)

    Regarding packages, the webpage says:

    In particular, importing a standard package file is almost certainly not going to work. (Indeed, at present, the \usepackage command is not implemented, though the \input primitive is.) The issue is less about the input as the output: it is not possible to automatically know what the correct output should be for the commands from an arbitrary package.

    But that’s not to say that one couldn’t figure out what a package should do and implement a substitute. What packages are you trying to use?

    It’s also worth saying that most of the amsmath stuff is implemented because it’s already supported by iTeX so gets passed straight through.

    Please email (or paste here if it’s short enough) me any file that it chokes on so that I can see if it chokes because of something that ought to be implemented, or something that oughtn’t.

    • CommentRowNumber8.
    • CommentAuthorFinnLawler
    • CommentTimeApr 17th 2011

    It seems my impatience was my undoing – the script runs OK, but quite slowly. It takes about 45 seconds to process the latex.sty and itex.sty files alone. I’ll do a bit more experimenting and let you know how it goes.

    • CommentRowNumber9.
    • CommentAuthorAndrew Stacey
    • CommentTimeApr 17th 2011

    Yes, I forgot to mention that it is incredibly slow. There’s a couple of places I know about that I need to implement a bit better to speed it up, but this is never going to be a fast system: it’s a scripting language, not a compiled program.

    • CommentRowNumber10.
    • CommentAuthorAndrew Stacey
    • CommentTimeJun 21st 2011

    I have a new approach to this problem. There is a saying:

    The only thing that can parse TeX is tex.

    In writing the Perl script, I had to write a style file so that it would know what to do with the itex commands (ie pass them through). I realised that that was actually valid TeX (almost) and so could be run on an ordinary LaTeX document. With a few modifications, that’s what I’ve now done. By sending the result through pdftotext, I get a text file which can then be pasted in to the nLab. The first experiment was equivariant tubular neighbourhoods.

    I finally think that I’ve hit upon the right approach to this problem! (It’s also much, much faster than the Perl script.)

    I’ll post the style file, with instructions, soon.

    • CommentRowNumber11.
    • CommentAuthorMike Shulman
    • CommentTimeJun 23rd 2011

    Just to make sure I understand what this means – you would write a LaTeX document, then by changing the style file you would cause it to compile, not to the way that LaTeX ouptut usually looks, but instead to iTeX input?

    • CommentRowNumber12.
    • CommentAuthorAndrew Stacey
    • CommentTimeJun 24th 2011


    • CommentRowNumber13.
    • CommentAuthorTobyBartels
    • CommentTimeJun 27th 2011

    Genius, sheer genius!

    • CommentRowNumber14.
    • CommentAuthorAndrew Stacey
    • CommentTimeJul 29th 2011

    Okey-dokey, my LaTeX package is now on my webpage. It is very much alpha software, but it’s what I used to do Tom’s article. What you see on converting latex to itex (doriath) is the raw output. I should say, to be absolutely clear, that I had to modify some bits of Tom’s article to make the itex output correct, but I could do those modifications before running it through latex, and also in such a way that it is also possible to produce the original PDF with only one change.

    If anyone has a Wordpress blog, there’s rudimentary support for Wordpress as well (partly because of the new TeX blog). It does the basics, but not maths as yet because I don’t know what output formats I should do first - so if someone here does have a Wordpress blog and would like to use this package to produce their blog posts then tell me what maths system you use and I’ll take it from there.

    Support for other systems is certainly possible to add (such as the cafe!).

    Here’s the link: The content of that page was also written using this package.

    • CommentRowNumber15.
    • CommentAuthorDavidRoberts
    • CommentTimeJul 30th 2011

    Lieven Le Bruyn would be interested in Wordpress/LaTeX interaction - you might drop him a line.