You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The classes GermanInteger2TextFactoryService, GermanInteger2TextFactory, DeInt2TextLocalizationBasicInteger2Text and UndefinedNumberException are not used. They can be removed. The idea was to be able to use Dotify's int2text function with German. But to be really useful the function lacks support for cases, plural, ordinal numbers, etc. The approach chosen by Pipeline is to define integer to text conversions as counter styles using @counter-style CSS rules. Counter styles can be applied to all counters including the automatic counters page and volume, and to all numeric OBFL variables (-obfl-volumes, -obfl-sheets-in-volume, etc.).
SBSTranslator defines a number of "text-transform" values that are used in CSS. This could be achieved instead using @text-transform rules referencing specialized Liblouis tables (and possibly utilizing Liblouis typeforms) and/or Dotify's int2text function@counter-style rules.
print-page: render a print page number (range) as a fraction (with normal and downshifted part)
toc-page: render as normal number
toc-print-page: render as downshifted number without number sign
volume: render as written-out ordinal number
volumes: render as written-out number in dative case ("in x volumes")
volume-end: render as written-out ordinal number in genitive case ("end of volume x")
linenum: render as normal number without number sign, and also check that number does not have more than 2 digits (99) so that it will fit
roman-num: render as a roman number (for page numbers on toc pages)
The SBS tables are already part of upstream Liblouis for a large part, and @egli is working on migrating them further.
The first step could be to move all tests that make sense in the context of Liblouis to Liblouis. I believe @egli has done this?
What currently is done in select-braille-table.xsl could be done in CSS using @text-transform rules.
After the above is done, there still might be some XSLT code left to handle certain corner cases. We'll have to see then if it makes sense to port that XSLT code to Pipeline.
Braille output format
SBSFileFormat defines the output file format that the output should be in. One option is to port this class to Pipeline or Dotify. If it is really specific to SBS this is not so great though. (It could also just be specific to the printer that SBS uses. We need to figure this out.) The other option is to use ConfigurableFileFormat. The equivalent "Output file format" query for selecting a ConfigurableFileFormat needs the following features:
In addition we'll need new features to define the following behavior:
Each line of braille (including empty lines) should start with a space
The first line of each page should start with a "p" instead of a space
Style sheets and custom script options that map to Sass variables
Everything below is about porting CSS code, which is not required to be able to make use of the generic Pipeline because CSS can be supplied as input to a conversion and therefore does not need to be included in pipeline-mod-sbs. Custom options that are solely used to set Sass variables can now be handled with the "Style sheet parameters" option. In other words consider these points optimizations rather than required steps.
Certain bits of code that are not specific to SBS (if generalized) could be moved to Pipeline:
configurable definition of line number (SBS has special markup for line numbers inside p. This means we should somehow allow specifying through CSS/SASS that a certain element is a line number.)
@egli I'd like to move forward with handling emphasis in Liblouis instead of in XSLT. Can you help me with this? I need you especially for the test cases.
My contribution to solving this issue is now more or less done. Most things that could be done on the Pipeline side are done. Except for maybe improving ConfigurableFileFormat or porting SBSFileFormat, but we first need confirmation that this item is really required and find out which approach is most suited.
I can also still provide assistance with improving support for German in Liblouis. For instance with fixing emphasis handling.
I might also port some more CSS code in the future but that has lower priority.
Hyphenation
Braille translation
The classes
GermanInteger2TextFactoryService
,GermanInteger2TextFactory
,DeInt2TextLocalization
BasicInteger2Text
andUndefinedNumberException
are not used. They can be removed. The idea was to be able to use Dotify'sint2text
function with German. But to be really useful the function lacks support for cases, plural, ordinal numbers, etc. The approach chosen by Pipeline is to define integer to text conversions as counter styles using@counter-style
CSS rules. Counter styles can be applied to all counters including the automatic counterspage
andvolume
, and to all numeric OBFL variables (-obfl-volumes
,-obfl-sheets-in-volume
, etc.).SBSTranslator
defines a number of "text-transform" values that are used in CSS. This could be achieved instead using@text-transform
rules referencing specialized Liblouis tables (and possibly utilizing Liblouis typeforms) and/orDotify'sint2text
function@counter-style
rules.print-page
: render a print page number (range) as a fraction (with normal and downshifted part)toc-page
: render as normal numbertoc-print-page
: render as downshifted number without number signvolume
: render as written-out ordinal numbervolumes
: render as written-out number in dative case ("in x volumes")volume-end
: render as written-out ordinal number in genitive case ("end of volume x")linenum
: render as normal number without number sign, and also check that number does not have more than 2 digits (99) so that it will fitroman-num
: render as a roman number (for page numbers on toc pages)The SBS tables are already part of upstream Liblouis for a large part, and @egli is working on migrating them further.
@text-transform downgrade
could possibly also be handled through Liblouis typeforms (This has been done: Implement German downgrade indicator liblouis/liblouis#1121)@text-transform
rules.After the above is done, there still might be some XSLT code left to handle certain corner cases. We'll have to see then if it makes sense to port that XSLT code to Pipeline.
Braille output format
SBSFileFormat
defines the output file format that the output should be in. One option is to port this class to Pipeline or Dotify. If it is really specific to SBS this is not so great though. (It could also just be specific to the printer that SBS uses. We need to figure this out.) The other option is to useConfigurableFileFormat
. The equivalent "Output file format" query for selecting aConfigurableFileFormat
needs the following features:(file-extension:'.brl')
(table:'http://www.sbs.ch/pipeline/liblouis/tables/sbs.dis')
(pad:BEFORE)
In addition we'll need new features to define the following behavior:
Style sheets and custom script options that map to Sass variables
Everything below is about porting CSS code, which is not required to be able to make use of the generic Pipeline because CSS can be supplied as input to a conversion and therefore does not need to be included in pipeline-mod-sbs. Custom options that are solely used to set Sass variables can now be handled with the "Style sheet parameters" option. In other words consider these points optimizations rather than required steps.
p
. This means we should somehow allow specifying through CSS/SASS that a certain element is a line number.)The text was updated successfully, but these errors were encountered: