[docbook-apps] DocBook themes

2020-08-03 Thread Norman Tovey-Walsh
Hi folks,

I did some work over the weekend on “themes” for DocBook documents
published with the xslTNG stylesheets. Mostly this is to support a dark
mode in aid of accessibility.

I wrote a weblog posting about it:
https://so.nwalsh.com/2020/08/03-docbook-themes

Be seeing you,
  norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Men are not sufficiently perfect to exercise justice in the name of
> virtue: the rule of life should be indulgence and kindness of
> heart.--Anatole France


signature.asc
Description: PGP signature


[docbook-apps] DocBook xslTNG version 1.2.0 released

2020-07-30 Thread Norman Tovey-Walsh
Hi folks,

Hopefully frequent release announcements won’t be too distracting. I
expect the pace will slow down after the obvious kinks are sorted out.

* Reworked CALS table formatting to fix #48. Starting with this release,
  it should be possible to process arbitrarily long tables. This is
  accomplished by processing the tables in a single forward pass.
  Consequently, it is no longer possible for the stylesheets to work out
  the align-char-width by inspecting the cells in the column. If an
  align-char-width is not specified with a PI, the default
  $align-char-width will be used.

* Updated the documentation in the reference guide to be explicit about
  build prerequisites. (Fix #49.)

* Changed the default chunking rules so that the first section of a
  chapter, appendix, or other component is included in the chunk with
  that component. This will improve the presentation of components that
  have only a short amount of introductory material before the first
  section (and greatly improve the presentation when there is no
  introductory material before the first section). (Fix #45.)

* Updated the JavaScript libraries to avoid use of .replaceAll() which
  is not yet widely (enough) supported. (Fix #52.)

* Updated the CSS for admonitions so that it’s more easily configured
  with CSS variables. I tweaked the presentation of code inside
  admonitions to avoid contrasting background colors that I found
  aesthetically problematic.

* Changed the CSS for literal so that it will imply white-space: nowrap.
  Adding a role="break" will return white space to normal.

* Documented that building on Windows does not work. (Close #44.)

* Added trademark marks (™,℠,©,®) for the trademark element. For the
  moment, this is done with ::after in CSS rather than putting the marks
  explicitly in the HTML output.

* Changed package, markup, token, returnvalue, type, and errorcode
  formatting to use code instead of span.

Be seeing you,
  norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Why do writers write? Because it isn't there.--Thomas Berger


signature.asc
Description: PGP signature


Re: [docbook-apps] DocBook XSL: The Next Generation

2020-07-30 Thread Norman Tovey-Walsh
> I suspect I'm not part of this "we", but for a different "we": we get
> them via dblatex + (Xe)LaTeX.

Yes. I’m interested in this too. Peter Flynn and I have corresponded on
the topic a few times.

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> When you don’t create things, you become defined by your tastes rather
> than ability. Your tastes only narrow and exclude people. So
> create.--Why the Lucky Stiff


signature.asc
Description: PGP signature


Re: [docbook-apps] DocBook XSL: The Next Generation

2020-07-30 Thread Norman Tovey-Walsh
> Thanks Norm. Yes, that can be an interesting way. I've heard about that, but 
> I'm not so much into this topic ATM. As far as I know, the above tools are 
> commercial. Do you know an open source solution?

https://www.print-css.rocks/ lists a couple in addition to AH and
PrinceXML. I haven’t tried them. I’m surprised there aren’t more, TBH.

> I can fully understand your position. :) I'm sure it's fun, especially when 
> you come from a XSLT 1.0 background. That's a huge step forward. On the other 
> side, it's also a huge task, I guess. ;)

It’s bigger than a bread box, perhaps, but it’s not a gargantuan task.
The FO stylesheets in the 1.0 and 2.0 projects probably contain most of
the answers one needs, it’s just a question of restructuring them into
modern, XSLT 3.0 with a rationalized set of options.

Be seeing you,
          norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> 'All is vanity,' saith the Preacher. But if all were only vanity, who
> would mind? Alas, it is too often worse than vanity: agony, darkness,
> death also.--Thomas Hardy


signature.asc
Description: PGP signature


Re: [docbook-apps] Validating against Schematron

2020-07-30 Thread Norman Tovey-Walsh
Richard Hamilton  writes:
> Running it using docbook.sch, I get a namespace error on db:, which is
> strange, since db is properly declared in the Schematron file. I even
> modified a test file so that it also used the prefix db: defined the
> same way, but no luck.

If I grab the latest 5.2 repo and build it, jing (20181222) validates
src/test/docbook/pass/article.001.xml with build/docbook.sch without any
errors.

And if I take out the version attribute, I get:

$ jing build/docbook.sch src/test/docbook/fail/article.001.xml
/Users/ndw/Projects/docbook/docbook/src/test/docbook/fail/article.001.xml:1: 
error: assertion failed:
  If this element is the root element, it must have a version attribute.

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> The greatest of all secrets is knowing how to reduce the force of
> envy.--Cardinal De Retz


signature.asc
Description: PGP signature


Re: [docbook-apps] DocBook XSL: The Next Generation

2020-07-29 Thread Norman Tovey-Walsh
>> The goal of the stylesheets is to produce clean, semantically rich
>> HTML(5) that can be beautifully rendered with CSS (and a dash or two of
>> JavaScript, if you wish) in the browser and in print. [...]
>
> Just for clarification: how do we get PDF thesedays?
>
> Does the new stylesheets create PDFs through a HTML -> browser -> PDF 
> workflow? Or will there be separate XSL-FO stylesheets at some day?

My current thinking is that HTML+CSS through some tool like AntennaHouse
Formatter or PrinceXML (or other similar tools) is the way forward. If I
had the time, I’d be happy to work on XSL FO stylesheets. But I don’t
want to do the job badly and I don’t have the time to do it well.

The xslTNG distribution includes HTML-for-paged-media customizations
that (almost) generate reasonable results. I’ll have a PDF version of
the reference guide as an example “real soon now”. (There are a couple
of issues I still want to fix.)

I know that some folks will be disappointed by the lack of XSL FO
support. Programming in XSLT 3.0 is fun, if someone wants to work on the
task! :-) All I ask is that they be well tested and well documented.

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> You look wise. Pray correct that error.--Charles Lamb


signature.asc
Description: PGP signature


[docbook-apps] DocBook XSL: The Next Generation

2020-07-28 Thread Norman Tovey-Walsh
Hello world,

A few days ago, I released the first version of the DocBook xslTNG
Stylesheets. These are a complete rewrite of DocBook to HTML stylesheets
in XSLT 3.0.

The goal of the stylesheets is to produce clean, semantically rich
HTML(5) that can be beautifully rendered with CSS (and a dash or two of
JavaScript, if you wish) in the browser and in print. I’ve done my best
in all cases to make sure that the presentations are accessible. If you
find something that isn’t accessible, please report it.

I made the 1.1.1 release yesterday. (The small fix over 1.0.0 from
Friday is that annotations are now more accessible.)

See https://xsltng.docbook.org/ for details.

Or https://so.nwalsh.com/2020/07/25-docbook-xsltng for more blather
about it from me.

Be seeing you,
  norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Wit consists in seeing the resemblance between things which differ, and
> the difference between things which are alike.--Madame De Stæl


signature.asc
Description: PGP signature


Re: [docbook-apps] Thumb register

2020-07-20 Thread Norman Tovey-Walsh
Tony Graham  writes:
> On 19/07/2020 18:13, Bernhard Kleine wrote:
>> I have used a thumb register in a book produced with LaTeX. That was
>> fairly straight forward. I wonder whether this is also possible with
>> docbook -> PDF. Is there a solution already?
>
> There is a 'Thumb index' sample in the XSL-FO samples page at
> https://www.antennahouse.com/xsl-fo-samples

That’s the one I was going to point to (once I got a clue!).

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> There is no monument dedicated to the memory of a committee.--Lester J.
> Pourciau


signature.asc
Description: PGP signature


Re: [docbook-apps] Thumb register

2020-07-20 Thread Norman Tovey-Walsh
Bernhard Kleine  writes:
> I have used a thumb register in a book produced with LaTeX. That was
> fairly straight forward. I wonder whether this is also possible with
> docbook -> PDF. Is there a solution already?

Pardon my ignorance, but what is a “thumb register”?

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> The real art of conversation is not only to say the right thing at the
> right place but to leave unsaid the wrong thing at the tempting
> moment.--Dorothy Nevill


signature.asc
Description: PGP signature


Re: [docbook-apps] using olinks everywhere?

2020-07-12 Thread Norman Tovey-Walsh
Dave Pawson  writes:
> (Waiting for @ndw to read your post)
> I think he is playing with an alt to such links, build for Summer conf 
> present.
> I couldn't find it searching his blog posts...

I’m afraid I haven’t tackled the more interesting corners of olink yet.

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> There is no such thing as a moral or immoral book. Books are well
> written or badly written.--Oscar Wilde


signature.asc
Description: PGP signature


Re: [docbook-apps] Biblioentry markup standards -- identifying the type of entry

2020-06-11 Thread Norman Tovey-Walsh
Richard Hamilton  writes:
> I’m posting this to the DocBook mailing list, but double posting do
> DocBook-apps because the discussion started on that list.
>
> Background: I’ve been using bibliomixed for XML Press publications. I
> would like to move to using biblioentry, so I can cover more than one
> output style. We primarily use the Chicago Manual of Style as our
> guide, but I would like to be able to easily use other styles.

The bibliography stuff is a bit of a mess. It was originally cribbed
from the Majour[1] standard in the very early 90’s, I believe, on the
assumption that reuse was better than reinvention. I’m not sure what
happened to Majour after that.

> My objective is to create (over time) customizations that would take a
> biblioentry in a consistent format and generate output that conforms
> to Chicago, APA, and other styles.

I’m going to repeat myself and say that I think adopting a mechanism for
generating them that reuses BibTeX or the open citation work I pointed
to before or something else is better than one-offing it. There’s *A
LOT* of variation in how citations are published.

> This first issue I’ve uncovered is the question of how to identify
> what kind of entry an instance is (e.g., book, article, etc.).
>
> I can find no standard method for doing that in DocBook, including the
> Publisher’s schema..

I think your best bet is:


  DocBook: The Definitive Guide

> Certain types can be guessed at by looking at biblioset (if it’s used)
> or the pubwork attribute on citetitle (if citetitle is used rather
> than title).

I think the title in a bibliography entry is more semantically a title
citation than a title, so that’s my preference anyway. (In DocBook, a
 is usually the the title of a thing, and that’s not what is
going on in a bibliography.)

> complexity. And citetitle seems not to be the best choice for
> expressing a title in this context (especially if you want to separate
> out a subtitle).

Yeah, that’s a fair point. Maybe I’m just wrong about citetitle.

> So, am I missing something here, or is there no standard method for
> defining the type of a biblioentry?

Apparently not.

> If there isn’t an established method, does anyone have any ideas on
> how best to do this?

Add pubwork to biblioentry?

Be seeing you,
  norm

[1] 
https://www.abebooks.com/MAJOUR-DTD-Article-Headers-Modular-Application/3384898287/bd

--
Norman Tovey-Walsh 
https://nwalsh.com/

> I wonder if other dogs think poodles are members of a weird religious
> cult.--Rita Rudner


signature.asc
Description: PGP signature


Re: [docbook-apps] Building docbook instances.

2020-06-10 Thread Norman Tovey-Walsh
Dave Pawson  writes:
> I am wondering if anyone has used xproc with docbook,
> and if so, how have you found it?

It’s an integral part of the DocBook XSLT 2.0 Stylesheets, so I’d have
to say it works fine :-).

Be seeing you,
  norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Nothing in all the world is more dangerous than sincere ignorance and
> conscientious stupidity.--Martin Luther King, Jr.


signature.asc
Description: PGP signature


Re: [docbook-apps] Bibliographic styling

2020-05-25 Thread Norman Tovey-Walsh
Richard Hamilton  writes:
> Is the following correct?

[ Not intending to speak for Peter… ]

> - CSL encodes the details of how a particular style works. It provides
> a machine readable set of instructions that can be used by a processor
> to generate output that follows a particular citation style.

Yep. 

> - To use CLS with DocBook, you could write a stylesheet that would
> take a biblioentry and format it based on the contents of a particular
> CSL file. You might do that as a pre-processor and convert biblioentry
> into bibliomixed, or you could convert directly from biblioentry into
> fo, html, etc.

Also, yep.

> - Or, at least for HTML, you could convert a biblioentry into CSL-JSON
> and convert it to HTML with citeproc-js or pandoc-citeproc. I haven’t
> tried out citeproc-js or pandoc-citeproc, so I could be way off on
> this one.

That might actually be the only short-term practical solution. I’ve
filed a few bugs on the CSL spec and its test suite. Near as I can tell,
what actually exists is a reference implementation (citeproc-js) and a
specification that only incompletely describes the behavior of that
implementation.

I still might poke at a DocBook+CSL to HTML stylesheet, but my
enthusiasm as waned significantly. A third party implementation of CSL
is going to fail tests in the test suite. The specification is not going
to reflect why those tests *should* pass, and the only recourse is going
to be to reverse engineer the citeproc-js implementation (either
literally or by making something that’s bug-compatible; in as much as I
assert that an implementation that doesn’t conform to the specification
is buggy). Kind of disappointing, really.

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> The common excuse of those who bring misfortune on others is that they
> desire their good.--Vauvenargues


signature.asc
Description: PGP signature


Re: [docbook-apps] Bibliographic styling

2020-05-24 Thread Norman Tovey-Walsh
> limited to CMOS. (Although having CMOS would be a major bonus for me.)
> The Github repo for the CSL styles are
> https://github.com/citation-style-language/styles
> There are a few on that list I would find extremely helpful.

I spent a few hours today poking at it and filed about a half dozen
bugs. I think it’s probably doable; I plan to spend a little more time
on it tomorrow, but no promises beyond that.

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Wandering in a vast forest at night, I have only a faint light to guide
> me. A stranger appears and says to me: "My friend, you should blow out
> your candle in order to find your way more clearly." This man is a
> theologian.--Diderot


signature.asc
Description: PGP signature


Re: [docbook-apps] Bibliographic styling

2020-05-23 Thread Norman Tovey-Walsh
> Would it be possible to step back a level and work on it in combination
> with CSL? https://citationstyles.org/ That way, it would not just be
> limited to CMOS. (Although having CMOS would be a major bonus for me.)
> The Github repo for the CSL styles are
> https://github.com/citation-style-language/styles
> There are a few on that list I would find extremely helpful.

Oh, yes! That definitely looks promising!

Be seeing you,
      norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Westheimer's Discovery: A coupla months in the laboratory can save a
> coupla hours in the library.


signature.asc
Description: PGP signature


Re: [docbook-apps] Bibliographic styling

2020-05-23 Thread Norman Tovey-Walsh
Richard Hamilton  writes:
> I’m thinking of taking on the task of creating a docbook
> customization, similar to the iso690 customization, to process
> bibliographic information in the Chicago Manual of Style format.
>
> Before I dive in head first, I thought I’d check with the group to see
> if anyone has already done that.

I wonder if it would be possible to describe the format in some
declarative way and either derive the stylesheet from that or interpret
it?

I looked briefly at doing that with BibTeX once, but that seemed a
little too challenging for the amount of free time that I have (which is
generally measured in negative numbers).

> To streamline the markup of inline references to bibliographic
> entries, I wonder whether it would stretch the standard too far to
> interpret a linkend in a citetitle as pointing to a bibliographic
> reference and process it as though it were a biblioref immediately
> following the citetitle. So, for example,
>
> DocBook XSL: The 
> Complete Guide
>
> would be interpreted as equivalent to  pubwork=“book”>DocBook XSL: The Complete Guide linkend=“ref.stayton2007”/>

That doesn’t seem unreasonable to me. What I tend to do myself, however,
is just the following:



Which I then render inline as the title from the bibliography entry with
whatever styling seems appropriate. Saves me from having to type the
titles each time.

> But, to take it a step further, how about interpreting  pubwork=“book” linkend=“ref.stayton2007”/> the same way, but pulling
> the title from the referenced biblioentry/bibliomixed element when the
> citetitle element is empty.
>
> Any thoughts?

That’s what biblioref is for? :-)

    Be seeing you,
  norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Next to knowing when to seize an opportunity, the most important thing
> in life is to know when to forego an advantage.--Benjamin Disraeli


signature.asc
Description: PGP signature


Re: [docbook-apps] xmlcalabash extensions step: No 'class' in configuration for cx:mathml-to-svg

2020-04-12 Thread Norman Tovey-Walsh
aanno  writes:
> I guess that I haven't understood how the Java class of the extension
> step is registered with xmlcalash. On the class, there is an annotation
>
>> @XMLCalabash(
>> name = "cx:mathml-to-svg",
>> type = "{http://xmlcalabash.com/ns/extensions}mathml-to-svg";)
> and there is an (extra) library.xpl.
>
> Perhaps somebody could explain me the about the relation of the 2 files
> - and what have to been done to register an extension step with
> xmlcalabash successfully.

I recently got frustrated with the fact that the ability to find classes
by annotation is dependent on the security settings of the class loader.
The most recent XML Calabash uses property files (if the annotations
fail) to find them. That should fix the problems as long as the
mathml-to-svg extension jar file is on the class path.

    Be seeing you,
  norm

--
Norman Tovey-Walsh 
https://nwalsh.com/

> Act from reason, and failure makes you rethink and study harder. Act
> from faith, and failure makes you blame someone and push harder.


signature.asc
Description: PGP signature


Re: [docbook-apps]

2020-03-01 Thread Norman Tovey-Walsh
aanno  writes:
> Hello,
> I'm looking for an example how to use/apply  xmlcalabash
> extension step (https://github.com/ndw/xmlcalabash1-xslthl) on a docbook
> programlistingelement when using the xslt20 stylesheets.

I looked into doing this briefly and gave up. I don’t remember why. I
use a JavaScript highlighter for web presentation. For print, I use
Pygments[1].

Be seeing you,
  norm

[1] https://github.com/ndw/xmlcalabash1-pygments

--
Norman Tovey-Walsh  | Deleted code is debugged
https://nwalsh.com/ | code.--Jeff Sickel


signature.asc
Description: PGP signature