Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread Dave Pawson
Perhaps start where the problem is. Look for a font which contains
the glyphs for the Unicode code points you want to use. Check the
code points produce the glyphs you want.
Find out how the app (fop and any others you use in your tool chain)
selects fonts.
Run the app knowing that the font has what you want and your code
points are correct.

HTH

On 1 February 2017 at 23:44, Richard Hamilton  wrote:
> I’m getting out of my depth on fop, so maybe someone else on the list can 
> help here.
>
> However, diving in deeper than I should:-)I suspect the problem is number 1.
>
> I suggest running fop with the -d (debug) mode, and you might also try -x, 
> which will dump the configuration; that way you can see if the configuration 
> fop uses is what you think it is using.
>
> Good luck,
> Dick
> ---
> XML Press
> XML for Technical Communicators
> http://xmlpress.net
> hamil...@xmlpress.net
>
>
>
>> On Feb 1, 2017, at 15:21, stim...@comcast.net wrote:
>>
>> Hi,
>>
>> So what my experimenting shows so far for trying to change font is that I 
>> can adjust param.xsl and switch between serif or sans-serif. The result 
>> depends on what is available in fop.xconf which lists Times-Roman for serif, 
>> and Helvetica for sans-serif. I've attempted to add an additional font 
>> definition for DejaVuSans by the following inside the  of fop.xconf:
>>
>> 
>> 
>>
>> 
>>
>> I am unable to name "DejaVuSans" instead of "sans-serif" in param.xsl (it 
>> falls back to Symbol). I see three possibilities...
>> 1. My DejaVuSans declaration is wrong.
>> 2. I have to remove Helvetica in fop.xconf from the sans-serif listings.
>> 3. The Docbook parameters you mentioned are somewhere outside of fop.xconf 
>> or param.xsl.
>>
>> It seems unlikely I need to remove Helvetica, more likely there is another 
>> configuration elsewhere. However, I don't see any occurrence of "Helvetica" 
>> in any of the other Docbook files under the 
>> "stylesheet/docbook-xsl-ns-1.79.1/" directory tree which are related to this 
>> case (for example, there is a subdirectory for "slides" which would seem to 
>> be unrelated to the "book" being published to pdf). The full path to the ttf 
>> font file is available and readable to everyone; this is verifiable with a 
>> font editor (one reason to choose DejaVu is that the font editor actually 
>> shows the desired box drawing font glyphs at index 0x2500 and on).
>>
>> Am I missing another file to edit, or am I simply using the wrong syntax for 
>> my addition of DejaVuSans?
>>
>> Thanks!
>>
>> - Original Message -
>> From: Richard Hamilton 
>> To: stim...@comcast.net
>> Cc: Docbook 
>> Sent: Wed, 01 Feb 2017 20:36:59 - (UTC)
>> Subject: Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
>> Hi,
>> There are two steps to the font assignment process: 1) configuring fop’s 
>> fonts and 2) setting DocBook parameters to call the fonts you have 
>> configured in fop.
>> In this case, the mapping between serif and Times (and sans-serif and 
>> Helvetica) happens in the fop configuration file, fop.xconf.
>> So, when you set the DocBook parameter to sans-serif, fop defaults to 
>> Helvetica. If you want sans-serif to default to something else, or if you 
>> want to add a font, you need to change the configuration in fop.xconf. Once 
>> you have configured fop to recognize a font, you can refer to it from the 
>> DocBook parameters using the name you have associated with the font in 
>> fop.xconf. If you look in your fop.xconf file, you will find that the 
>> definition for Times contains several instances of the  
>> element, each of which defines a name you can use for that font, along with 
>> information about style and weight.
>> This page has some information on configuring the fop.xconf file for fonts:
>> https://xmlgraphics.apache.org/fop/2.1/fonts.html
>> Best regards,
>> Dick Hamilton
>> ---
>> XML Press
>> XML for Technical Communicators
>> http://xmlpress.net
>> hamil...@xmlpress.net
>> > On Feb 1, 2017, at 11:53, stim...@comcast.net wrote:
>> >
>> > Hi,
>> >
>> > I tested this by changing body.font.family to sans-serif. The document did 
>> > successfully switch, and used Helvetica. Unfortunately, Helvetica also 
>> > lacks the box drawing characters. Is there a configuration file used for a 
>> > given Docbook 5.1 installation which maps "Times Roman" to serif, and 
>> > "Helvetica" to sans-serif? I think this is the key to getting those box 
>> > drawing characters to work...perhaps if I can remap serif and sans-serif 
>> > to valid fonts other than Helvetica and Times Roman it would work with 
>> > those characters.
>> >
>> > Thanks!
>> >
>> > - Original Message -
>> > From: Bob Stayton 
>> > To: stim...@comcast.net, docbook-apps@lists.oasis-open.org
>> > Sent: Wed, 01 Feb 2017 18:51:04 - (UTC)
>> > Subject: Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
>> 

Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread Richard Hamilton
I’m getting out of my depth on fop, so maybe someone else on the list can help 
here.

However, diving in deeper than I should:-)I suspect the problem is number 1.

I suggest running fop with the -d (debug) mode, and you might also try -x, 
which will dump the configuration; that way you can see if the configuration 
fop uses is what you think it is using.

Good luck,
Dick
---
XML Press
XML for Technical Communicators
http://xmlpress.net
hamil...@xmlpress.net



> On Feb 1, 2017, at 15:21, stim...@comcast.net wrote:
> 
> Hi,
>  
> So what my experimenting shows so far for trying to change font is that I can 
> adjust param.xsl and switch between serif or sans-serif. The result depends 
> on what is available in fop.xconf which lists Times-Roman for serif, and 
> Helvetica for sans-serif. I've attempted to add an additional font definition 
> for DejaVuSans by the following inside the  of fop.xconf:
>  
> 
> 
>
> 
>  
> I am unable to name "DejaVuSans" instead of "sans-serif" in param.xsl (it 
> falls back to Symbol). I see three possibilities...
> 1. My DejaVuSans declaration is wrong.
> 2. I have to remove Helvetica in fop.xconf from the sans-serif listings.
> 3. The Docbook parameters you mentioned are somewhere outside of fop.xconf or 
> param.xsl.
>  
> It seems unlikely I need to remove Helvetica, more likely there is another 
> configuration elsewhere. However, I don't see any occurrence of "Helvetica" 
> in any of the other Docbook files under the 
> "stylesheet/docbook-xsl-ns-1.79.1/" directory tree which are related to this 
> case (for example, there is a subdirectory for "slides" which would seem to 
> be unrelated to the "book" being published to pdf). The full path to the ttf 
> font file is available and readable to everyone; this is verifiable with a 
> font editor (one reason to choose DejaVu is that the font editor actually 
> shows the desired box drawing font glyphs at index 0x2500 and on).
>  
> Am I missing another file to edit, or am I simply using the wrong syntax for 
> my addition of DejaVuSans?
>  
> Thanks!
>  
> - Original Message -
> From: Richard Hamilton 
> To: stim...@comcast.net
> Cc: Docbook 
> Sent: Wed, 01 Feb 2017 20:36:59 - (UTC)
> Subject: Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
> Hi,
> There are two steps to the font assignment process: 1) configuring fop’s 
> fonts and 2) setting DocBook parameters to call the fonts you have configured 
> in fop.
> In this case, the mapping between serif and Times (and sans-serif and 
> Helvetica) happens in the fop configuration file, fop.xconf.
> So, when you set the DocBook parameter to sans-serif, fop defaults to 
> Helvetica. If you want sans-serif to default to something else, or if you 
> want to add a font, you need to change the configuration in fop.xconf. Once 
> you have configured fop to recognize a font, you can refer to it from the 
> DocBook parameters using the name you have associated with the font in 
> fop.xconf. If you look in your fop.xconf file, you will find that the 
> definition for Times contains several instances of the  
> element, each of which defines a name you can use for that font, along with 
> information about style and weight.
> This page has some information on configuring the fop.xconf file for fonts:
> https://xmlgraphics.apache.org/fop/2.1/fonts.html
> Best regards,
> Dick Hamilton
> ---
> XML Press
> XML for Technical Communicators
> http://xmlpress.net
> hamil...@xmlpress.net
> > On Feb 1, 2017, at 11:53, stim...@comcast.net wrote:
> > 
> > Hi,
> > 
> > I tested this by changing body.font.family to sans-serif. The document did 
> > successfully switch, and used Helvetica. Unfortunately, Helvetica also 
> > lacks the box drawing characters. Is there a configuration file used for a 
> > given Docbook 5.1 installation which maps "Times Roman" to serif, and 
> > "Helvetica" to sans-serif? I think this is the key to getting those box 
> > drawing characters to work...perhaps if I can remap serif and sans-serif to 
> > valid fonts other than Helvetica and Times Roman it would work with those 
> > characters.
> > 
> > Thanks!
> > 
> > - Original Message -
> > From: Bob Stayton 
> > To: stim...@comcast.net, docbook-apps@lists.oasis-open.org
> > Sent: Wed, 01 Feb 2017 18:51:04 - (UTC)
> > Subject: Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
> > Hi,
> > If by system-wide you mean everyone sharing one DocBook XSL 
> > installation, you could edit the parameters file for that installation. 
> > Find the file named fo/param.xsl and change these stylesheet parameters:
> > serif
> > sans-serif
> > All of the stylesheet params are documented here:
> > http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html
> > 
> > Bob Stayton
> > Sagehill Enterprises
> > b...@sagehill.net
> > On 2/1/2017 10:22 AM, stim...@comcast.net wrote:
> > > I just wanted to add 

Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread stimits
Hi,
 
So what my experimenting shows so far for trying to change font is that I can 
adjust param.xsl and switch between serif or sans-serif. The result depends on 
what is available in fop.xconf which lists Times-Roman for serif, and Helvetica 
for sans-serif. I've attempted to add an additional font definition for 
DejaVuSans by the following inside the  of fop.xconf:
 
   


 
I am unable to name "DejaVuSans" instead of "sans-serif" in param.xsl (it falls 
back to Symbol). I see three possibilities...
1. My DejaVuSans declaration is wrong.
2. I have to remove Helvetica in fop.xconf from the sans-serif listings.
3. The Docbook parameters you mentioned are somewhere outside of fop.xconf or 
param.xsl.
 
It seems unlikely I need to remove Helvetica, more likely there is another 
configuration elsewhere. However, I don't see any occurrence of "Helvetica" in 
any of the other Docbook files under the "stylesheet/docbook-xsl-ns-1.79.1/" 
directory tree which are related to this case (for example, there is a 
subdirectory for "slides" which would seem to be unrelated to the "book" being 
published to pdf). The full path to the ttf font file is available and readable 
to everyone; this is verifiable with a font editor (one reason to choose DejaVu 
is that the font editor actually shows the desired box drawing font glyphs at 
index 0x2500 and on).
 
Am I missing another file to edit, or am I simply using the wrong syntax for my 
addition of DejaVuSans?
 
Thanks!
 
- Original Message -From: Richard Hamilton To: 
stimits@comcast.netCc: Docbook Sent: Wed, 01 
Feb 2017 20:36:59 - (UTC)Subject: Re: [docbook-apps] Odd Characters in 
UTF-8, Docbook 5.1

Hi,

There are two steps to the font assignment process: 1) configuring fops 
fonts and 2) setting DocBook parameters to call the fonts you have configured 
in fop.

In this case, the mapping between serif and Times (and sans-serif and 
Helvetica) happens in the fop configuration file, fop.xconf.

So, when you set the DocBook parameter to sans-serif, fop defaults to 
Helvetica. If you want sans-serif to default to something else, or if you want 
to add a font, you need to change the configuration in fop.xconf. Once you have 
configured fop to recognize a font, you can refer to it from the DocBook 
parameters using the name you have associated with the font in fop.xconf. If 
you look in your fop.xconf file, you will find that the definition for Times 
contains several instances of the  element, each of which defines 
a name you can use for that font, along with information about style and weight.

This page has some information on configuring the fop.xconf file for fonts:

https://xmlgraphics.apache.org/fop/2.1/fonts.html

Best regards,Dick Hamilton---XML PressXML for Technical 
Communicatorshttp://xmlpress.nethamil...@xmlpress.net



> On Feb 1, 2017, at 11:53, stim...@comcast.net wrote:> > Hi,> > I tested this 
> by changing body.font.family to sans-serif. The document did successfully 
> switch, and used Helvetica. Unfortunately, Helvetica also lacks the box 
> drawing characters. Is there a configuration file used for a given Docbook 
> 5.1 installation which maps "Times Roman" to serif, and "Helvetica" to 
> sans-serif? I think this is the key to getting those box drawing characters 
> to work...perhaps if I can remap serif and sans-serif to valid fonts other 
> than Helvetica and Times Roman it would work with those characters.> > 
> Thanks!> > - Original Message -> From: Bob Stayton 
> > To: stim...@comcast.net, 
> docbook-apps@lists.oasis-open.org> Sent: Wed, 01 Feb 2017 18:51:04 - 
> (UTC)> Subject: Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1> Hi,> 
> If by system-wide you mean everyone sharing one DocBook XSL > installation, 
> you could edit the parameters file for that installation. > Find the file 
> named fo/param.xsl and change these stylesheet parameters:>  name="body.font.family">serif>  name="title.font.family">sans-serif> All of the stylesheet params 
> are documented here:> 
> http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html> > Bob 
> Stayton> Sagehill Enterprises> b...@sagehill.net> On 2/1/2017 10:22 AM, 
> stim...@comcast.net wrote:> > I just wanted to add some information from 
> reading build logs for the> > document. It turns out the error shows up under 
> "fop" because the> > particular font does not support this character (I'm 
> surprised> > Times-Roman does not have this by default since just about 
> every> > application on the system has the character):> > WARNING: Glyph "├" 
> (0x251c, SF08) not available in font "Times-Roman".> >> > The trouble 
> here is I now want to change this for the system as a whole,> > not just on 
> the document (I want to avoid any project using> > Times-Roman). I am curious 
> if there is some simple way under Linux to> > find out which fonts fop has 
> available, and how 

Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread Richard Hamilton
Hi,

There are two steps to the font assignment process: 1) configuring fop’s fonts 
and 2) setting DocBook parameters to call the fonts you have configured in fop.

In this case, the mapping between serif and Times (and sans-serif and 
Helvetica) happens in the fop configuration file, fop.xconf.

So, when you set the DocBook parameter to sans-serif, fop defaults to 
Helvetica. If you want sans-serif to default to something else, or if you want 
to add a font, you need to change the configuration in fop.xconf. Once you have 
configured fop to recognize a font, you can refer to it from the DocBook 
parameters using the name you have associated with the font in fop.xconf. If 
you look in your fop.xconf file, you will find that the definition for Times 
contains several instances of the  element, each of which defines 
a name you can use for that font, along with information about style and weight.

This page has some information on configuring the fop.xconf file for fonts:

https://xmlgraphics.apache.org/fop/2.1/fonts.html

Best regards,
Dick Hamilton
---
XML Press
XML for Technical Communicators
http://xmlpress.net
hamil...@xmlpress.net



> On Feb 1, 2017, at 11:53, stim...@comcast.net wrote:
> 
> Hi,
>  
> I tested this by changing body.font.family to sans-serif. The document did 
> successfully switch, and used Helvetica. Unfortunately, Helvetica also lacks 
> the box drawing characters. Is there a configuration file used for a given 
> Docbook 5.1 installation which maps "Times Roman" to serif, and "Helvetica" 
> to sans-serif? I think this is the key to getting those box drawing 
> characters to work...perhaps if I can remap serif and sans-serif to valid 
> fonts other than Helvetica and Times Roman it would work with those 
> characters.
>  
> Thanks!
>  
> - Original Message -
> From: Bob Stayton 
> To: stim...@comcast.net, docbook-apps@lists.oasis-open.org
> Sent: Wed, 01 Feb 2017 18:51:04 - (UTC)
> Subject: Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
> Hi,
> If by system-wide you mean everyone sharing one DocBook XSL 
> installation, you could edit the parameters file for that installation. 
> Find the file named fo/param.xsl and change these stylesheet parameters:
> serif
> sans-serif
> All of the stylesheet params are documented here:
> http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html
> 
> Bob Stayton
> Sagehill Enterprises
> b...@sagehill.net
> On 2/1/2017 10:22 AM, stim...@comcast.net wrote:
> > I just wanted to add some information from reading build logs for the
> > document. It turns out the error shows up under "fop" because the
> > particular font does not support this character (I'm surprised
> > Times-Roman does not have this by default since just about every
> > application on the system has the character):
> > WARNING: Glyph "├" (0x251c, SF08) not available in font "Times-Roman".
> >
> > The trouble here is I now want to change this for the system as a whole,
> > not just on the document (I want to avoid any project using
> > Times-Roman). I am curious if there is some simple way under Linux to
> > find out which fonts fop has available, and how to change the default
> > font family for all Docbook publishing via a system-wide setting? I've
> > found many documents on modifying Docbook behavior within source code,
> > but not much seems to exist on system-wide Docbook configuration from a
> > system administrator's point of view...if anyone has a URL for
> > information on specifics of tuning Docbook defaults under Linux I'd be
> > very happy!
> >
> > Thanks!
> >
> > - Original Message -
> > From: stim...@comcast.net
> > To: docbook-apps@lists.oasis-open.org
> > Sent: Tue, 31 Jan 2017 23:20:24 - (UTC)
> > Subject: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
> > Hi,
> >
> > I'm working on a Linux machine which has UTF-8 encoding. The docbook 5.1
> > I'm working with is declared:
> > 
> >  > 
> > ]>
> >
> > Entities changed a while back (relaxng changed things), but so far as I
> > know I should still be able to work with numeric entities when using odd
> > characters which are part of UTF-8. I'm trying to get some box drawing
> > characters to work, specifically because I need to illustrate a file
> > directory structure which has been output like this from the "tree -d"
> > command. Here's a short sample:
> >> tree -d -L 2 /etc | tail -n 20 | tail -n 6
> > │ ├── pluginconf.d
> > │ ├── protected.d
> > │ └── vars
> > └── yum.repos.d
> >
> > As you can see the vertical and horizontal box drawing characters are
> > used. When I redirect this to a file or copy and paste into the document
> > all I get is a substitute...each shows as "#". So I tried to use numeric
> > entities instead. As an example "boxh" (horizontal box line) should work
> > as "". This does not work, and rendering still ends up as "#". I
> > tried the numeric code for the plus/minus character, "||", and
> > this does work. I don't 

Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread stimits
Hi,
 
I tested this by changing body.font.family to sans-serif. The document did 
successfully switch, and used Helvetica. Unfortunately, Helvetica also lacks 
the box drawing characters. Is there a configuration file used for a given 
Docbook 5.1 installation which maps "Times Roman" to serif, and "Helvetica" to 
sans-serif? I think this is the key to getting those box drawing characters to 
work...perhaps if I can remap serif and sans-serif to valid fonts other than 
Helvetica and Times Roman it would work with those characters.
 
Thanks!
 
- Original Message -From: Bob Stayton To: 
stim...@comcast.net, docbook-apps@lists.oasis-open.orgSent: Wed, 01 Feb 2017 
18:51:04 - (UTC)Subject: Re: [docbook-apps] Odd Characters in UTF-8, 
Docbook 5.1

Hi,If by system-wide you mean everyone sharing one DocBook XSL installation, 
you could edit the parameters file for that installation. Find the file named 
fo/param.xsl and change these stylesheet parameters:

serifsans-serif

All of the stylesheet params are documented here:

http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html

Bob StaytonSagehill enterprisesb...@sagehill.net

On 2/1/2017 10:22 AM, stim...@comcast.net wrote:> I just wanted to add some 
information from reading build logs for the> document. It turns out the error 
shows up under "fop" because the> particular font does not support this 
character (I'm surprised> Times-Roman does not have this by default since just 
about every> application on the system has the character):> WARNING: Glyph "├" 
(0x251c, SF08) not available in font "Times-Roman".>> The trouble here is I 
now want to change this for the system as a whole,> not just on the document (I 
want to avoid any project using> Times-Roman). I am curious if there is some 
simple way under Linux to> find out which fonts fop has available, and how to 
change the default> font family for all Docbook publishing via a system-wide 
setting? I've> found many documents on modifying Docbook behavior within source 
code,> but not much seems to exist on system-wide Docbook configuration from a> 
system administrator's point of view...if anyone has a URL for> information on 
specifics of tuning Docbook defaults under Linux I'd be> very happy!>> 
Thanks!>> - Original Message -> From: stim...@comcast.net> To: 
docbook-apps@lists.oasis-open.org> Sent: Tue, 31 Jan 2017 23:20:24 - (UTC)> 
Subject: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1> Hi,>> I'm working 
on a Linux machine which has UTF-8 encoding. The docbook 5.1> I'm working with 
is declared:> >  
> ]>>> Entities changed a while back (relaxng 
changed things), but so far as I> know I should still be able to work with 
numeric entities when using odd> characters which are part of UTF-8. I'm trying 
to get some box drawing> characters to work, specifically because I need to 
illustrate a file> directory structure which has been output like this from the 
"tree -d"> command. Here's a short sample:>> tree -d -L 2 /etc | tail -n 20 | 
tail -n 6> │ ├── pluginconf.d> │ ├── protected.d> │ └── vars> └── yum.repos.d>> 
As you can see the vertical and horizontal box drawing characters are> used. 
When I redirect this to a file or copy and paste into the document> all I get 
is a substitute...each shows as "#". So I tried to use numeric> entities 
instead. As an example "boxh" (horizontal box line) should work> as "". 
This does not work, and rendering still ends up as "#". I> tried the numeric 
code for the plus/minus character, "||", and> this does work. I don't 
know if it proves anything, but since my UTF-8> terminal shows all of the above 
characters just fine on a terminal, it> seems like the ability to output is not 
in question...perhaps this is an> invalid assumption.>> Btw, one reference on 
the Unicode numeric value is from:> 
http://www.oasis-open.org/docbook/documentation/reference/html/iso-box.html>> 
Under Docbook 5.1, what do I need to do to use this numeric entity other> than 
using UTF-8 and the numeric entity syntax? Is there an additional> XML 
declaration I need?>> Thanks!


Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread Bob Stayton

Hi,
If by system-wide you mean everyone sharing one DocBook XSL 
installation, you could edit the parameters file for that installation. 
Find the file named fo/param.xsl and change these stylesheet parameters:


serif
sans-serif

All of the stylesheet params are documented here:

http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html


Bob Stayton
Sagehill Enterprises
b...@sagehill.net

On 2/1/2017 10:22 AM, stim...@comcast.net wrote:

I just wanted to add some information from reading build logs for the
document. It turns out the error shows up under "fop" because the
particular font does not support this character (I'm surprised
Times-Roman does not have this by default since just about every
application on the system has the character):
WARNING: Glyph "├" (0x251c, SF08) not available in font "Times-Roman".

The trouble here is I now want to change this for the system as a whole,
not just on the document (I want to avoid any project using
Times-Roman). I am curious if there is some simple way under Linux to
find out which fonts fop has available, and how to change the default
font family for all Docbook publishing via a system-wide setting? I've
found many documents on modifying Docbook behavior within source code,
but not much seems to exist on system-wide Docbook configuration from a
system administrator's point of view...if anyone has a URL for
information on specifics of tuning Docbook defaults under Linux I'd be
very happy!

Thanks!

- Original Message -
From: stim...@comcast.net
To: docbook-apps@lists.oasis-open.org
Sent: Tue, 31 Jan 2017 23:20:24 - (UTC)
Subject: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1
Hi,

I'm working on a Linux machine which has UTF-8 encoding. The docbook 5.1
I'm working with is declared:


]>

Entities changed a while back (relaxng changed things), but so far as I
know I should still be able to work with numeric entities when using odd
characters which are part of UTF-8. I'm trying to get some box drawing
characters to work, specifically because I need to illustrate a file
directory structure which has been output like this from the "tree -d"
command. Here's a short sample:

tree -d -L 2 /etc | tail -n 20 | tail -n 6

│   ├── pluginconf.d
│   ├── protected.d
│   └── vars
└── yum.repos.d

As you can see the vertical and horizontal box drawing characters are
used. When I redirect this to a file or copy and paste into the document
all I get is a substitute...each shows as "#". So I tried to use numeric
entities instead. As an example "boxh" (horizontal box line) should work
as "". This does not work, and rendering still ends up as "#". I
tried the numeric code for the plus/minus character, "||", and
this does work. I don't know if it proves anything, but since my UTF-8
terminal  shows all of the above characters just fine on a terminal, it
seems like the ability to output is not in question...perhaps this is an
invalid assumption.

Btw, one reference on the Unicode numeric value is from:
http://www.oasis-open.org/docbook/documentation/reference/html/iso-box.html

Under Docbook 5.1, what do I need to do to use this numeric entity other
than using UTF-8 and the numeric entity syntax? Is there an additional
XML declaration I need?

Thanks!


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

2017-02-01 Thread stimits
I just wanted to add some information from reading build logs for the document. 
It turns out the error shows up under "fop" because the particular font does 
not support this character (I'm surprised Times-Roman does not have this by 
default since just about every application on the system has the character):
WARNING: Glyph "├" (0x251c, SF08) not available in font "Times-Roman".
 
The trouble here is I now want to change this for the system as a whole, not 
just on the document (I want to avoid any project using Times-Roman). I am 
curious if there is some simple way under Linux to find out which fonts fop has 
available, and how to change the default font family for all Docbook publishing 
via a system-wide setting? I've found many documents on modifying Docbook 
behavior within source code, but not much seems to exist on system-wide Docbook 
configuration from a system administrator's point of view...if anyone has a URL 
for information on specifics of tuning Docbook defaults under Linux I'd be very 
happy!
 
Thanks!
 
- Original Message -From: stimits@comcast.netTo: 
docbook-apps@lists.oasis-open.orgSent: Tue, 31 Jan 2017 23:20:24 - 
(UTC)Subject: [docbook-apps] Odd Characters in UTF-8, Docbook 5.1

Hi,
 
I'm working on a Linux machine which has UTF-8 encoding. The docbook 5.1 I'm 
working with is declared:
]>
 
Entities changed a while back (relaxng changed things), but so far as I know I 
should still be able to work with numeric entities when using odd characters 
which are part of UTF-8. I'm trying to get some box drawing characters to work, 
specifically because I need to illustrate a file directory structure which has 
been output like this from the "tree -d" command. Here's a short sample:
> tree -d -L 2 /etc | tail -n 20 | tail -n 6│   ├── pluginconf.d│   ├── 
> protected.d│   └── vars└── yum.repos.d 
As you can see the vertical and horizontal box drawing characters are used. 
When I redirect this to a file or copy and paste into the document all I get is 
a substitute...each shows as "#". So I tried to use numeric entities instead. 
As an example "boxh" (horizontal box line) should work as "". This does 
not work, and rendering still ends up as "#". I tried the numeric code for the 
plus/minus character, "", and this does work. I don't know if it proves 
anything, but since my UTF-8 terminal  shows all of the above characters just 
fine on a terminal, it seems like the ability to output is not in 
question...perhaps this is an invalid assumption.
 
Btw, one reference on the Unicode numeric value is from:
http://www.oasis-open.org/docbook/documentation/reference/html/iso-box.html
 
Under Docbook 5.1, what do I need to do to use this numeric entity other than 
using UTF-8 and the numeric entity syntax? Is there an additional XML 
declaration I need?
 
Thanks!