filters

latex.cc

00001 /* Copyright (C) 2003 Robert JACOLIN <rjacolin@ifrance.com>
00002  *
00003  * This library is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU Library General Public
00005  * License as published by the Free Software Foundation; either
00006  * version 2 of the License, or (at your option) any later version.
00007  *
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * Library General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Library General Public License
00014  * along with this library; see the file COPYING.LIB.  If not, write to
00015  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  * Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #include "latex.h"
00020 #include <element.h>
00021 
00022 Latex* Latex::_instance = 0;
00023 
00024 Element* Latex::getEnv(QPtrList<Element>* root, const char* name)
00025 {
00026     Element* elt;
00027     for ( elt = root->first(); elt; elt = root->next() )
00028     {
00029         if(elt->getName() == name && elt->getType() == Element::LATEX_ENV)
00030             return elt;
00031     }
00032     return 0;
00033 }
00034 
00035 Element* Latex::getCommand(QPtrList<Element>* root, const char* name)
00036 {
00037     Element* elt;
00038     for ( elt = root->first(); elt; elt = root->next() )
00039     {
00040         if(elt->getName() == name && elt->getType() == Element::LATEX_COMMAND)
00041             return elt;
00042     }
00043     return 0;
00044 }
KDE Home | KDE Accessibility Home | Description of Access Keys