@@ -2406,8 +2406,7 @@ parseAligns = try $ do
24062406 case safeRead ds of
24072407 Just w -> return w
24082408 Nothing -> return 0.0
2409− let alignSpec = try $ do
2410− spaces
2409+ let alignSpec = do
24112410 pref <- option [] alignPrefix
24122411 spaces
24132412 al <- alignChar
@@ -2418,10 +2417,21 @@ parseAligns = try $ do
24182417 spaces
24192418 suff <- option [] alignSuffix
24202419 return (al, width, (pref, suff))
2420+ let starAlign = do -- *{2}{r} == rr, we just expand like a macro
2421+ symbol '*'
2422+ spaces
2423+ ds <- trim . toksToString <$> braced
2424+ spaces
2425+ spec <- braced
2426+ case safeRead ds of
2427+ Just n -> do
2428+ getInput >>= setInput . (mconcat (replicate n spec) ++)
2429+ Nothing -> fail $ "Could not parse " ++ ds ++ " as number"
24212430 bgroup
24222431 spaces
24232432 maybeBar
2424− aligns' <- many (alignSpec <* maybeBar)
2433+ aligns' <- many $ try $ spaces >> optional starAlign >>
2434+ (alignSpec <* maybeBar)
24252435 spaces
24262436 egroup
24272437 spaces