@@ -772,6 +772,7 @@ <h3>Pseudo-algorithm</h3>
772772
773773< p > The < code > floor()</ code > function rounds a number to the next smaller integer.
774774
775+ <!--
775776<pre>
776777(01) if ((column-width = auto) and (column-count = auto)) or
777778(02) ((available-width = unknown) and (column-count = auto)) then
@@ -809,36 +810,37 @@ <h3>Pseudo-algorithm</h3>
809810</pre>
810811
811812<p><span class=issue>Alternative encoding of pseudo-algorithm:
813+ -->
812814
813815< pre >
814816(01) if ((column-width = auto) and (column-count = auto)) then
815- exit; /* not a multicol element */
817+ (02) exit; /* not a multicol element */
816818
817- (02 ) if ((available-width = unknown) and (column-count = auto)) then
818- (03 ) exit; /* no columns */
819+ (03 ) if ((available-width = unknown) and (column-count = auto)) then
820+ (04 ) exit; /* no columns */
819821
820- (06 ) if (available-width = unknown) and (column-count != auto) and (column-width != auto) then
821- (07 ) N := column-count;
822- (08 ) W := column-width;
823- (09) exit;
822+ (05 ) if (available-width = unknown) and (column-count != auto) and (column-width != auto) then
823+ (06 ) N := column-count;
824+ (07 ) W := column-width;
825+ (08) exit;
824826
825- (12 ) if (available-width = unknown) then
826- (13 ) available-width := shrink-to-fit;
827+ (09 ) if (available-width = unknown) then
828+ (10 ) available-width := shrink-to-fit;
827829
828- (16 ) if (column-width = auto) and (column-count != auto) then
829- (18 ) N := column-count;
830- (19 ) W := max(0, (available-width - ((N - 1) * column-gap)) / N);
831- exit;
830+ (11 ) if (column-width = auto) and (column-count != auto) then
831+ (12 ) N := column-count;
832+ (13 ) W := max(0, (available-width - ((N - 1) * column-gap)) / N);
833+ (14) exit;
832834
833- (27 ) if (column-width != auto) and (column-count = auto) then
834- (32 ) N := min (1, floor((available-width + column-gap) / (column-width + column-gap)));
835- (33 ) W := ((available-width + column-gap) / N) - column-gap;
836- exit;
835+ (15 ) if (column-width != auto) and (column-count = auto) then
836+ (16 ) N := max (1, floor((available-width + column-gap) / (column-width + column-gap)));
837+ (17 ) W := ((available-width + column-gap) / N) - column-gap;
838+ (18) exit;
837839
838- if (column-width != auto) and (column-count != auto) then
839- (39 ) N := min(column-count, floor((available-width + column-gap) / (column-width + column-gap)))
840- (40 ) W := ((available-width + column-gap) / N) - column-gap;
841- exit
840+ (19) if (column-width != auto) and (column-count != auto) then
841+ (20 ) N := min(column-count, floor((available-width + column-gap) / (column-width + column-gap)))
842+ (21 ) W := ((available-width + column-gap) / N) - column-gap;
843+ (22) exit
842844</ pre >
843845
844846
@@ -847,10 +849,11 @@ <h3>Pseudo-algorithm</h3>
847849
848850< p class =note > Note that, in most cases, only one of 'column-width' and
849851'column-count' affect the layout. If 'column-width' has a value other
850- than ''auto'', 'column-count' will be ignored. The only case when both
851- 'column-width' and 'column-count' can affect the layout is for element
852- where the width of the element has not been determined. This can,
853- e.g., be the case for table cells and floats.
852+ than ''auto'', 'column-count' indicates the maximum number of columns.
853+ However, both 'column-width' and 'column-count' are honored when the
854+ width of the element has not been determined. This can, e.g., be the
855+ case for table cells and floats.
856+
854857
855858
856859< h3 > Stacking context</ h3 >
0 commit comments