Skip to content

Commit

Permalink
[mod-nlb] Add options "Inkluder strong" and "Inkluder em"
Browse files Browse the repository at this point in the history
see issue #217
  • Loading branch information
bertfrees committed Apr 8, 2019
1 parent e0ccfb8 commit 1264db8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ $page-width: 40 !default;
$hyphenation: true !default;
$force-norwegian: true !default;
$duplex: true !default;
$include-strong: true !default;
$include-em: true !default;

@import "page-numbers";
@import "line-spacing";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,23 @@
close: "⠐⠂";
}

strong, b {
text-transform: strong;
:root:not(:has(em, i)) & {
text-transform: em;
@if ($include-strong) {
strong, b {
@if ($include-em) {
text-transform: strong;
:root:not(:has(em, i)) & {
text-transform: em;
}
} @else {
text-transform: em;
}
}
}

em, i {
text-transform: em;
@if ($include-em) {
em, i {
text-transform: em;
}
}

u {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
<p:option name="include-obfl"/>
<p:option name="include-captions"/>
<p:option name="include-images"/>
<p:option name="include-strong"/>
<p:option name="include-em"/>
<p:option name="include-notes"/>
<p:option name="notes-placement"/>
<p:option name="include-production-notes"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
<p:option name="include-obfl"/>
<p:option name="include-captions"/>
<p:option name="include-images"/>
<p:option name="include-strong"/>
<p:option name="include-em"/>
<p:option name="include-notes"/>
<p:option name="notes-placement"/>
<p:option name="include-production-notes"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
<p:option name="include-obfl"/>
<p:option name="include-captions"/>
<p:option name="include-images"/>
<p:option name="include-strong"/>
<p:option name="include-em"/>
<p:option name="include-notes"/>
<p:option name="notes-placement"/>
<p:option name="include-production-notes"/>
Expand Down
12 changes: 12 additions & 0 deletions modules/nlb/book-to-pef/src/main/resources/xml/xml-to-pef.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ Dette kan være nyttig for å løse problemer med formatering av PEF'en.</p>
<!-- =============== -->
<!-- Tekst-elementer -->
<!-- =============== -->
<p:option name="include-strong" select="'true'" px:type="boolean">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<h2 px:role="name">Tekstelementer: Inkluder em</h2>
<h2 px:role="desc">Når boksen er tom, blir em utelatt fra produksjonen.</h2>
</p:documentation>
</p:option>
<p:option name="include-em" select="'true'" px:type="boolean">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<h2 px:role="name">Tekstelementer: Inkluder strong</h2>
<h2 px:role="desc">Når boksen er tom, vil strong bli utelatt fra produksjonen.</h2>
</p:documentation>
</p:option>
<p:option name="include-notes" select="'true'" px:type="boolean">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<h2 px:role="name">Tekstelementer: Inkluder noter</h2>
Expand Down

0 comments on commit 1264db8

Please sign in to comment.