cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Usetext

ebheadrick
1-Newbie

Usetext

Hi all,

I need to double check how this usetext is being used:
<usetext source="space.fill,bullet.txt,@2.2mm,1.3mm" placemnt="before">
I know the @2.2mm is kern to , but what is the 1.3mm used for?

The problem that I have run into was in another part of the FOSI where the kern to wasn't working with another usetext before it. I changed that to use an algroup, but that has now thrown off the list item indent. So I am wondering if I need to use another algroup for the list items.

Thanks for any suggestions,
Ellen

13 REPLIES 13

Hi Ellen,

The "1.3mm" is called a spacing specification. I have put the relevant section from the current draft of my book on my web site at


Thanks Suzanne,

I will get reading 🙂

Ellen

I must not be understanding something.....and I have no more hair left to pull
Here is a snipit of the code I am working with.

<e-i-c gi="para" context="listitem" *=" unorderedlist&quot;=" occur="first">
<charlist inherit="1" charsubsetref="endline" postspace_high_2&quot;=">
<indent inherit="1" leftind="@3.5mm" firstln="*"/">
</charlist>
<att>
<specval attname="mark" attloc="unorderedlist" attval="none"/">
<charsubset>
<savetext textid="bullet.txt" conrule="!!"/">
</charsubset>
</att>
.......
<att>
<charsubset>

<usetext source="bullet.txt" placemnt="before">
<subchars charsubsetref="inline">
<indent inherit="1" leftind="@" rightind="*+2.2mm" firstln="*"/">
<quadding quad="right"/">
<algroup refpoint="first"/">
</subchars>
</usetext>
</charsubset>
</att>
</e-i-c>
At one point I had the bullet in the correct place, but on a line by itself...

I can get the algroup to work if it is starting from the left margin with 0, but as you know lists can be nested. Can the algroup be nested?

Normally I would approach this differently, but the constraint I am working with is that the paragraph can also have another usetext placed before the bullet and paragraph triggered by an attribute on the paragraph.

Thanks,
Ellen

Slight change to the code:
<e-i-c gi="unorderedlist" occur="all">
<charlist inherit="1" charsubsetref="block">
<indent inherit="1" leftind="@3.5mm" firstln="*-3.5mm"/">
</charlist>
</e-i-c>
<e-i-c gi="para" context="listitem" *=" unorderedlist&quot;=" occur="first">
<charlist inherit="1" charsubsetref="endline" postspace_high_2&quot;=">
</charlist>
<att>
<charsubset>

<usetext source="bullet.txt" placemnt="before">
<subchars charsubsetref="inline">
<indent inherit="1" <strong=">leftind="^" rightind="*+2.2mm" firstln="*"/>
<quadding quad="right"/">
<algroup refpoint="first"/">
</subchars>
</usetext>
</charsubset>
</att>

Still the bullet is on a line by itself.

Not sure this will help, but this is from our FOSI for the first para in a list item:

<e-i-c gi="para" context="item" occur="first">
<charlist>

<leading inherit="1">
<indent inherit="1" leftind="@" rightind="@" firstln="^">

Dave

Just in case, how are "block" and "inline" <charsubset>s defined?

Steve Thompson
+1(316)977-0515

I hope just like you would have thought 🙂

<charsubset charsubsetid="inline">
<textbrk startln="0" endln="0"/">
</charsubset>

<charsubset charsubsetid="block">
<textbrk startln="1" endln="1"/">
</charsubset>

I am going to try to make a very small test case that will hopefully leave no questions, but maybe an answer!

Thanks,
Ellen

Ellen,

Can you share the DTD fragment and what the output is supposed to look like?

Suzanne



I have made a very simple testcase, using the asdocbook.dtd. I will include a zip file so that no everyone needs to see it in the forum. The output should look like a "normal" list. I need to use the algroup because of another limitation of the kern to function not working when there are more than one usetext on an element.

Thank you everybody that has taken time to look at this!
Ellen

Ellen,

I don't think algroup is needed. I think the code below does what you want, including handling nested lists. Be sure all charlists and all inheriting categories are coded with inherit="1" (especially indent in this case), and set defaults in the docdesc. Then you can take advantage of inheritance and defaulting, and just code exception cases. Also, keep in mind that some categories, such as leading, first line indent, and presp are ignored unless the charlit contains textbrk startln=1 (block or startline charsubset). Similarly, some categories, such as postsp, require textbrk endln=1.

Good luck!
Suzanne
www.FOSIexpert.com
"WYSIWYG is last-century technology!"

<docdesc>
<charlist>
...
<indent leftind="0pt" rightind="0pt" firstln="*"/">
...
</charlist>
</docdesc>
<e-i-c gi="itemizedlist">
<charlist inherit="1" charsubsetref="block">
<indent inherit="1" leftind="@3.5mm" firstln="*"/">
</charlist>
<att>
<charsubset>
<savetext textid="bullet.txt" conrule="\=\"/">
</charsubset>
</att>
</e-i-c>
<e-i-c gi="listitem" context="*" itemizedlist&quot;=">
<charlist inherit="1"charsubsetref="block">
<indent inherit="1" leftind="@3.5mm" firstln="*-3.5mm"/">
</charlist>
</e-i-c>
<e-i-c gi="para" context="listitem" *=" itemizedlist&quot;=" occur="first">
<charlist inherit="1" charsubsetref="endline" postspace_high_2&quot;=">
</charlist>
</e-i-c>
<e-i-c gi="para" context="listitem" *=" itemizedlist&quot;=" occur="notfirst">
<charlist inherit="1" charsubsetref="block" postspace_high_2&quot;=">
<indent inherit="1" firstln="*"/">
</charlist>
</e-i-c>


Suzanne,

The algroup is needed so that the nested and the sdyf on the second line line up at the 3.5mm indent.

*nested list 3 extra long line lkjsdf lkjhweiou dnv ht djfho;I wer ldskfh;oe r sheroi ksdf
sdyf sdjhfoi er skdhioue rkshdf seuyr kbjsdfkjhsioerus dfhsekr sdkfjhsdfyuoweyr

The code I am trying to replace is:

source="space.fill,bullet.txt,@2.2mm,1.3mm"
Where it has the space fillaround the bullet. This space around the bullet is significant.

Going back to square one to try to explain what I am doing..... I ran into a problem where I had text not lining up. When I researched it I found something (which I can't find now!) that said when you have more than one usetext the kern-to parameters doesn't always work. I was able to use an algroup to get the first problem on a heading to line up correctly. After making this correction it caused the lists to not line up correctly. The next step as I saw it was to make the lists also use the algroup.

So what the structure can look like is:
list
list item
para with attribute that causes test before conditionally, but also has to put out the bullet

So what it needs to format like is:

**** Conditional text<<< so this a usetext on the para and the bullet is a usetext that has space around it.
* here is the start if the para 3.5mm indented
if the line wraps the first and second line are both at the 3.5mm indent

I hope this spacing lines up in your emails, so that you can get a better idea of my problem.

Thanks for your patience,
Ellen



In Reply to Suzanne Napoleon:

In Reply to Suzanne Napoleon:
Ellen,

I don't think algroup is needed. I think the code below does what you want, including handling nested lists. Be sure all charlists and all inheriting categories are coded with inherit="1" (especially indent in this case), and set defaults in the docdesc. Then you can take advantage of inheritance and defaulting, and just code exception cases. Also, keep in mind that some categories, such as leading, first line indent, and presp are ignored unless the charlit contains textbrk startln=1 (block or startline charsubset). Similarly, some categories, such as postsp, require textbrk endln=1.

Good luck!
Suzanne
www.FOSIexpert.com
"WYSIWYG is last-century technology!"

<docdesc>
<charlist>
...
<indent leftind="0pt" rightind="0pt" firstln="*"/">
...
</charlist>
</docdesc>
<e-i-c gi="itemizedlist">
<charlist inherit="1" charsubsetref="block">
<indent inherit="1" leftind="@3.5mm" firstln="*"/">
</charlist>
<att>
<charsubset>
<savetext textid="bullet.txt" conrule="\=\"/">
</charsubset>
</att>
</e-i-c>
<e-i-c gi="listitem" context="*" itemizedlist&quot;=">
<charlist inherit="1"charsubsetref="block">
<indent inherit="1" leftind="@3.5mm" firstln="*-3.5mm"/">
</charlist>
</e-i-c>
<e-i-c gi="para" context="listitem" *=" itemizedlist&quot;=" occur="first">
<charlist inherit="1" charsubsetref="endline" postspace_high_2&quot;=">
</charlist>
</e-i-c>
<e-i-c gi="para" context="listitem" *=" itemizedlist&quot;=" occur="notfirst">
<charlist inherit="1" charsubsetref="block" postspace_high_2&quot;=">
<indent inherit="1" firstln="*"/">
</charlist>
</e-i-c>


Ellen,

One problem is that the equal sign character (=) is 6.77pt wide and does not fit in the allotted 3.5mm. Change the = to a period (.) or hyphen (-) and you'll see what I mean. (Use the Attribute command in Preview to see the width of the character under the cursor.)

In the code below, I used spacefill before and after bullet.txt, which centers the character within the 3.5mm space. I don't know if that is what you want. However, if you use a kern-to and a fixed space, they may have to be calculated for the width of every bullet character.

The conditional text requires a somewhat different approach than how lists are generally coded. It is necessary to suppress #CONTENT and output it from a usetext with the formating in the subchars. Note that this works for nested lists.

Thanks for a good FOSI challenge!

Good luck!
Suzanne
www.FOSIexpert.com
"WYSIWYG is last-century technology!"

<docdesc>
<charlist>
<indent leftind="0pt" rightind="0pt" firstln="*"/">
<textbrk startcol="0" startpg="off" startln="0" endln="0"/">
</charlist>
</docdesc>

<e-i-c gi="itemizedlist" occur="all">
<charlist inherit="1" charsubsetref="block"></charlist>
<att>
<charsubset>
<savetext textid="bullet.txt" conrule="\-\"/">
</charsubset>
</att>
</e-i-c>

<e-i-c gi="listitem" context="*" itemizedlist&quot;=">
<charlist charsubsetref="block">
<indent inherit="1" leftind="@+3.5mm"/"></charlist>
</e-i-c>

<e-i-c gi="para">
<charlist inherit="1" charsubsetref="block" postspace_high_2&quot;="></charlist>
</e-i-c>

<e-i-c gi="para" context="listitem" *=" itemizedlist&quot;=" occur="first">
<charlist inherit="1"></charlist>
<att>
<specval attname="editor-only" attloc="system-var" attval="#NONE"/">
<charsubset>
<usetext source="\conditional" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text=" conditional=" text\&quot;=">
<subchars charsubsetref="block" postspace_high_2&quot;=">
<indent inherit="1" firstln="*"/">
</subchars>
</usetext>
</charsubset>
</att>
<att>
<specval attname="editor-only" attloc="system-var" attval="#NONE"/">
<charsubset>
<suppress sup="1"/">
<usetext source="spacefill,bullet.txt,spacefill,@3.5mm,#CONTENT" placemnt="before">
<subchars charsubsetref="block" postspace_high_2&quot;=">
<indent inherit="1" firstln="*-3.5mm"/">
</subchars>
</usetext>
</charsubset>
</att>
</e-i-c>

<e-i-c gi="para" context="listitem" *=" itemizedlist&quot;=" occur="notfirst">
<charlist inherit="1" charsubsetref="block" postspace_high_2&quot;=">
<indent inherit="1" firstln="*"/">
</charlist>
</e-i-c>



What exactly is the problem with the indents? Also, be sure indent is coded in the docdesc.

Suzanne


----------
Announcements

Top Tags