private static void fitToLine(final StringBuilder sb, int startIndex, final int stopIndex, final int itemsOnLine) {
        int counter = 1;
        while ((startIndex != -1) && (startIndex < stopIndex)) {
            if (counter % itemsOnLine == 0)
                sb.replace(startIndex, startIndex + 2, ",\\\\&");
            startIndex += 2;
            startIndex = sb.indexOf(", ", startIndex);
            counter++;
        }
    }