-
Hi all, I work in the Bible world and am investigating reasonably complex layouts including things like 2 or 3 columns with an interlinear Bible (translation and other info under each Heb/Grk word) in one, and different translations aligned vertically in the other(s). Each column might have footnotes. In some versions, Bible book intros would flow across all columns. The resultant PDFs should be nicely viewable online (possibly with some use of colour), as well as detailed enough for printing from (probably black and white only). Of course, the ability to automatically reflow with any updated text would be wanted (thus not wanting to get any kind of GUI software involved), although expecting that some manual tuning of the process would likely be required, e.g., font sizes and column widths, etc.. I've watched SILE get better over the years, but other options like HTML/CSS, with paged.js for example, have also improved markedly in recent years. So I'm interested to hear from the clever people here about how/why/when SILE might be the better "investment". (I was going to use the word "option" there, but obviously either option is going to take a lot of work, and the SILE/Lua option will certainly have a much larger learning curve for us than the more familiar HTML & CSS with a Python or JS script.) Thanks in advance for sharing your comments and experience. P.S. I've heard that there's some Bible orgs that have already tried going down the SILE/Lua path, but haven't discovered any open code repositories yet. (I'm aware that PTXPrint uses XeTeX but, rightly or wrongly, I've been sold on the idea that SILE tech is more modern than the TeX technologies, and hopefully at least as capable???) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Good and fair questions. Obviously as a long standing contributor to SILE who uses it in publishing workflows for several publishing companies, I have a bias in one direction here. That being said I have to admit paged.js has made some enormous strides in recent years and I've seen a lot of pretty good things coming out of it. If your developer pool is deeply familiar with JavaScript and CSS it might not be a bad option. I think it would get the job done and I think the output could be good. I also think SILE can get the job done, and maybe better — but it will take a little more work to get there. You'll spend a bit more time in a terminal and a bit less time looking at pretty page-like-things. But once the work is done having "gotten there" I think you would wind up with more control over the details both large and small. I think most of paged.js's layout functions are roughly comparable to what you can setup with SILE frames as far as changing between frame layouts (single/double/more colums for example) and flowing one content stream, but one thing I don't think it has facilities for are balanced columns where the it isn't one set of content flowing into both frames but two sets of content that need to be aligned. It has margin boxes and ways of aligning them via a hanging mechanism, but I don't that will work for a parallel Bible translation. To my knowledge neither has been used in a full scale Bible production job. I've typeset several few Bible translation with SILE, but so far they are review manuscripts for translation teams so the layout requirements are things like double spaced lines with no hyphenation to make proofreading easier, specifically not two column balanced output. I've done multi-column stuff for other projects, but so far haven't had to put footnotes that span columns for example. I'm sure there would be some little kinks to work out along the way, but I'm not concerned it won't be possible. Here are a couple sample pages of Bible text typeset from USFM. This layout and several others as well are generated in CI every time a commit to the USFM sources lands in the Git repo: Note little things like the footnotes having both an alpha counter and the verse reference they are found in, running headers that track start and end ranges, etc. Those kind of things were trivially easy to setup just by typesetting the incoming data structures. I'm not an expert on paged.js, but I think to do that sort of thing on the HTML side you'd have to do quite a bit of content preprocessing to generate the content to be styled in place rather than having the style itself be able to generate that because you can hook into any part of the typesetter you like. For example I know they have a counter system based on CSS counters as well as a page numbering system, but I don't think you could make a counter that tracked BCV references in context rather than just an incrementing number. I know you could style the alpha counter, but the BCV format would probably have to be you preprocessing and placing the generated content in the footnote itself before it was styled rather than just being the counter formatter. Other considerations are whether you need any low level access to things like the shape of words or glyphs themselves, the internals of fonts, etc. Browser tech keeps that stuff at a much greater distance from you the end user than SILE does. Also, SILE v1.0.0 gets tagged the day we see a full Bible text with the usual ac nutriments go to press without needing any manually fiddling or crazy pipeline hacks on the way (i.e. input your OSIS file and send the PDF to press). At this point I'm pretty sure the holdup is just the state of Bible text projects, not SILE itself. I don't think it will take that much to get SILE there, but there are no projects that are that far along to test it with. |
Beta Was this translation helpful? Give feedback.
-
Interesting and challenging question... You mentioned paged.js and PTXPrint on your way, so I would guess you are presumably looking for a free open source solution to your need. Just clarifying your presumed intent, as it could be an important point in such a decision regarding an "investment" (time and money ?), as there are proprietary/commercial solutions that could be considered as well... They might be costly, but (currently) perhaps more mature... Considering paged.js, it might have its good parts, but the real thing here at stakes is the W3C Paged Media specifications. Some commercial software claim to support these for longer that that - I haven't tested them to that respect, though I know them for other specialized things such as DITA support (an XML schema for technical documentation), XSL-FO support (think CSS redone in XML) etc., (where there also are open source solutions, with a varying mileage ; the commercial solutions have strength and weaknesses too). Regarding W3C Paged Media, it has its trend and it is currently hyped, for good reasons if they achieve their aim. But a few years ago, as of W3C specifications, the trend and hype were on XSL-FO. Guess what? It is somehow claimed to be kind of "dead" nowadays (though it is still widely used in production - most of the DITA toolkits O know of still rely on it for instance). As far as I know, it has only one open source implementation, Apache FOP, which as of yet is still incomplete but does its task for producing very decent PDFs. The paged.js project is a very (very, very) recent open source in that playground. Let's look how it works : they have their W3C Page Media (CSS) overlay, on top of Puppeteer (headless Chrome browser). In other terms, most of the heavy lifting of HTML/CSS is performed by a browser-derived solution. It's not unsound and might make a mark in the future (as browsers do a lot nowadays), but typography is not only about markup and style. It is also about algorithms and there are various area where it currently falls short (at least, as of mid-2021 - this article is in French, but describes a small team's successes and failures with page.js) :
This is not to say the above is not doable with such a solution, but rather than there is some heavy lifting of the source material to make it possible. I suspect it could involve a lot of ad hoc JavaScript code; or pre-processing. Guess what, reinventing a word processing software on top of a browser-based engine. It's very promising, but are they close to it yet? |
Beta Was this translation helpful? Give feedback.
Good and fair questions. Obviously as a long standing contributor to SILE who uses it in publishing workflows for several publishing companies, I have a bias in one direction here. That being said I have to admit paged.js has made some enormous strides in recent years and I've seen a lot of pretty good things coming out of it. If your developer pool is deeply familiar with JavaScript and CSS it might not be a bad option. I think it would get the job done and I think the output could be good.
I also think SILE can get the job done, and maybe better — but it will take a little more work to get there. You'll spend a bit more time in a terminal and a bit less time looking at pretty page-like-…