BCcampus / pressbooks-textbook

A plugin that extends Pressbooks for textbook authoring
GNU General Public License v2.0
25 stars 13 forks source link

Ordered List Rendering #58

Closed lane-bmc closed 8 years ago

lane-bmc commented 8 years ago

A few issues with rendering ordered lists (and nested OLs) and the discrepancies between Pressbooks preview and browser rendering.

The following is the code used:

  1. Why do economists use the ceteris paribus assumption?
  2. In an analysis of the market for paint, an economist discovers the facts listed below. State whether each of these changes will affect supply or demand, and in what direction.
    1. There have recently been some important cost-saving inventions in the technology for making paint.
    2. Paint is lasting longer, so that property owners need not repaint as often.
    3. Because of severe hailstorms, many people need to repaint now.
    4. The hailstorms damaged several factories that make paint, forcing them to close down for several months.
  3. Many changes are affecting the market for oil. Predict how each of the following events will affect the equilibrium price and quantity in the market for oil. In each case, state how the event will affect the supply and demand diagram. Create a sketch of the diagram if necessary.
    1. Cars are becoming more fuel efficient, and therefore get more miles to the gallon.
    2. The winter is exceptionally cold.
    3. A major discovery of new oil is made off the coast of Norway.
    4. The economies of some major oil-using nations, like Japan, slow down.
    5. A war in the Middle East disrupts oil-pumping schedules.
    6. Landlords install additional insulation in buildings.
    7. The price of solar energy falls dramatically.
    8. Chemical companies invent a new, popular kind of plastic made from oil.
    A screenshot from the PressBooks Visual panel view of this code: ![image](https://cloud.githubusercontent.com/assets/14902378/14691604/f17bac6e-0706-11e6-8f03-1ed1bfcd8323.png) A screenshot from the rendered version (same in all major browsers) of this same code: ![image](https://cloud.githubusercontent.com/assets/14902378/14691631/2668b886-0707-11e6-87dd-1d593b936736.png) **Issues** The rendered browser version lacks hanging indents, and when nesting the lists there isn't enough space to differentiate between the two levels of hierarchy. Also, rendering seems to not like the lettered lists, and converts them all to numbers (e.g. a, b, c becomes 1.1, 1.2, 1.3) despite the inline code stating otherwise.
bdolor commented 8 years ago

thanks @lane-bmc — will take a look

lane-bmc commented 8 years ago

One more issue found - nesting unordered lists inside ordered lists seems to produce bullet points with both bullet points and numbering.

Code used:

<ol>
    <li id="fs-idm19487600">To compute the amount spent on each fruit in each year, you multiply the quantity of each fruit by the price.
<ul id="fs-idm60615088">
    <li>10 apples × 50 cents each = $5.00 spent on apples in 2001.</li>
    <li>12 bananas × 20 cents each = $2.40 spent on bananas in 2001.</li>
    <li>2 bunches of grapes at 65 cents each = $1.30 spent on grapes in 2001.</li>
    <li>1 pint of raspberries at $2 each = $2.00 spent on raspberries in 2001.</li>
</ul>

Intended look:

  1. To compute the amount spent on each fruit in each year, you multiply the quantity of each fruit by the price.
    • 10 apples × 50 cents each = $5.00 spent on apples in 2001.
    • 12 bananas × 20 cents each = $2.40 spent on bananas in 2001.
    • 2 bunches of grapes at 65 cents each = $1.30 spent on grapes in 2001.
    • 1 pint of raspberries at $2 each = $2.00 spent on raspberries in 2001.

Actual rendering:

image

bdolor commented 8 years ago

resolved via https://github.com/BCcampus/pressbooks-textbook/commit/126d7536162addb5227b8ae7380f020c59afd35f and https://github.com/BCcampus/pressbooks-textbook/commit/baaf0d4f4e6f82b3287f38d26170011beeedd698