Back to index

texmacs  1.0.7.15
markup.cpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : markup.cpp
00004 * DESCRIPTION: This plugin demonstrates the interaction between
00005 *              a plugin and a style file (../packages/session/markup.ts).
00006 *              The style file both contains customizations of the input
00007 *              and output environments and an additional tag 'foo'.
00008 * COPYRIGHT  : (C) 2003  Joris van der Hoeven
00009 *******************************************************************************
00010 * This software falls under the GNU general public license version 3 or later.
00011 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00012 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00013 ******************************************************************************/
00014 
00015 #include <iostream>
00016 using namespace std;
00017 
00018 #define DATA_BEGIN   ((char) 2)
00019 #define DATA_END     ((char) 5)
00020 #define DATA_ESCAPE  ((char) 27)
00021 
00022 int
00023 main () {
00024   cout << DATA_BEGIN << "verbatim:";
00025   cout << "Enter a LaTeX expression at each prompt";
00026   cout << DATA_END;
00027   cout.flush ();
00028 
00029   while (true) {
00030     char buffer[100];
00031     cin.getline (buffer, 100, '\n');
00032     cout << DATA_BEGIN << "latex:";
00033     cout << "$\\foo{" << buffer << "}$";
00034     cout << DATA_END;
00035     cout.flush ();
00036   }
00037   return 0;
00038 }