protected override void Write(LatexRenderer renderer, MathBlock obj)
 {
     renderer.EnsureLine();
     renderer.WriteLine("\\begin{equation*}");
     renderer.WriteLeafRawLines(obj, true, false);
     renderer.WriteLine("\\end{equation*}").WriteLine();
 }
 protected override void Write(LatexRenderer renderer, LineBreakInline obj)
 {
     if (RenderAsHardlineBreak)
     {
         renderer.WriteLine("\\newline");
     }
 }
Esempio n. 3
0
 protected override void Write(LatexRenderer renderer, LineBreakInline obj)
 {
     if (renderer.EnableLatexForInline)
     {
         if (obj.IsHard || RenderAsHardlineBreak)
         {
             renderer.WriteLine(@"\\");
         }
         else
         {
             renderer.WriteLine();
         }
     }
     else
     {
         renderer.Write(" ");
     }
 }
Esempio n. 4
0
        protected override void Write(LatexRenderer renderer, QuoteBlock obj)
        {
            renderer.EnsureLine();
            renderer.Write(@"\begin{quote}") /*.WriteAttributes(obj).WriteLine(">")*/;
            var savedImplicitParagraph = renderer.ImplicitParagraph;

            renderer.ImplicitParagraph = false;
            renderer.WriteChildren(obj);
            renderer.ImplicitParagraph = savedImplicitParagraph;
            renderer.WriteLine(@"\end{quote}");
        }
Esempio n. 5
0
        protected override void Write(LatexRenderer renderer, ListBlock listBlock)
        {
            renderer.EnsureLine();
            if (listBlock.IsOrdered)
            {
                renderer.Write("\\begin{enumerate}\n");
                //if (listBlock.BulletType != '1')
                //{
                //    renderer.Write(" type=\"").Write(listBlock.BulletType).Write("\"");
                //}

                //if (listBlock.OrderedStart != null && (listBlock.OrderedStart != "1"))
                //{
                //    renderer.Write(" start=\"").Write(listBlock.OrderedStart).Write("\"");
                //}
                //renderer.WriteAttributes(listBlock);
                //renderer.WriteLine(">");
            }
            else
            {
                renderer.Write("\\begin{itemize}\n");
                //renderer.WriteAttributes(listBlock);
                //renderer.WriteLine(">");
            }
            foreach (var item in listBlock)
            {
                var listItem         = (ListItemBlock)item;
                var previousImplicit = renderer.ImplicitParagraph;
                renderer.ImplicitParagraph = !listBlock.IsLoose;

                //renderer.EnsureLine();
                renderer.Write(@"    \item ") /*.WriteAttributes(listItem).Write("]")*/;
                renderer.WriteChildren(listItem);
                renderer.WriteLine();

                renderer.ImplicitParagraph = previousImplicit;
            }
            renderer.WriteLine(listBlock.IsOrdered ? "\\end{enumerate}" : "\\end{itemize}");
        }