6

Compared to LaTeX (as a set of macros, a "language", not as the latex implementation), there are far fewer ConTeXt documents available. Yet ConTeXt seems really interesting and I want to explore it a bit more.

What I would be very interested in is a kind of Rosetta stone for LaTeX and ConTeXt. In other words, a complex document (say, > 20 pages with graphics, possibly using metafun or tikz) whose sources are available in both LaTeX and ConTeXt. The final PDFs have to be (nearly) identical and the sources should compile with TeXLive 2016.


I am aware this kind of questions is borderline on a stackexchange site, but I really believe that if such documents exist and are clearly identified somewhere, it could greatly help people to grasp what the differences are and how to quickly convert to another system (with its own idioms, etc.). This could also end up as a community answer.


Edit:

What I mean by "(nearly) identical" is that I am aware that the final result cannot be exactly the same PDF (or maybe it can with a large number of low-level modifications). But that's not the point.

The sources should only be identical in intent: i.e. same content, same page size, same layout, etc. But if one backend has a different line-breaking, kerning, etc. algorithm, it is fine. I don't care about the PDF, I care about the source of sufficiently complex documents, with the additional constraint that these sources should, in principle, result in the same document.

JohnW
  • 183
  • 2
    This is highly improbable because pdfTeX, XeTeX, and LuaTeX produce different line breaks. See also What are the incompatibilities of pdftex, xetex and luatex?. – Henri Menke Sep 27 '16 at 15:20
  • 1
    I was not precise enough: this is what I had in mind saying "(nearly) identical". What I really meant was that the sources should be set up to obtain the same result (i.e. the same text, same sectioning, same layout, etc.), in other worlds should provide the same content in the same way in spirit. There will be small differences like line-breaks as you said but my purpose is not to compare the final result but to compare the sources. :) – JohnW Sep 27 '16 at 16:38
  • 2
    Maybe you could write the content in markdown and convert it to LaTeX and ConTeXt via pandoc. You would probably want to create a set of custom templates to help ensure greater consistency. Since it would be auto-generated, it probably wouldn't be as 'clean' as what adept LaTeX- and ConTeXt-users produce, but it would give you a sense. – jon Sep 27 '16 at 16:52
  • context garden has lots of example – percusse Sep 27 '16 at 16:53
  • @percusse Really? Of largish complex documents with the corresponding complete LaTeX source too? – JohnW Sep 27 '16 at 16:54
  • 1
    Some functionalities are not compatible. ConTeXt is better at certain things LaTeX at other stuff. – percusse Sep 27 '16 at 17:10
  • No: the ConTeXt Garden does not make a point of providing any LaTeX documents (as far as know / have seen). And while I agree with @percusse that each format has their relative strengths and weaknesses, there is nothing wrong with you creating a test suite for your own purposes. But you're probably going to need to invest the time, which is why I suggested pandoc: it'll allow you to hit the ground running. – jon Sep 27 '16 at 18:23
  • I already voted to close as »too broad« but after the edit it might be a possible duplicate of Looking for ConTeXt examples. – Henri Menke Sep 27 '16 at 18:28
  • @HenriMenke I don't see what is broad about this. Question is where one can find the same document output with two different source. – percusse Sep 27 '16 at 18:48
  • HenriMenke this is exactly as percusse said: as soon as I get an example, the question is answered. jon I have already tried with pandoc, which is nice to some extent (it's truly a good way to get started). The only problem is (and I hope you won't see that as nagging) that it doesn't really generate idiomatic documents (at least for LaTeX). – JohnW Sep 28 '16 at 14:11

1 Answers1

7

Although they are not complete examples, Aditya Mahajan's series of articles in TUGboat might be useful to look at: http://tug.org/TUGboat/Contents/listauthor.html#Mahajan,Aditya

He wrote about the ConTeXt way to do various basic things. Hope this helps.

Karl Berry
  • 2,102
  • 1
    Indeed, they are useful for someone in the process of learning ConTeX. These are also referenced on contextgarden. However my question is not about how to learn ConTeX or what the main differences are in theory (these domains are already pretty well covered in contextgarden). I am looking for a large documents that can be produced using both a(ny) LaTeX implementation and ConTeX. A bit like the pgfmanual which can be compiled using almost any LaTeX implementation out there. But if that does not exist, so be it! :) – JohnW Sep 28 '16 at 14:17