Turns out it was a font installation / configuration issue on my Linux/Fedora box. The following CSS supplement worked as expected:

emphasis[role=red] {
    color: #FF0000;
    font-family: monospace;
}

But when adding »font-weight: bold;« the shit hits the fan: I do see a proportional rather than a fixed font. Switching the »"monospace" font family« option in Preferences --> View from its default »Monospaced« to i.e. »DejaVu Sans Mono« resolved the issue.

I thus suspect that my system's default monospaced font (whatever that is) does not supply all font-weights.

Martin



On 3/31/25 11:52, Hussein Shafie wrote:
Martin Goik wrote:
I've extended XXE's docbook sylesheet .../addon/config/docbook/css/inline.imp to allow for <emphasis role='red'>...</emphasis> in the editor view:

emphasis[role=red] {
?? color: red;
?? font-family: monospace;
?? font-style: normal;
}

This works as expected with respect to displaying text in red. However XXE still uses a proportional rather than a fixed font ignoring ?font-family: monospace?. The latter is required for using <emphasis ...> elements inside <programlisting> and not cluttering the editor's view. Adding ?!important? does not help either.

!important is not implemented by XXE.



I also tried adding ?font-family: monospace !important? to all other existing css emphasis definitions in?inline.imp to no avail.

I'm sorry but I cannot reproduce the issue you describe, either by modifying "inline.imp", as follows:
---
/* ===========================================================================
   Most common inline elements
============================================================================ */

emphasis {
    font-style: italic;
}

emphasis[role=bold-italic] {
    font-weight: bold;
}

emphasis[role=bold],
emphasis[role=strong] {  /* Supported by the XSL stylesheets. */
    font-style: normal;
    font-weight: bold;
}

emphasis[role=underline] { /* Supported by the XSL stylesheets. */
    font-style: normal;
    text-decoration: underline;
}

emphasis[role=strikethrough] { /* Supported by the XSL stylesheets. */
    font-style: normal;
    text-decoration: line-through;
}

emphasis[role=highlight] {
    font-style: normal;
    background-color: #F0F080;
}

emphasis[role=red] {
    font-family: monospace;
    font-style: normal;
    color: red;
}

emphasis > emphasis {
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
}

literal {
    font-family: monospace;
}
---

or (strongly recommended) by using "Options|Customize Configuration|Customize CSS Stylesheet", https://www.xmlmind.com/xmleditor/_distrib/doc/help/customizeConfigurationMenu.html.

See attached screenshots.


--
Martin Goik  Tel.  +49-711-8923-2164  http://www.HdM-Stuttgart.de/~goik
GnuPG public key: https://www.hdm-stuttgart.de/~goik/goik.asc

Die lauteste Meinung hat oft nicht die leiseste Ahnung


--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to