diff --git a/IPython/nbconvert/exporters/templateexporter.py b/IPython/nbconvert/exporters/templateexporter.py
index 782410b..a9213a3 100644
--- a/IPython/nbconvert/exporters/templateexporter.py
+++ b/IPython/nbconvert/exporters/templateexporter.py
@@ -44,7 +44,7 @@ default_filters = {
         'filter_data_type': filters.DataTypeFilter,
         'get_lines': filters.get_lines,
         'highlight2html': filters.Highlight2Html,
-        'highlight2latex': filters.highlight2latex,
+        'highlight2latex': filters.Highlight2Latex,
         'ipython2python': filters.ipython2python,
         'posix_path': filters.posix_path,
         'markdown2latex': filters.markdown2latex,
diff --git a/IPython/nbconvert/filters/highlight.py b/IPython/nbconvert/filters/highlight.py
index 0b0374f..e246d7b 100644
--- a/IPython/nbconvert/filters/highlight.py
+++ b/IPython/nbconvert/filters/highlight.py
@@ -18,11 +18,11 @@ from pygments import highlight as pygements_highlight
 from pygments.lexers import get_lexer_by_name
 from pygments.formatters import HtmlFormatter
 from pygments.formatters import LatexFormatter
-from IPython.config import catch_config_error, Configurable
-from IPython.utils.traitlets import Unicode
+
 
 # Our own imports
 from IPython.nbconvert.utils.lexers import IPythonLexer
+from IPython.nbconvert.utils.base import NbConvertBase
 
 #-----------------------------------------------------------------------------
 # Globals and constants
@@ -36,13 +36,11 @@ MULTILINE_OUTPUTS = ['text', 'html', 'svg', 'latex', 'javascript', 'json']
 
 __all__ = [
     'Highlight2Html',
-    'highlight2latex'
+    'Highlight2Latex'
 ]
 
 
-class Highlight2Html(Configurable):
-
-    language = Unicode('ipython', config=True, help='default highlight language')
+class Highlight2Html(NbConvertBase):
 
     def __call__(self, source, language=None, metadata=None):
         """
@@ -58,32 +56,37 @@ class Highlight2Html(Configurable):
             metadata of the cell to highlight
         """
         if not language:
-            language=self.language
+            language=self.default_language
 
         return _pygment_highlight(source, HtmlFormatter(), language, metadata)
 
 
-def highlight2latex(source, language='ipython', metadata=None, strip_verbatim=False):
-    """
-    Return a syntax-highlighted version of the input source as latex output.
+class Highlight2Latex(NbConvertBase):
 
-    Parameters
-    ----------
-    source : str
-        source of the cell to highlight
-    language : str
-        language to highlight the syntax of
-    metadata : NotebookNode cell metadata
-        metadata of the cell to highlight
-    strip_verbatim : bool
-        remove the Verbatim environment that pygments provides by default
-    """
-    latex = _pygment_highlight(source, LatexFormatter(), language, metadata)
-    if strip_verbatim:
-        latex = latex.replace(r'\begin{Verbatim}[commandchars=\\\{\}]' + '\n', '')
-        return latex.replace('\n\\end{Verbatim}\n', '')
-    else:
-        return latex
+    def __call__(self, source, language=None, metadata=None, strip_verbatim=False):
+        """
+        Return a syntax-highlighted version of the input source as latex output.
+
+        Parameters
+        ----------
+        source : str
+            source of the cell to highlight
+        language : str
+            language to highlight the syntax of
+        metadata : NotebookNode cell metadata
+            metadata of the cell to highlight
+        strip_verbatim : bool
+            remove the Verbatim environment that pygments provides by default
+        """
+        if not language:
+            language=self.default_language
+
+        latex = _pygment_highlight(source, LatexFormatter(), language, metadata)
+        if strip_verbatim:
+            latex = latex.replace(r'\begin{Verbatim}[commandchars=\\\{\}]' + '\n', '')
+            return latex.replace('\n\\end{Verbatim}\n', '')
+        else:
+            return latex
 
 
 
diff --git a/IPython/nbconvert/filters/tests/test_highlight.py b/IPython/nbconvert/filters/tests/test_highlight.py
index 2e1e946..ed71ff4 100644
--- a/IPython/nbconvert/filters/tests/test_highlight.py
+++ b/IPython/nbconvert/filters/tests/test_highlight.py
@@ -15,14 +15,19 @@ Module with tests for Highlight
 #-----------------------------------------------------------------------------
 
 from ...tests.base import TestsBase
-from ..highlight import Highlight2Html, highlight2latex
-
+from ..highlight import Highlight2Html, Highlight2Latex
+from IPython.config import Config
+import xml
 
 #-----------------------------------------------------------------------------
 # Class
 #-----------------------------------------------------------------------------
 
 highlight2html = Highlight2Html()
+highlight2latex = Highlight2Latex()
+c = Config()
+c.Highlight2Html.default_language='ruby'
+highlight2html_ruby = Highlight2Html(config=c)
 
 class TestHighlight(TestsBase):
     """Contains test functions for highlight.py"""
@@ -35,6 +40,8 @@ class TestHighlight(TestsBase):
         def say(text):
             print(text)
 
+        end
+
         say('Hello World!')
         """,
         """
@@ -59,6 +66,20 @@ class TestHighlight(TestsBase):
         for index, test in enumerate(self.tests):
             self._try_highlight(highlight2latex, test, self.tokens[index])
 
+    def test_parse_html_many_lang(self):
+
+        ht =  highlight2html(self.tests[0])
+        rb =  highlight2html_ruby(self.tests[0])
+
+        for lang,tkns in [
+                ( ht, ('def','print') ),
+                ( rb, ('def','end'  ) )
+                ]:
+            root = xml.etree.ElementTree.fromstring(lang)
+            assert self._extract_tokens(root,'k') == set(tkns)
+
+    def _extract_tokens(self, root, cls):
+        return set(map(lambda x:x.text,root.findall(".//*[@class='"+cls+"']")))
 
     def _try_highlight(self, method, test, tokens):
         """Try highlighting source, look for key tokens"""
diff --git a/IPython/nbconvert/utils/base.py b/IPython/nbconvert/utils/base.py
index 85e8426..08ca3e2 100644
--- a/IPython/nbconvert/utils/base.py
+++ b/IPython/nbconvert/utils/base.py
@@ -13,6 +13,7 @@
 
 from IPython.utils.traitlets import List
 from IPython.config.configurable import LoggingConfigurable
+from IPython.utils.traitlets import Unicode
 
 #-----------------------------------------------------------------------------
 # Classes and functions
@@ -33,5 +34,7 @@ class NbConvertBase(LoggingConfigurable):
                     """
             )
 
+    default_language = Unicode('ipython', config=True, help='default highlight language')
+
     def __init__(self, **kw):
         super(NbConvertBase, self).__init__(**kw)