Re: [NTG-context] Achieving the style of Jean-Luc Doumont
On Mon, 16 May 2022, Stefan Nedeljkovic via ntg-context wrote: > Dear list, > > Years ago I stumbled upon the work of Jean-Luc Doumont. He typesets all his > documents using TeX, although his modified Version called Quantum. His documents are really beautifully typeset. In the book, "Theorems, Maps, and Trees" all paragraphs are typeset as complete rectangles! See a sample here: https://www.principiae.be/book/pdfs/TM > The whole idea of his fascinating approach is that the page is quantized in 2 > dimensions and that all positioning, even graphical elements stick to that > grid. ConTeXt already implements grid snapping in the vertical dimension. For "grid snapping" in the horizontal direction, you need to ensure that all \hskip's are multiple of the grid size. > I'm specifically interested in using this approach for report generation. To > me data I/O is not an issue since I would use a Python script to generate the > markup. You can use layers to position things anywhere on a page. The keys `lines=..., columns=...` work almost like a grid. See the details manual for examples of grid snapping and layers. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ignore not closed tags in XML input
> On 16 May 2022, at 18:50, Pablo Rodriguez via ntg-context > wrote: > > On 5/16/22 17:30, Hans van der Meer via ntg-context wrote: >> Can't you use an editor with grep, searching for something like the >> pattern ? > > Many thanks for your reply, dr. van der Meer. > > If I want to typeset the whole book > (https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/), I will > have to download and sanitize over 20 HTML files. Which can be done with a couple of command lines. Xmllint usually does a good job of cleaning up dodgy html input: xmllint --html --xmlout > (As good as can be expected from a program, anyway). > It is really a pity that ConTeXt cannot totally ignore any given XML elements. This statement is a little unfair: the problem is exactly that your input is NOT proper XML. If it was proper XML, ConTeXt would not have problems with it. ConTeXt explicitly has the capability to handle XML files, which your input simply is not. In fact, it is sloppy HTML-esque data that modern webbrowsers happen to be able to handle more or less correctly. It is not valid HTML either, because valid HTML has to be valid SGML, which your input clearly is not. That said, Tools like xmllint exist for this stuff. Just write a small batch driver file in some scripting language ((power)shell, lua, python, perl, etc.) to preprocess the HTML stuff into clean XML, and you should be fine. Taco — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ignore not closed tags in XML input
On 5/16/22 17:30, Hans van der Meer via ntg-context wrote: > Can't you use an editor with grep, searching for something like the > pattern ? Many thanks for your reply, dr. van der Meer. If I want to typeset the whole book (https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/), I will have to download and sanitize over 20 HTML files. And I’m afraid this is only for a single PDF output. It is really a pity that ConTeXt cannot totally ignore any given XML elements. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ignore not closed tags in XML input
On 5/16/22 17:22, mf via ntg-context wrote: > See HTML-tidy, > > https://www.html-tidy.org/ > > it could help you pre-processing your HTML files. Hi Massi, the problem is that they aren’t my HTML files and that this is a very common error. I’m afraid that pre-processing could work for a few files, but this solution wouldn’t work if I would like to use it with any HTML file that I could need. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ignore not closed tags in XML input
Can't you use an editor with grep, searching for something like the pattern (with appropriate escapes of course). dr. Hans van der Meer > On 16 May 2022, at 17:08, Pablo Rodriguez via ntg-context > wrote: > > Dear list, > > I would like to feed > https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/001.html as > XML input for ConTeXt. > > The problem is that (as many other XML files that I haven’t generated > myself) some and tags aren’t closed, such as in: > > > https://fonts/css?greek; rel="stylesheet"> > > > So, all that I get is the following message: > > invalid xml file - parsed text > > Unsuccessfully I have tried the following: > > \xmlsetsetup{#1}{html/head/(meta|link)}{-} > > Is there no way to make ConTeXt more tolerant, so that it is able to > ignore those tags? > > Many thanks for your help, > > Pablo > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ignore not closed tags in XML input
See HTML-tidy, https://www.html-tidy.org/ it could help you pre-processing your HTML files. Massi Il 16/05/22 17:08, Pablo Rodriguez via ntg-context ha scritto: Dear list, I would like to feed https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/001.html as XML input for ConTeXt. The problem is that (as many other XML files that I haven’t generated myself) some and tags aren’t closed, such as in: https://fonts/css?greek; rel="stylesheet"> So, all that I get is the following message: invalid xml file - parsed text Unsuccessfully I have tried the following: \xmlsetsetup{#1}{html/head/(meta|link)}{-} Is there no way to make ConTeXt more tolerant, so that it is able to ignore those tags? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] ignore not closed tags in XML input
Dear list, I would like to feed https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/001.html as XML input for ConTeXt. The problem is that (as many other XML files that I haven’t generated myself) some and tags aren’t closed, such as in: https://fonts/css?greek; rel="stylesheet"> So, all that I get is the following message: invalid xml file - parsed text Unsuccessfully I have tried the following: \xmlsetsetup{#1}{html/head/(meta|link)}{-} Is there no way to make ConTeXt more tolerant, so that it is able to ignore those tags? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Achieving the style of Jean-Luc Doumont
Dear list, Years ago I stumbled upon the work of Jean-Luc Doumont. He typesets all his documents using TeX, although his modified Version called Quantum. The whole idea of his fascinating approach is that the page is quantized in 2 dimensions and that all positioning, even graphical elements stick to that grid. I'm attaching a link to a presentation by him in which he gives some fragments of code that I, unfortunately, have a hard time understanding. I'm interested in replicating this 2d grid in Context. How would one go about enforcing such strict 2d organization? As I get it he does a lot of manual tweaking, and his documents are less automated and more hand crafted than a typical Context document. I'm specifically interested in using this approach for report generation. To me data I/O is not an issue since I would use a Python script to generate the markup. I know the question is pretty general, but any pointers would be welcome. Maybe the first thing useful would be the grid and how to position everything in accordance with it. I envisioned this thread more for discussion and suggestions than a complete recreation of his ideas. As I learn Context and Metapost, I hope I will figure out how to recreate his work. Sorry for the blog post :) Link to files: https://drive.google.com/drive/folders/1KpYbDlukvSCirKkFvJICOX3wABl_83bW?usp=sharing Sincerely, Stefan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt meeting 2022: registration is open!
The sixteenth ConTeXt meeting will take place in Dreifelden, Germany on September 12–18, 2022 You are cordially invited to join the 16th ConTeXt meeting. The meeting will host ConTeXt and Lua(Meta)TeX developers and users and gives you the opportunity to present your results, experiences and ideas on future development. The talks will be followed-up by tutorials on different ConTeXt and Lua(Meta)TeX techniques. For further information and registration see the homepage: https://meeting.contextgarden.net/2022/ Looking forward to seeing you in fall: Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___