rfrank/ppgen — pull request #11 by davem2 (2014-09-24 22:07:20+00:00)
Title: Feature inline image

For my current project I needed the ability to display illustrations side by side so I added this feature to ppgen. The changes consist of a new option for the .il align parameter 'i' (inline), and a new directive .ic (inline container). This is a big change; I'm sure you have thought about this problem more than I have and just wanted to suggest a possible solution. Consider this pull request as an opening for discussion.

Here is an example of how to display two images side by side:
```
.ic
.il id=i096a fn=i_096a.jpg w=30% alt='' align='i' cj='c'
.ca Fig. 7.
.il id=i096b fn=i_096b.jpg w=30% alt='' align='i' cj='c'
.ca Fig. 8.
.ic-
```
HTML result from above code:
```

Fig. 7.

Fig. 8.

```
CSS result from above code:
```
div.inlinecontainer { clear: both; margin: 0em auto; text-align: center; max-width: 100%; }
.figinline { display:inline-block; vertical-align:middle; max-width:100%; margin:1em; text-align: center;}
div.figinline p { text-align:center; text-indent:0; }
```
Originally I had an override in place to use display:block rather than display:inline-block for eBook readers
```
@media handheld { .figinline { display:block; }}
```
But found that inline-block was handled properly on all devices I tested against and the override was not needed.

It's possible in the future that the .ic directive could be used for inline display of other block elements besides img (like a multi column layout?)