void TeXDisplay::initialMatter() { const char * font = "normalsize"; int columns = 1; StringAccumulator baselineskip; if(strcmp(font,"normalsize")==0) { baselineskip.add("12pt"); } else if(strcmp(font,"small")==0) { baselineskip.add("9pt"); } else { GBStream << "FontSize " << font << " not supported."; DBG(); // font = "normalsize"; baselineskip.add("12pt"); }; if(columns==2) { d_sink.put("\\documentclass[proc]{article}\n"); d_sink.put("\\textheight 25.0000cm\n"); d_sink.put("\\textwidth 17.27cm\n"); d_sink.put("\\topmargin -3.0000cm\n"); d_sink.put("\\oddsidemargin -0.3462cm\n"); d_sink.put("\\evensidemargin -0.3462cm\n"); d_sink.put("\\arraycolsep 2.5pt\n"); } else { //d_sink << "\\documentclass[rep10,leqno]{report}\n" d_sink.put("\\documentclass[leqno]{report}\n"); d_sink.put("\\voffset = -1in\n"); d_sink.put("\\evensidemargin 0.1in\n"); d_sink.put("\\oddsidemargin 0.1in\n"); d_sink.put("\\textheight 9in\n"); d_sink.put("\\textwidth 6in\n"); }; };
void _CppTeXTheFile(Source & so,Sink & si) { stringGB format; so >> format; StringAccumulator x; x.add(PlatformSpecific::s_latex_command()); x.add(format.value().chars()); so.shouldBeEnd(); si.noOutput(); system(x.chars()); };
void _ShowTeX(Source & so,Sink & si) { stringGB format; so >> format; StringAccumulator x; x.add(PlatformSpecific::s_dvi_viewer()); x.add(format.value().chars()); x.add(PlatformSpecific::s_background()); so.shouldBeEnd(); si.noOutput(); system(x.chars()); };
void IISource::getAnything(StringAccumulator & acc) { int type = getType(); symbolGB y; if(type==GBInputNumbers::s_IOSYMBOL) { get(y); acc.add(y.value().chars()); } else { Alias<ISource> iso(inputFunction(y)); acc.add(y.value().chars()); bool first = true; while(!iso().eoi()) { if(!first) acc.add(','); ((IISource &)iso.access()).getAnything(acc); }; }; };