예제 #1
0
파일: Utility.cs 프로젝트: EFanZh/EFanZh
        private static void ToLaTeX(this IGrouping<FontWeight, Font> weight, StringBuilder stringBuilder, int indent, string sampleText)
        {
            stringBuilder.AppendWithIndentFormat(0, @"\multirow{{{0}}}{{*}}{{{1}}} & ", weight.Count(), weight.Key.GetDisplayString());

            var styles = weight.GroupBy(t => t.Style).ToArray();

            styles.First().ToLaTeX(stringBuilder, indent, sampleText);

            foreach (var style in styles.Skip(1))
            {
                stringBuilder.AppendLineWithIndentFormat(indent, @"\cline{{3-{0}}}", Headers.Length);
                stringBuilder.AppendWithIndent(indent, "& & ");
                style.ToLaTeX(stringBuilder, indent, sampleText);
            }
        }
예제 #2
0
파일: Utility.cs 프로젝트: EFanZh/EFanZh
        private static void ToLaTeX(this IGrouping<FontStyle, Font> style, StringBuilder stringBuilder, int indent, string sampleText)
        {
            stringBuilder.AppendWithIndentFormat(0, @"\multirow{{{0}}}{{*}}{{{1}}} & ", style.Count(), style.Key.ToString());

            var fonts = style.GroupBy(t => t).ToArray();

            fonts.First().ToLaTeX(stringBuilder, sampleText);

            foreach (var font in fonts.Skip(1))
            {
                stringBuilder.AppendLineWithIndentFormat(indent, @"\cline{{4-{0}}}", Headers.Length);
                stringBuilder.AppendWithIndent(indent, "& & & ");
                font.ToLaTeX(stringBuilder, sampleText);
            }
        }
예제 #3
0
파일: Utility.cs 프로젝트: EFanZh/EFanZh
        private static void ToLaTeX(this IGrouping<FontStretch, Font> stretch, StringBuilder stringBuilder, int indent, string sampleText)
        {
            stringBuilder.AppendWithIndentFormat(indent, @"\multirow{{{0}}}{{*}}{{{1}}} & ", stretch.Count(), stretch.Key.GetDisplayString());

            var weights = stretch.GroupBy(t => t.Weight).ToArray();

            weights.First().ToLaTeX(stringBuilder, indent, sampleText);

            foreach (var weight in weights.Skip(1))
            {
                stringBuilder.AppendLineWithIndentFormat(indent, @"\cline{{2-{0}}}", Headers.Length);
                stringBuilder.AppendWithIndent(indent, "& ");
                weight.ToLaTeX(stringBuilder, indent, sampleText);
            }
        }