single-spaced lists

Jun 11, 2011 at 8:00 PM

I have been trying to create more compact, single-spaced lists in conceptual content pages.  After fooling around with <markup> in an attempt to make the lists manually instead of with <list> I discovered something odd.  If I insert <markup><pre></pre></markup> the page starts using a different, smaller font (Bear in mind that I am totally new to XML and for that matter HTML; I'm a C# .Net programmer assigned to investigate tools to help doc our API, so what is obvious to you might not be to me).  It may also be changing the spacing of the lists, or it may just look that way because of the smaller font.  The result is, in fact, almost exactly what I want, which is more compressed list styles, since my lists consist of only links to the reference (using codeEntityReference).  However I would like to turn the old default font back on after the list.  I would also like to not rely on a bug or odd side effect, in general.  Ideally there would a way to change the list spacing directly which I haven't found.

This simple code shows the two list styles.  Note that simply using <markup></markup> does not change the font, the <pre></pre> seems to be the culprit.

<list class="bullet">
  <listItem><para>Item 1</para></listItem>
  <listItem><para>Item 2</para></listItem>
</list>
<markup><pre></pre></markup>
<list class="bullet">
  <listItem><para>Item 1</para></listItem>
  <listItem><para>Item 2</para></listItem>
</list>

Editor
Jun 13, 2011 at 3:19 PM

I don't know why using the <pre> element in the <markup> element changes the font size/spacing.  It could be a bug in the presentation style or transformations.  Have you applied the Sandcastle Styles patch?  It fixes a number of bugs and other issues with the transformations and MAML support.

Regardless, using <markup> to get different styles isn't the best use of it in this case.  If you want to affect the style for all lists, modify the Presentation.css stylesheet file instead.  You'll find it in the C:\Program Files (x86)\Sandcastle\Presentation\VS2005\Styles folder.  Find the "li" entry and change the margin properties to suit your needs.

Eric

 

Jun 13, 2011 at 6:00 PM

Thanks Eric.  I just started this project last month, so I have the latest of everything.  I'm able to change the style of lists as you said, but even a margin of 0.0em (or 1px) leaves about twice the spacing as the <markup> hack does.  Increasing the margins increases the spacing, so I'm changing the right setting.  I've tried changing the font and font-size, which works for the font but leaves the same minimum spacing.  I've also tried padding, which works like margin, increasing the spacing but leaving the same minimium spacing when set to zero.

Jun 13, 2011 at 6:41 PM

Never mind, I just had the bright idea of trying a negative margin, which works nicely.  Thanks for your help!