Skip to content

Commit d3cd909

Browse files
committed
Wrap listing and figure captions to single line
The prior version had caption blocks wrapped to maintain the 100-character width source. However, Markdeep suffered a regression at v1.16 (current version v1.17 at this commit) where everything past the first linefeed in the caption block is ignored. To work around this bug, this change converts all caption lines to a single block. Note that figures/images still have an optional linefeed before the closing square bracket and the parenthesized target. Resolves #1583
1 parent 410789c commit d3cd909

File tree

3 files changed

+25
-75
lines changed

3 files changed

+25
-75
lines changed

books/RayTracingInOneWeekend.html

+10-30
Original file line numberDiff line numberDiff line change
@@ -1251,9 +1251,7 @@
12511251
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
12521252
};
12531253
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1254-
[Listing [front-face-tracking]: <kbd>[hittable.h]</kbd>
1255-
Adding front-face tracking to hit_record
1256-
]
1254+
[Listing [front-face-tracking]: <kbd>[hittable.h]</kbd> Adding front-face tracking to hit_record]
12571255

12581256
<div class='together'>
12591257
And then we add the surface side determination to the class:
@@ -1448,9 +1446,7 @@
14481446
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ delete
14491447
#include "ray.h"
14501448
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1451-
[Listing [assume-rtw-hittable]: <kbd>[hittable.h]</kbd>
1452-
Assume rtweekend.h inclusion for hittable.h
1453-
]
1449+
[Listing [assume-rtw-hittable]: <kbd>[hittable.h]</kbd> Assume rtweekend.h inclusion for hittable.h]
14541450

14551451

14561452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ delete
@@ -1463,9 +1459,7 @@
14631459
using std::make_shared;
14641460
using std::shared_ptr;
14651461
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1466-
[Listing [assume-rtw-hittable-list]: <kbd>[hittable_list.h]</kbd>
1467-
Assume rtweekend.h inclusion for hittable_list.h
1468-
]
1462+
[Listing [assume-rtw-hittable-list]: <kbd>[hittable_list.h]</kbd> Assume rtweekend.h inclusion for hittable_list.h]
14691463

14701464

14711465
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ delete
@@ -1692,9 +1686,7 @@
16921686
...
16931687
};
16941688
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1695-
[Listing [hittable-list-with-interval]: <kbd>[hittable_list.h]</kbd>
1696-
hittable_list::hit() using interval
1697-
]
1689+
[Listing [hittable-list-with-interval]: <kbd>[hittable_list.h]</kbd> hittable_list::hit() using interval]
16981690

16991691

17001692
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
@@ -2044,9 +2036,7 @@
20442036
return distribution(generator);
20452037
}
20462038
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2047-
[Listing [random-double-alt]: <kbd>[rtweekend.h]</kbd>
2048-
random_double(), alternate implementation
2049-
]
2039+
[Listing [random-double-alt]: <kbd>[rtweekend.h]</kbd> random_double(), alternate implementation]
20502040

20512041

20522042
Generating Pixels with Multiple Samples
@@ -2429,9 +2419,7 @@
24292419
}
24302420
};
24312421
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2432-
[Listing [ray-color-random-unit]: <kbd>[camera.h]</kbd>
2433-
ray_color() using a random ray direction
2434-
]
2422+
[Listing [ray-color-random-unit]: <kbd>[camera.h]</kbd> ray_color() using a random ray direction]
24352423

24362424
<div class='together'>
24372425
... Indeed we do get rather nice gray spheres:
@@ -2577,9 +2565,7 @@
25772565
}
25782566
};
25792567
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2580-
[Listing [reflect-tolerance]: <kbd>[camera.h]</kbd>
2581-
Calculating reflected ray origins with tolerance
2582-
]
2568+
[Listing [reflect-tolerance]: <kbd>[camera.h]</kbd> Calculating reflected ray origins with tolerance]
25832569

25842570
<div class='together'>
25852571
This gets rid of the shadow acne problem. Yes it is really called that. Here's the result:
@@ -2895,9 +2881,7 @@
28952881
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
28962882
};
28972883
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2898-
[Listing [sphere-material]: <kbd>[sphere.h]</kbd>
2899-
Ray-sphere intersection with added material information
2900-
]
2884+
[Listing [sphere-material]: <kbd>[sphere.h]</kbd> Ray-sphere intersection with added material information]
29012885

29022886
</div>
29032887

@@ -3391,9 +3375,7 @@
33913375
double refraction_index;
33923376
};
33933377
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3394-
[Listing [dielectric-always-refract]: <kbd>[material.h]</kbd>
3395-
Dielectric material class that always refracts
3396-
]
3378+
[Listing [dielectric-always-refract]: <kbd>[material.h]</kbd> Dielectric material class that always refracts]
33973379

33983380
</div>
33993381

@@ -3521,9 +3503,7 @@
35213503
double refraction_index;
35223504
};
35233505
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3524-
[Listing [dielectric-with-refraction]: <kbd>[material.h]</kbd>
3525-
Dielectric material class with reflection
3526-
]
3506+
[Listing [dielectric-with-refraction]: <kbd>[material.h]</kbd> Dielectric material class with reflection]
35273507

35283508
</div>
35293509

books/RayTracingTheNextWeek.html

+6-18
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,7 @@
304304
...
305305
};
306306
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
307-
[Listing [material-time]: <kbd>[material.h]</kbd>
308-
Handle ray time in the material::scatter() methods
309-
]
307+
[Listing [material-time]: <kbd>[material.h]</kbd> Handle ray time in the material::scatter() methods]
310308

311309

312310
Putting Everything Together
@@ -363,9 +361,7 @@
363361
cam.render(world);
364362
}
365363
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
366-
[Listing [scene-spheres-moving]: <kbd>[main.cc]</kbd>
367-
Last book's final scene, but with moving spheres
368-
]
364+
[Listing [scene-spheres-moving]: <kbd>[main.cc]</kbd> Last book's final scene, but with moving spheres]
369365

370366
<div class='together'>
371367
This gives the following result:
@@ -800,9 +796,7 @@
800796
double size() const {
801797
...
802798
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
803-
[Listing [interval-from-intervals]: <kbd>[interval.h]</kbd>
804-
Interval constructor from two intervals
805-
]
799+
[Listing [interval-from-intervals]: <kbd>[interval.h]</kbd> Interval constructor from two intervals]
806800

807801
</div>
808802

@@ -1196,9 +1190,7 @@
11961190
const aabb aabb::empty = aabb(interval::empty, interval::empty, interval::empty);
11971191
const aabb aabb::universe = aabb(interval::universe, interval::universe, interval::universe);
11981192
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1199-
[Listing [aabb-empty-and-axis]: <kbd>[aabb.h]</kbd>
1200-
New aabb constants and longest_axis() function
1201-
]
1193+
[Listing [aabb-empty-and-axis]: <kbd>[aabb.h]</kbd> New aabb constants and longest_axis() function]
12021194

12031195
As before, you should see identical results to [image 1](#image-bouncing-spheres), but rendering a
12041196
little bit faster. On my system, this yields something like an additional 18% render speedup. Not
@@ -3297,9 +3289,7 @@
32973289
}
32983290
};
32993291
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3300-
[Listing [ray-color-emitted]: <kbd>[camera.h]</kbd>
3301-
ray_color function with background and emitting materials
3302-
]
3292+
[Listing [ray-color-emitted]: <kbd>[camera.h]</kbd> ray_color function with background and emitting materials]
33033293

33043294
<div class='together'>
33053295
`main()` is updated to set the background color for the prior scenes:
@@ -3748,9 +3738,7 @@
37483738
return ival + displacement;
37493739
}
37503740
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3751-
[Listing [interval-plus-displacement]: <kbd>[interval.h]</kbd>
3752-
The interval + displacement operator
3753-
]
3741+
[Listing [interval-plus-displacement]: <kbd>[interval.h]</kbd> The interval + displacement operator]
37543742

37553743

37563744
Instance Rotation

books/RayTracingTheRestOfYourLife.html

+9-27
Original file line numberDiff line numberDiff line change
@@ -1442,9 +1442,7 @@
14421442
std::cout << "I = " << sum / N << '\n';
14431443
}
14441444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1445-
[Listing [main-sphereimp]: <kbd>[sphere_importance.cc]</kbd>
1446-
Generating importance-sampled points on the unit sphere
1447-
]
1445+
[Listing [main-sphereimp]: <kbd>[sphere_importance.cc]</kbd> Generating importance-sampled points on the unit sphere]
14481446

14491447
The analytic answer is $\frac{4}{3} \pi = 4.188790204786391$ -- if you remember enough advanced
14501448
calc, check me! And the code above produces that. The key point here is that all of the integrals
@@ -1718,9 +1716,7 @@
17181716
shared_ptr<texture> tex;
17191717
};
17201718
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1721-
[Listing [class-lambertian-impsample]: <kbd>[material.h]</kbd>
1722-
Lambertian material, modified for importance sampling
1723-
]
1719+
[Listing [class-lambertian-impsample]: <kbd>[material.h]</kbd> Lambertian material, modified for importance sampling]
17241720

17251721
</div>
17261722

@@ -1763,9 +1759,7 @@
17631759
}
17641760
};
17651761
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1766-
[Listing [ray-color-impsample]: <kbd>[camera.h]</kbd>
1767-
The ray_color function, modified for importance sampling
1768-
]
1762+
[Listing [ray-color-impsample]: <kbd>[camera.h]</kbd> The ray_color function, modified for importance sampling]
17691763

17701764
</div>
17711765

@@ -1818,9 +1812,7 @@
18181812
return color_from_emission + color_from_scatter;
18191813
}
18201814
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1821-
[Listing [ray-color-uniform]: <kbd>[camera.h]</kbd>
1822-
The ray_color function, now with a uniform PDF in the denominator
1823-
]
1815+
[Listing [ray-color-uniform]: <kbd>[camera.h]</kbd> The ray_color function, now with a uniform PDF in the denominator]
18241816

18251817
You should get a very similar result to before, only with slightly more noise, it may be hard to
18261818
see.
@@ -2116,9 +2108,7 @@
21162108
return vec3(x, y, z);
21172109
}
21182110
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2119-
[Listing [random-cosine-direction]: <kbd>[vec3.h]</kbd>
2120-
Random cosine direction utility function
2121-
]
2111+
[Listing [random-cosine-direction]: <kbd>[vec3.h]</kbd> Random cosine direction utility function]
21222112

21232113
</div>
21242114

@@ -2425,9 +2415,7 @@
24252415
...
24262416
};
24272417
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2428-
[Listing [scatter-ray-color]: <kbd>[camera.h]</kbd>
2429-
Updated ray_color function with returned PDF value
2430-
]
2418+
[Listing [scatter-ray-color]: <kbd>[camera.h]</kbd> Updated ray_color function with returned PDF value]
24312419

24322420
<div class='together'>
24332421
Which produces:
@@ -2471,9 +2459,7 @@
24712459
shared_ptr<texture> tex;
24722460
};
24732461
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2474-
[Listing [class-isotropic-impsample]: <kbd>[material.h]</kbd>
2475-
Isotropic material, modified for importance sampling
2476-
]
2462+
[Listing [class-isotropic-impsample]: <kbd>[material.h]</kbd> Isotropic material, modified for importance sampling]
24772463

24782464
</div>
24792465

@@ -2670,9 +2656,7 @@
26702656
}
26712657
};
26722658
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2673-
[Listing [emitted-ray-color]: <kbd>[camera.h]</kbd>
2674-
Material emission, camera::ray_color() changes
2675-
]
2659+
[Listing [emitted-ray-color]: <kbd>[camera.h]</kbd> Material emission, camera::ray_color() changes]
26762660

26772661

26782662
<div class='together'>
@@ -3601,9 +3585,7 @@
36013585
}
36023586
};
36033587
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3604-
[Listing [ray-color-implicit]: <kbd>[camera.h]</kbd>
3605-
Ray color function with implicitly-sampled rays
3606-
]
3588+
[Listing [ray-color-implicit]: <kbd>[camera.h]</kbd> Ray color function with implicitly-sampled rays]
36073589

36083590
</div>
36093591

0 commit comments

Comments
 (0)