コード例 #1
0
        private void Initialize()
        {
            PNtoTeX.Normalize();
            NetCanvasWidth.Text      = (PNtoTeX.MaxX / PNtoTeX.koefX).ToString("f3");
            NetCanvasHeight.Text     = (PNtoTeX.MaxY / PNtoTeX.koefY).ToString("f3");
            CenterNetAlign.IsChecked = true;
            Save.IsEnabled           = false;

            PreambleText.Text = PUTBEFORE + "\n" + PNtoTeX.Implementation();
        }
コード例 #2
0
        public void SaveFullDocument(string path)
        {
            string s = @"\documentclass[a4paper]{article}" + "\n";

            s += PNtoTeX.Implementation() + "\n";
            s += @"\begin{document}" + "\n\n";
            s += RightNetAlign.IsChecked == true?PNtoTeX.RResult() :
                     CenterNetAlign.IsChecked == true?PNtoTeX.CResult() : PNtoTeX.Result();

            s += "\n" + @"\end{document}";

            using (StreamWriter Writer = new StreamWriter(path))
            {
                Writer.Write(s);
            }
        }