Changeset 17


Ignore:
Timestamp:
05/06/08 13:54:05 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/io/TEXWriter.java

    r4 r17  
    5757
    5858                String first = toWrite.get(0);
    59                 int ind = first.indexOf(":");
     59                TexEnvironment te = new TexEnvironment(first);
    6060
    61                 if (ind > 0) {
    62                         String tag = first.substring(0, ind);
    63                         _writer.write("\\" + tag + "{" + ItemWriter.NEW_LINE);
     61                if (te.isValid()) {
     62                        if (te.hasComment())
     63                                _writer.write("%" + te.getComment() + ItemWriter.NEW_LINE);
     64                        _writer.write("\\begin{" + te.getName() + "}" + ItemWriter.NEW_LINE);
    6465                }
    6566        }
    66 
     67       
    6768        @Override
    6869        protected void writeEndLink(Item linker) throws IOException {
     
    7576
    7677                String first = toWrite.get(0);
    77                 int ind = first.indexOf(":");
     78                TexEnvironment te = new TexEnvironment(first);
    7879
    79                 if (ind > 0) {
    80                         _writer.write("}" + ItemWriter.NEW_LINE);
     80                if (te.isValid()) {
     81                        _writer.write("\\end{" + te.getName() + "}" + ItemWriter.NEW_LINE);
    8182                }
    8283
     
    9697        }
    9798}
     99
Note: See TracChangeset for help on using the changeset viewer.