Lists made from an indent and a tab stop

Bulleted, numbered and nested lists, each built out of an indent that hangs out to the left and one tab stop rather than out of list machinery: the marker sits in the room the indent opens, and every line below the first begins where the tabulation put the text.

JSON write_lists.json 125 lines

This one is not a program. It is the request the document server is sent: the same page, asked for over the network by an application that writes no PDF code at all.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
  "items": [
    {
      "type": "flow",
      "rect": {
        "llx": 70.0,
        "lly": 760.8,
        "urx": 280.0,
        "ury": 780.0
      },
      "content": "Bulleted: a bullet, a tabulation, and 14 points in front of the body.",
      "font": "DejaVuSans",
      "font_size": 8.0
    },
    {
      "type": "flow",
      "rect": {
        "llx": 70.0,
        "lly": 672.8,
        "urx": 280.0,
        "ury": 756.8
      },
      "content": "•\tEvery line below the first lines up with the words, not with the bullet.\n•\tThe marker hangs in the room the negative first-line indent opens.\n•\tA long item wraps inside the block and stays inside it.",
      "font": "DejaVuSans",
      "font_size": 10.5,
      "leading": 14.0,
      "hanging_list": {
        "marker": 0.0,
        "body": 14.0
      }
    },
    {
      "type": "flow",
      "rect": {
        "llx": 320.0,
        "lly": 760.8,
        "urx": 530.0,
        "ury": 780.0
      },
      "content": "Numbered: the same block, widened to 22 points for the widest marker.",
      "font": "DejaVuSans",
      "font_size": 8.0
    },
    {
      "type": "flow",
      "rect": {
        "llx": 320.0,
        "lly": 658.8,
        "urx": 530.0,
        "ury": 756.8
      },
      "content": "1.\tA number hangs out to the left exactly as a bullet does.\n2.\tThe room in front is what the widest marker needs, not the narrowest.\n10.\tA two-figure number still ends before the stop the body begins at.",
      "font": "DejaVuSans",
      "font_size": 10.5,
      "leading": 14.0,
      "hanging_list": {
        "marker": 0.0,
        "body": 22.0
      }
    },
    {
      "type": "flow",
      "rect": {
        "llx": 70.0,
        "lly": 630.4,
        "urx": 530.0,
        "ury": 640.0
      },
      "content": "Nested: the inner list is the same block again, its markers standing where the outer bodies begin.",
      "font": "DejaVuSans",
      "font_size": 8.0
    },
    {
      "type": "flow",
      "rect": {
        "llx": 70.0,
        "lly": 612.4,
        "urx": 530.0,
        "ury": 626.4
      },
      "content": "1.\tPrepare the document, the font it draws through and the page it fills.",
      "font": "DejaVuSans",
      "font_size": 10.5,
      "leading": 14.0,
      "hanging_list": {
        "marker": 0.0,
        "body": 22.0
      }
    },
    {
      "type": "flow",
      "rect": {
        "llx": 70.0,
        "lly": 584.4,
        "urx": 530.0,
        "ury": 612.4
      },
      "content": "a.\tRead the font from its file and hand it to the document.\nb.\tName the page size, in points.",
      "font": "DejaVuSans",
      "font_size": 10.5,
      "leading": 14.0,
      "hanging_list": {
        "marker": 22.0,
        "body": 44.0
      }
    },
    {
      "type": "flow",
      "rect": {
        "llx": 70.0,
        "lly": 570.4,
        "urx": 530.0,
        "ury": 584.4
      },
      "content": "2.\tAdd each page, with the content stream it was built from.",
      "font": "DejaVuSans",
      "font_size": 10.5,
      "leading": 14.0,
      "hanging_list": {
        "marker": 0.0,
        "body": 22.0
      }
    }
  ]
}