hutchresearch / latex2speech

TeX2Speech is an application that turns LaTeX documents into spoken audio.
https://tex2speech-website.vercel.app/
MIT License
12 stars 5 forks source link

Files Tested From 100K #91

Closed willsower closed 3 years ago

willsower commented 3 years ago

Note: I am writing a script that will process all files and output their errors

- Log3.log contains 582 outputs of LaTeX documents

In the Tai branch inside \Documentation\hundred_k_errors\ there is a directory called parsed_data, you can also find the files here. Failed.txt is a list of all files that were run that had errored and the names of that file. success.txt are the files that successfully ran.

error_log.txt Was a file that was created by going through a .log file. The .log file is too big to add to this issue, but it features 12,233 .tex files. The error_log is in the format of:

Count: 1448 | File: h2182.tex: | Command \item invalid in math mode.
Count: 117 | File: fkswm.tex: | "equation" env expecting \end{equation}. Instead got \end{array}

Where count is the number of occurences that error has occured. File is a test file that displays that error, and the last output is the name of the error.

These are the files I have tested. You can find them in \Documentation\hundred_k_errors

_latexindent_temp.tex
- Errors from TexSoup
! Doesn't render in overleaf because of package not found

arxiv.tex
- Errors from TexSoup
+ Renders in overleaf fine

gameon.tex
+ Runs fine! 
! Doesn't render in overleaf because of package not found

gameparadox-v7.tex
+ Runs fine! 
+ Renders in overleaf fine

generator.tex
- Errors from TexSoup
+ Renders in overleaf fine

hyper.tex
- Errors from TexSoup
+ Renders in overleaf fine

latexthesis.tex
- Errors from expand_macros file (I don't think it's a TexSoup error since it passed expand_labels fine)
+ Renders in overleaf fine

zzz.tex
- Errors from TexSoup
! Doesn't render in overleaf because of package not found

cells.tex
- Errors from TexSoup due to bracket group error in expand_macros
+ Renders in overleaf fine

dna.tex
- Errors from Assertion Error in TexParser
+ Renders in overleaf fine

globalRev.tex
- Errors from TexSoup
+ Renders in overleaf fine

soupfinal.tex
- Errors from Assertion Error in TexParser
+ Renders in overleaf fine

spatialsoup.tex
- Errors from TexSoup
! Doesn't render in overleaf because of package not found

log3.log

willsower commented 3 years ago

_latexindent_temp.tex Error Log

Notes: When running this in overleaf. It does not render because it doesn't know the package at the top of the file. Even though it doesn't render, it shouldn't matter the content.

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 10:48:56] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
    doc = expand_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 236, in expand_doc_macros
    return TexSoup.TexSoup(str(doc))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 212, in read_math_env
    unclosed_env_handler(src, expr, src.peek())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 186, in unclosed_env_handler
    raise EOFError('[Line: %d, Offset: %d] "%s" env expecting %s. %s' % (
EOFError: [Line: 0, Offset: 5727] "math" env expecting \). Reached end of file.

With expand_labels function commented out:

 File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
    doc = expand_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 236, in expand_doc_macros
    return TexSoup.TexSoup(str(doc))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 212, in read_math_env
    unclosed_env_handler(src, expr, src.peek())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 186, in unclosed_env_handler
    raise EOFError('[Line: %d, Offset: %d] "%s" env expecting %s. %s' % (
EOFError: [Line: 0, Offset: 5727] "math" env expecting \). Reached end of file.
willsower commented 3 years ago

aztec.tex Error Log

Notes: Renders fine in overleaf

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 10:50:32] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 323, in start_polly
    expand_doc_new_labels(master[0])
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 101, in expand_doc_new_labels
    contents = replace_references(doc.read(), myHash)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 72, in replace_references
    myDoc = TexSoup.TexSoup(str(contents))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 114, in read_expr
    return read_arg(src, c, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 284, in read_env
    unclosed_env_handler(src, expr, src.peek((0, 6)))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 186, in unclosed_env_handler
    raise EOFError('[Line: %d, Offset: %d] "%s" env expecting %s. %s' % (
EOFError: [Line: 0, Offset: 899] "figure" env expecting \end{figure}. Instead got \end{minipage}
willsower commented 3 years ago

generator.tex Error Log

Notes: Renders fine in overleaf

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 11:05:14] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 323, in start_polly
    expand_doc_new_labels(master[0])
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 101, in expand_doc_new_labels
    contents = replace_references(doc.read(), myHash)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 72, in replace_references
    myDoc = TexSoup.TexSoup(str(contents))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 347, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 97, in read_expr
    assert mode != MODE_MATH, 'Command \item invalid in math mode.'
AssertionError: Command \item invalid in math mode.
willsower commented 3 years ago

hyper.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 323, in start_polly
    expand_doc_new_labels(master[0])
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 101, in expand_doc_new_labels
    contents = replace_references(doc.read(), myHash)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 72, in replace_references
    myDoc = TexSoup.TexSoup(str(contents))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 347, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 347, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 347, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 347, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 277, in read_env
    name, args = make_read_peek(read_command)(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 74, in wrapper
    ret = f(buf, *args, **kwargs)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 342, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 277, in read_env
    name, args = make_read_peek(read_command)(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 74, in wrapper
    ret = f(buf, *args, **kwargs)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 342, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 466, in read_arg
    raise TypeError(
TypeError: [Line: 0, Offset 16987] Malformed argument. First and last elements must match a valid argument format. In this case, TexSoup could not find matching punctuation for: {.
Just finished parsing: ['{', TexCmd('left['), '1-', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('(', TexCmd('alpha'), ' - i', TexCmd('eta'), "' (t-t_4))z"), ' ', TexCmd('right]}', [BraceGroup(BraceGroup(TexCmd('alpha')), ' - i', BraceGroup(TexCmd('eta'), "'"), '(t-t_4)')]), ' ', '\\;', '-', '\\;', ' ', TexCmd('hat', [BraceGroup('b')]), '_1(0,t-2t_4 + 2t_2)', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' z'), BraceGroup('2')])), TexCmd('notag'), ' ', '\\\\', '\n', '&', TexCmd('times'), ' ', TexCmd('Bigg['), TexCmd('alpha'), ' z + ', TexCmd('alpha'), '^2', TexCmd('Bigg('), TexCmd('frac', [BraceGroup(TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('2i', TexCmd('eta'), "'(t - t_4)z"), ' - 1'), BraceGroup('2i', TexCmd('eta'), "' (t-t_4)(", TexCmd('alpha'), ' - i', TexCmd('eta'), "'(t-t_4))")]), ' ', TexCmd('notag'), ' ', '\\\\', '\n', '& ', TexCmd('qquad'), TexCmd('qquad'), TexCmd('qquad'), TexCmd('qquad'), TexCmd('qquad'), '- ', TexCmd('frac', [BraceGroup(TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('(', TexCmd('alpha'), ' + i', TexCmd('eta'), "' (t-t_4))z"), ' - 1'), BraceGroup('|', TexCmd('alpha'), ' + i', TexCmd('eta'), "' (t-t_4)|^2")]), ' ', TexCmd('Bigg)'), TexCmd('Bigg],'), '\n', TexCmd('end', [BraceGroup('align')]), '\nwhere  we have defined the operator\n', TexNamedEnv('equation', ['\n', TexCmd('hat', [BraceGroup('b')]), '_3(0,t) = ', TexCmd('hat', [BraceGroup('a')]), '_3(0,t) + i', TexCmd('alpha'), ' ', TexCmd('int'), '^', BraceGroup('z'), "_0 dz' ", TexCmd('text', [BraceGroup('e')]), '^', BraceGroup(TexCmd('frac', [BraceGroup(TexCmd('alpha'), " z'"), BraceGroup('2')])), ' ', TexCmd('hat', [BraceGroup(TexCmd('mathcal', [BraceGroup('D')]))]), "_1(z',t-2t_4+2t_2).", TexCmd('notag'), '\n'], []), '\n', '\nIn the limit of large Stark shift, Eq.~', TexCmd('ref', [BraceGroup('equ:a3solution')]), ' becomes\n', TexNamedEnv('align', [' ', TexCmd('label', [BraceGroup('equ:a3solution2')]), '\n', '&', TexCmd('hat', [BraceGroup('a')]), '_3(z,t) = ', TexCmd('hat', [BraceGroup('a')]), '_3(0,t) ', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' z'), BraceGroup('2')])), ' ', '\\;', '-', '\\;', ' ', TexCmd('hat', [BraceGroup('a')]), '_1(0,t-2t_4 + 2t_2)', TexCmd('alpha'), ' z ', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' z'), BraceGroup('2')])), ' ', TexCmd('notag'), ' ', '\\\\', '\n', '&+ i', TexCmd('left['), TexCmd('alpha'), '(1 - ', TexCmd('alpha'), ' z)', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' z'), BraceGroup('2')])), ' ', TexCmd('int'), '^', BraceGroup('z'), "_0 dz' ", TexCmd('text', [BraceGroup('e')]), '^', BraceGroup(TexCmd('frac', [BraceGroup(TexCmd('alpha'), " z'"), BraceGroup('2')])), ' ', TexCmd('hat', [BraceGroup(TexCmd('mathcal', [BraceGroup('D')]))]), "_1(z',t-2t_4 + 2t_2)", TexCmd('right].'), '\n'], []), '\nThe solution has three terms. The first term is the inevitable optical\nvacuum input at the region 3 time boundary which decays as a function\nof the optical depth. The second term is the HYPER echo which forms at\na time ', TexMathModeEnv('$', ['t_5 = t_1 + 2t_4 - 2t_2'], []), ' with ', TexMathModeEnv('$', [TexCmd('eta'), '_', BraceGroup('HPE'), ' = (', TexCmd('alpha'), '\nz)^2', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('alpha'), ' z')], []), '. This echo has a maximum efficiency of ', TexMathModeEnv('$', ['54', '\\%'], []), '\nat ', TexMathModeEnv('$', [TexCmd('alpha'), ' l = 2'], []), '. The third term contains the atomic degrees of\nfreedom. If counter-propagating ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses are used, causing the echo to be emitted in the backward direction, 100', '\\%', " efficiency is possible (see appendix).\n\nIt can be seen that the Stark shifting field over region 2 eliminates\ncontributions from region 2 on the region 3 output. Taking the limit\nof infinite Stark shift is physically equivalent to decoupling the\noptical and atomic fields in the equations of motion in region 2, thus\n`switching off' the collective atom-light interaction in this region\nand reducing the noise on the output field. In the decoupled regime,\nthe atomic boundary condition at region 3 ", TexMathModeEnv('$', ['(t = t_4)'], []), ' is found by\npropagating the region 2 boundary condition ', TexMathModeEnv('$', ['(t = t_2)'], []), ' forward in\ntime by ', TexMathModeEnv('$', ['t_4 - t_2'], []), '. The result obtained for the output field in\nregion 3 is identical to Eq.~', TexCmd('ref', [BraceGroup('equ:a3solution2')]), '.\n\n\n\n', TexCmd('section', [BraceGroup('Echo demonstration')]), '\n', '\n', '\nThe experimental setup used is shown in Fig.~', TexCmd('ref', [BraceGroup('fig:expsetup')]), ', a\nmodified Coherent 699 dye laser with sub 5~kHz linewidth drives the\n', TexMathModeEnv('$', ['^3'], []), 'H', TexMathModeEnv('$', ['_4'], []), ' ', TexMathModeEnv('$', ['-'], []), ' ', TexMathModeEnv('$', ['^1'], []), 'D', TexMathModeEnv('$', ['_2'], []), ' transition, at 605.977~nm, in a ', TexCmd('PRYSO'), '\ncrystal. The sample is oriented such that the laser\npropagates along the crystal b-axis, and is linearly polarized along\nthe D', TexMathModeEnv('$', ['_2'], []), '-axis.\n\nThe crystal is surrounded by four electrodes in a quadrupole\narrangement that enabled an electric field gradient to be produced\nalong the direction of propagation. The electric fields used in region\n1 varied from ', TexMathModeEnv('$', [TexCmd('pm'), '15'], []), '~V/cm over the optical path length, and were\ndirected parallel to the b-axis. Using the tabled value of the Stark\nshift', TexCmd('cite', [BraceGroup('graf98')]), ', this results in detunings of approximately\n', TexMathModeEnv('$', [TexCmd('pm'), '2'], []), '~MHz. The direction of the applied electric field was parallel\nto the crystals b-axis.  The entire sample/electrode setup is mounted\ninside a cryostat and cooled to ', TexMathModeEnv('$', ['3.1', TexCmd('textrm', [BraceGroup('K')])], []), '.  Two acousto-optic\nmodulators (AOMs) were used to gate the laser beam to produce the\ninput pulses. The AOMs also introduce a net 10~MHz frequency shift,\nenabling the light exiting the crystal to be detected with phase\nsensitive heterodyne detection.\n \n\n', TexNamedEnv('figure', ['Start of comment begin', BraceGroup('figure'), '[', 't', ']', '\n  ', TexCmd('centering'), '\n  ', TexCmd('includegraphics', [BracketGroup('width=0.40', TexCmd('textwidth')), BraceGroup('expsetup')]), '\n', TexCmd('caption', [BraceGroup(TexCmd('label', [BraceGroup('fig:expsetup')]), '(Color online)\n Experimental setup. PBS - Polarizing beamsplitter, NPBS -\n non-polarizing beamsplitter, AOM - acousto optic modulator. A third\n AOM was used (not shown) before the interferometer to provide the\n required frequency shifts for repumping the praseodymium dopants to\n the required hyperfine states. \n The  0.02', '\\%', ' ', TexCmd('PRYSO'), ' crystal is mounted between four  electrodes in a\n quadrupolar arrangement that are used to apply the electric field\n gradients to the samples. \n ')]), '\n'], []), '\n', '\n', '\n', '\nFigure ', TexCmd('ref', [BraceGroup('fig:echoseq')]), ' shows the intensity of the light exiting the\nsample during a hybrid photon echo sequence. Three optical pulses are\napplied, the input pulse and two ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses. The input pulse is a\nGaussian with a full width at half maximum (FWHM) power of ', TexMathModeEnv('$', ['1.8 ', TexCmd('mu'), '\ns'], []), ', and the transmitted portion appears at (i). In the absence of the\nStark field, the first ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse (ii) causes a 2PE (iii). The 2PE is\nrephased to form the hybrid photon echo at (vi). The two ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses\nwere not placed symmetrically about the 2PE so that the three pulse photon echo (3PE) at (v), due\nto the input and two ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses, is separated in time from the HPE.\n\n', TexNamedEnv('figure', ['\n  ', TexCmd('centering'), '\n  ', TexCmd('includegraphics', [BracketGroup('width=0.4', TexCmd('textwidth')), BraceGroup('echoseq')]), '\n  ', TexCmd('caption', [BraceGroup('(Color online) An experimental hybrid photon echo trace (a) without and (b)\n    with the electric field gradient applied. The two\n    ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses saturated the detector.')]), '\n  ', TexCmd('label', [BraceGroup('fig:echoseq')]), '\n'], []), '\n', '\nThe amplitude of the pulses were calibrated by applying a\n2PE sequence with the first pulse half the length of the\nsecond. The lengths that maximised the size of the echo were taken as\nbeing a ', TexMathModeEnv('$', [TexCmd('pi'), '/2'], []), ' pulse and ', TexMathModeEnv('$', [TexCmd('pi')], []), ' pulse.\n\nApplying the electric field to the sample causes the intensity of the\n2PE to be reduced by ', TexMathModeEnv('$', ['> 99', '\\%'], []), ' through the mechanism explained\nearlier. The 3PE also experiences a large reduction in intensity,\nwhich can be explained using similar reasoning.  The HPE is still\nformed albeit with reduced efficiency. We believe this reduction in\nefficiency is most likely due to imperfect balancing of the broadening\napplied before and after the first ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse.\n\nFigure~', TexCmd('ref', [BraceGroup('fig:echovfield')]), ' shows the intensity of the 2PE\nas the size of the broadening field is increased. The\nelectric field varies linearly along the propagation axis, \nresulting in a top-hat distribution of frequency shifts.  Thus the\nphase shifts of the ions will have a top-hat distribution as the 2PE forms.\nThis leads to a sinc-squared behaviour in the energy of the 2PE, analogous to a single slit diffraction pattern.\n\n\n', TexNamedEnv('figure', ['Start of comment begin', BraceGroup('figure'), '[', 't', ']', '\n  ', TexCmd('centering'), '\n  ', TexCmd('includegraphics', [BracketGroup('width=0.40', TexCmd('textwidth')), BraceGroup('echovfield')]), '\n  ', TexCmd('caption', [BraceGroup('(Color online) ', TexCmd('label', [BraceGroup('fig:echovfield')]), ' Disrupting the two\n    pulse echo with\n    the broadening field. The energy in the two pulse echo is plotted\n    versus the magnitude of the electric field gradient applied to the\n    sample.')]), '\n'], []), '\n', '\n', '\nDue to optical pumping distributing population amongst the hyperfine\nlevels ', TexCmd('PRYSO'), ' exhibits spectral holeburning ', TexCmd('cite', [BraceGroup('holi93')]), '. Optical\nrepumping was used so that the number of ions and thus the optical\ndepth remained consistent between shots. The laser was first scanned over the spectral region of\ninterest to burn a wide spectral hole. This hole was then filled \nusing laser light pulses detuned by a specific combination of the hyperfine\nsplittings. Varying the number of these repumping pulses allowed for\nvariation of the optical depth.\n\nThe efficiency of the 2PE and HPE was measured over a range of optical\ndepths (see Fig.~', TexCmd('ref', [BraceGroup('fig:odvefficiency')]), ').\nThe maximum efficiency for the 2PE occurs at an optical depth of around\n1.5, while the maximum efficiency of the HPE is at an optical depth\nof around 1.2. This is independent of whether the electric field was on or\noff. The maximum 2PE efficiency reduces from 40', '\\%', ' to less than 0.3', '\\%', '\nwhen 9~V was applied to the electrodes.\n\n\n', TexNamedEnv('figure', ['Start of comment begin', BraceGroup('figure'), '[', 't', ']', '\n  ', TexCmd('centering'), '\n  ', TexCmd('includegraphics', [BracketGroup('width=0.40', TexCmd('textwidth')), BraceGroup('odvefficiency')]), '\n', TexCmd('caption', [BraceGroup(TexCmd('label', [BraceGroup('fig:odvefficiency')]), ' ', '(Color online) Efficiency of the 2PE and HPE as the optical depth is varied. (a) Zero applied electric field, and (b) 9~V applied to electrodes. ')]), '\n'], []), '\n', '\nIn order to verify the linearity and determine the efficiency of the\nHPE, the area of the input pulse was compared to the area of the\noutput pulse (see Fig.~', TexCmd('ref', [BraceGroup('fig:inputoutput')]), ').  The length of the\ninput pulse was set to ', TexMathModeEnv('$', ['1.8', TexCmd('mu'), ' s'], []), ' ', '(FWHM), whilst the amplitude of the\npulse was altered by adjusting the radio frequency power applied to\nAOM2.  The optical depth for this experiment was set to 1. As shown in\nFig.~', TexCmd('ref', [BraceGroup('fig:inputoutput')]), ', the relationship between input pulse and\noutput pulse is linear for input pulses small compared to a ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse \nand then flattens off for more intense pulses.\n\n', TexNamedEnv('figure', ['\n  ', TexCmd('centering'), '\n  ', TexCmd('includegraphics', [BracketGroup('width=0.40', TexCmd('textwidth')), BraceGroup('inputoutput')]), '\n', TexCmd('caption', [BraceGroup(TexCmd('label', [BraceGroup('fig:inputoutput')]), ' ', '(Color online) Area of the hybrid photon echo as the area of the input pulse is varied. 9V was applied to the electrodes.')]), '\n'], [BracketGroup('t')]), '\n', '\n', '\nStart of comment ', TexCmd('rule', [BraceGroup('3cm'), BraceGroup('1pt')]), '\n', '\n', TexCmd('section', [BraceGroup('Noise Measurements')]), '\n', '\nTo characterize the noise properties, the heterodyne signal of the\nHYPER pulse sequence was recorded with no input pulse, both with and\nwithout the electric field applied. The ', TexCmd('PRYSO'), ' sample used for the\nnoise measurements was 4x4x20~mm (20~mm along the beam propagation\ndirection), doped at 0.005', '\\%', '.  Before the initial ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse, 100~V is\napplied to the two electrodes. In this alternate sample geometry\nthis results in an electric field varying from -30~V/cm to\n+30~V/cm along the 20~mm axis, corresponding to a frequency shift\nof approximately ', TexMathModeEnv('$', [TexCmd('pm'), '4'], []), '~MHz.  This voltage is decreased to 37.5~V for the longer\nperiod between the ', TexMathModeEnv('$', [TexCmd('pi')], []), "-pulses to maintain a zero net Stark shift\nsuch that an input pulse would be rephased as a HPE.\n\nStart of comment Jevon, I have written in my notebook that the Stark shift along the propagation axis for me was 110 kHz/(Vcm-1). But this doesn't agree with David's value of pm2MHz\n\nThe noise was calculated as follows. For each of ", TexMathModeEnv('$', [TexCmd('sim')], []), '30~000 shots,\nthe time-domain signal was multiplied by the temporal envelope of the\nwould-be 2PE (FWHM of 1.8~', TexMathModeEnv('$', [TexCmd('mu')], []), 's, centered 15~', TexMathModeEnv('$', [TexCmd('mu')], []), 's after the first\n', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse), numerically heterodyned (optical beat frequency here was\n6~MHz) down to DC and summed. This quantifies the field amplitude in\nthe 2PE mode for each shot. Taking the variance across all shots\nyields a value related to the average field intensity in this specific\nmode. For normalization purposes, the shot-noise (noise level with local\noscillator on, but signal beam blocked) was measured as the variance in an\nequivalent mode, but with the temporal envelope shifted to before the\nfirst ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse.\n\nAt an optical depth of 0.15, the quadrature variances in the echo mode\n', TexCmd('emph', [BraceGroup('without')]), ' the electric field applied were measured as 8.64', TexMathModeEnv('$', [TexCmd('pm')], []), '8', '\\%', '\nnormalized to the shot-noise level.  With the electric field applied,\nthe noise reduces approximately two orders of magnitude to 1.045', TexMathModeEnv('$', [TexCmd('pm')], []), '4', '\\%', ',  a level indistinguishable from the vacuum.\nFigure~', TexCmd('ref', [BraceGroup('fig:NoiseFig')]), ' shows the averaged time dependence of the\nnoise in the spectral mode of the echo. The experiment was repeated\nfor larger optical depths of 0.36 and 0.98, where the noise was\nsimilarly reduced by factors of 150 and 160 respectively.\n\nThere are three mechanisms through which the applied field gradient\ndecreases the noise.  Firstly, the gain feature created by the initial\n', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse is broadened in frequency, and therefore the number of\nexcited ions generating amplified spontaneous emission in the original\nfrequency window is reduced. Secondly, there are ground-state ions\nStark-shifted into the detection frequency window which increases the\nabsorption. Assuming a perfect ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse with a 1~MHz width, and an\noptical depth of 1, the expected reduction of noise due to these two\neffects is only ', TexMathModeEnv('$', [TexCmd('sim')], []), '5. However, in practice the ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse is far\nfrom perfect and most of the ions in the ensemble see a pulse area\ngreater or less than ', TexMathModeEnv('$', [TexCmd('pi')], []), ' ', '(due largely to the Gaussian spatial\nprofile of the pulse intensity). This and structure on the\ninhomogeneous line results in a large free induction decay (FID). The\nthird and most significant effect of the applied electric field is the\nreduction of this FID.\n\n', TexNamedEnv('figure', ['\n\t', TexCmd('centering'), '\n\t', TexCmd('includegraphics', [BracketGroup('width=1.0', TexCmd('columnwidth')), BraceGroup('noisefig')]), '\n        ', TexCmd('caption', [BraceGroup('(Color online) Noise level at the heterodyne beat\n          frequency between applied pulses and the local oscillator\n          (6~MHz) without any electric field applied (solid green), and with\n          the field applied (thin, dashed black).  Also shown is the shot noise\n          level (dot-dashed red), and the electrode voltage profile (thick, dashed blue - with\n          the scale on the right).  The ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses occur at 0 and\n          42.7~', TexMathModeEnv('$', [TexCmd('mu')], []), 's, and the noise level in the period between the\n          two pulses is seen to be dramatically reduced when the\n          electric field is applied.  If the ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses were\n          perfect, the noise following the latter pulse would also be\n          close to the shot noise level.  For this data series,\n          ', TexMathModeEnv('$', [BraceGroup(TexCmd('alpha')), 'L=0.15'], []), '.  ')]), '\n', TexCmd('label', [BraceGroup('fig:NoiseFig')]), '\n'], [BracketGroup('h')]), '\n', '\n', '\n', '\n', '\n', TexNamedEnv('figure', ['\n  ', TexCmd('centering'), '\n  ', TexCmd('includegraphics', [BracketGroup('width=0.5', TexCmd('textwidth')), BraceGroup('semiclass')]), '\n  ', TexCmd('caption', [BraceGroup(TexCmd('label', [BraceGroup('fig:semiclass')]), '(Color online) The fraction of  atoms\n    in the excited state shortly after two ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses. The medium is\n    initially in the ground state then two Gaussian shaped\n    ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses are sequentially applied to the medium. The pulses\n    were separated by 20 times the FWHM of their amplitudes. The plot\n    is generated from the solution of the one dimensional semi-classical Maxwell-Bloch equations.')]), '\n'], []), '\n', '\n', '\n', TexCmd('section', [BraceGroup('Discussion and Classical Simulation')]), '\n', '\nThere are two areas where these initial experiments need to be\nimproved before the proposed memory can fulfil its theoretical\npromises. The demonstrated memory is of low efficiency and noisy. The\nnoise measurements, Fig.~', TexCmd('ref', [BraceGroup('fig:NoiseFig')]), ', show that the broadening field is\nsuccessful in decoupling excited atoms from the output field while they\nare inverted, but there is excess noise in the time region where the light would be\nrecalled from the memory. \n\nThe predominant reason for this noise is the imperfect ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses\nresulting in random FIDs due to structure in the\ninhomogeneous line. In systems that have long lived spectral holes\nlike ', TexCmd('PRYSO'), ' this structure is hard to avoid. A four-level echo\nprotocol provides a way around this problem ', TexCmd('cite', [BraceGroup('beav11')]), '. Experiments\ninvolving Tm', TexMathModeEnv('$', ['^', BraceGroup('3+')], []), ':YAG, which has short lived holes, have achieved ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses \nwithout measurable random FIDs\n', TexCmd('cite', [BraceGroup('ledingham_in_prep')]), '.\n\nEven in the absence of structure on the inhomogeneous line, this HYPER quantum\nmemory scheme is still reliant on doing ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses well, but less\nsensitively. In the output region the solution for the time domain is\nan expression like Eq.~', TexCmd('ref', [BraceGroup('equ:a1solution')]), ', but with the subscript 1\nreplaced by 3, for region 3. Here ', TexMathModeEnv('$', [TexCmd('hat', [BraceGroup('a')]), '_3(0,t)'], []), ' represents the\nlight incident on the crystal during the recall of the light (usually\nthe vacuum). The term that includes ', TexMathModeEnv('$', [TexCmd('mathcal', [BraceGroup(TexCmd('hat', [BraceGroup('D')]))]), '_3(z,t)'], []), '\nrepresents that light emitted from the sample due to any excitation in\nthe crystal after the second ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulse. In the case of perfect\n', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses and vacuum input, ', TexMathModeEnv('$', [TexCmd('hat', [BraceGroup(TexCmd('mathcal', [BraceGroup('D')]))]), '_3(z,t)'], []), ' will\nrepresent ground state atoms. In the case of imperfect ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses\nthe atoms will have some unwanted excitation resulting in noise. The\nability to apply accurate ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses has already received\ncareful study ', TexCmd('cite', [BraceGroup('zafa07,rugg10')]), '. Semi-classical 1-D numerical\ncalculations, presented in Fig.~', TexCmd('ref', [BraceGroup('fig:semiclass')]), ', show that in the\ncase of no transverse variation in the optical intensity, atomic population very\nclose to the ground can be achieved over a significant fraction of the\nbandwidth of the pulses. This in turn means that the amount of noise\nin the output would be reduced to much lower than one photon per\nspatio-temporal mode. The fact that there will be spontaneous emission while the atoms are excited will be another noise process, but like the effect of imperfect ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses this noise would not be phase matched with the echo. As long as the population is predominantly in the ground state when the echo is retrieved, the amount of noise will be much less than one photon per spatio-temporal mode.\n\n', TexCmd('section', [BraceGroup('Conclusion')]), '\n', '\nWe propose and present initial experiments for a new quantum memory\nprotocol. The proposal uses strong rephasing pulses rather than\nstructure in the inhomogeneous line made with spectral\nholeburning. Noise associated with echoes forming in the excited state\nis avoided by using electric field gradients to generate artificial\ninhomogeneous broadening while the media is in the excited state. We\npresent a demonstration of these echoes as well as initial noise\nmeasurements. In these experiments the echoes were noisy due to random\nFIDs arising from structure on the inhomogeneous line rather than\namplified spontaneous emission from the excited state atoms. In order to make\nthe memory quiet these random FIDs must be avoided. Furthermore to ensure the atoms form the echo while close to the ground state accurate\n', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses will be required. Both of these steps should be\ntechnically feasible.\n\n', TexCmd('textit', [BraceGroup('Note added:')]), ' Recently, a new proposal has been developed that uses some of these ideas ', TexCmd('cite', [BraceGroup('rose')]), '. This new proposal is attractive in that it removes the need for auxiliary broadening fields.\n\n\n', TexCmd('section', [BraceGroup('Acknowledgments')]), '\n', '\nWe thank the referee who suggested we look at backward retrieval which led to the material in the appendix.\n\nDLM, PML, WRN and JJL were supported by the New Zealand Foundation for Research Science and Technology under Contract No.', TexCmd('NERF-UOOX0703.

SEB, MPH, and MJS were supported by the Australian Research Council Centre of Excellence for Quantum Computation and Communication Technology (Project No. CE11E0096).'), TexCmd('appendix*'), '\n', '\n', TexCmd('section', [BraceGroup('Backward Retrieval')]), '\n', '\nHere we show that similar to other proposals ', TexCmd('cite', [BraceGroup('mois01,afze09,rose')]), ', in the limit of large optical depth the memory has perfect efficiency when the echo is retrieved from the sample in the backward direction.\n\nHere we consider a sample that lies from ', TexMathModeEnv('$', ['z=0'], []), ' to ', TexMathModeEnv('$', ['z=L'], []), '. Equations~', TexCmd('ref', [BraceGroup('equ:MBE1R1')]), ' and~', TexCmd('ref', [BraceGroup('equ:MBE2R1')]), ' are equations of motion for the atomic (', TexMathModeEnv('$', ['D_1'], []), ') and optical (', TexMathModeEnv('$', ['a_1'], []), ') modes propagating in the forward direction, toward larger values of ', TexMathModeEnv('$', ['z'], []), '. For clarity the labels ', TexMathModeEnv('$', ['D_f'], []), '  and ', TexMathModeEnv('$', ['a_f'], []), " will be used for these quantities. The equations of motion for the counter-propagating, `backward' fields are the same as the forward case except for a minus sign in Eq.~", TexCmd('ref', [BraceGroup('equ:MBE2R1')]), '\n', TexNamedEnv('equation', ['\n    ', TexCmd('frac', [BraceGroup(TexCmd('partial')), BraceGroup(TexCmd('partial'), ' z')]), '  ', TexCmd('hat', [BraceGroup('a')]), '_', BraceGroup('b'), '(z,t) = ', BraceGroup(TexCmd('bf'), ' -'), TexCmd('frac', [BraceGroup('i ', TexCmd('alpha')), BraceGroup('2 ', TexCmd('pi'))]), ' ', TexCmd('int'), '_', BraceGroup('-', TexCmd('infty')), '^', BraceGroup(TexCmd('infty')), ' d', TexCmd('Delta'), ' ', '\\;', '   ', TexCmd('hat', [BraceGroup('D')]), '_', BraceGroup('b'), '\n'], []), '\n', '\nThe treatment in this appendix is semi-classical. This simplifies the expressions greatly because the amplitudes of modes with no excitation can be set to zero, and then ignored. A quantum treatment will yield the same results, but with the appropriate addition of vacuum modes to preserve the commutation relations in the presence of loss.\n\nWe consider an input field ', TexMathModeEnv('$', ['a_f(0,t) = a_', TexCmd('text', [BraceGroup('in')]), '(t)'], []), ' that is zero for ', TexMathModeEnv('$', ['t>0'], []), ', and atomic modes that are initially in the ground state.\nIn this case, we can see from Eqs.~', TexCmd('ref', [BraceGroup('equ:D1solution')]), ' and~', TexCmd('ref', [BraceGroup('equ:a1solution')]), ' that the forward propagating atomic modes at ', TexMathModeEnv('$', ['t=0'], []), ' are given by\n', TexNamedEnv('eqnarray', ['\n  ', TexCmd('label', [BraceGroup('eq:jevon1')]), '\n  D_f(z,t=0,', TexCmd('Delta'), ') &=& i ', TexCmd('int'), '_', BraceGroup('-', TexCmd('infty')), '^', BraceGroup(TexCmd('cancelto', [BraceGroup(TexCmd('infty')), BraceGroup('0')])), "a_f(0,t')", TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' z'), BraceGroup('2')])), TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-i', TexCmd('Delta'), " t'"), '\\,', "dt'", TexCmd('nonumber'), '\\\\', '\n  ', '&=&i', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' z'), BraceGroup('2')])), ' a_', TexCmd('text', [BraceGroup('in')]), '(', TexCmd('omega'), '=', TexCmd('Delta'), ').\n'], []), '\nHere ', TexMathModeEnv('$', ['a_', TexCmd('text', [BraceGroup('in')]), '(', TexCmd('omega'), ')'], []), ' is the Fourier transform of ', TexMathModeEnv('$', ['a_', TexCmd('text', [BraceGroup('in')]), '(t)'], []), '. The upper limit on the integral can be changed to infinity because the input field is zero for ', TexMathModeEnv('$', ['t>0'], []), '.\n\nWe reduce the dynamics during the rephasing period, the time period between when the broadening field is first turned on and the second rephasing pulse, to an instantaneous operation at ', TexMathModeEnv('$', ['t=0'], []), '. For the case of counter-propagating ', TexMathModeEnv('$', [TexCmd('pi')], []), '-pulses this has the effect\n', TexNamedEnv('equation', ['\n  D_b(z,t=0,', TexCmd('Delta'), ') = D_f(z,t=0,', TexCmd('Delta'), ')', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-i', TexCmd('Delta'), ' t_d'), '\n'], []), '\nThe time delay, ', TexMathModeEnv('$', ['t_d'], []), ', is the difference between how long the atoms are in the excited state and the ground state, during the rephasing period. Analogous to Eq.~', TexCmd('ref', [BraceGroup('equ:a1solution')]), ' we have for ', TexMathModeEnv('$', ['t>0'], []), '\n', '\n', TexNamedEnv('equation', ['_b(z,', TexCmd('omega'), ') = ', BraceGroup('a'), '_b(L,', TexCmd('omega'), ')', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha'), ' ', '(L-z)'), BraceGroup('2')])), ' -\ni', TexCmd('alpha'), ' ', TexCmd('int'), "^L_z dz' ", TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('frac', [BraceGroup(TexCmd('alpha')), BraceGroup('2')]), "(z'-z)"), "D_b(z',0,", TexCmd('omega'), ') \n'], [BraceGroup('a')]), '\n', '\nThe first term on the right-hand side can be ignored because no light is incident on the ', TexMathModeEnv('$', ['z=L'], []), ' end of the crystal during the retrieval process. The integral can easily be computed, resulting in a value for ', TexMathModeEnv('$', ['a_', TexCmd('text', [BraceGroup('out')]), '(', TexCmd('omega'), ') = a_b(0,', TexCmd('omega'), ')'], []), ' of \n', TexNamedEnv('equation', ['\n -a_', TexCmd('text', [BraceGroup('in')]), '(', TexCmd('omega'), ')', TexCmd('left(1'), '-', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('alpha'), ' L'), TexCmd('right)e'), '^', BraceGroup('-i', TexCmd('omega'), ' t_d'), '\n'], []), '\nor alternatively\n', TexNamedEnv('equation', ['\na_', TexCmd('text', [BraceGroup('out')]), '(t) =  -a_', TexCmd('text', [BraceGroup('in')]), '(t-t_d)', TexCmd('left(1'), '-', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('alpha'), ' L'), TexCmd('right),'), '\n'], []), '\n', '\nleading to an efficiency that varies with optical depth as ', TexMathModeEnv('$', ['(1-', TexCmd('text', [BraceGroup('e')]), '^', BraceGroup('-', TexCmd('alpha'), ' L'), ')^2'], []), '. This is equal to 1 for large ', TexMathModeEnv('$', [TexCmd('alpha'), ' L'], []), '.\n\nStart of comment ', TexCmd('Bibliography', [BraceGroup('sqlrefs,paperrefs')]), '\n', TexNamedEnv('thebibliography', ['\n', TexCmd('expandafter'), TexCmd('ifx'), TexCmd('csname'), ' natexlab', TexCmd('endcsname'), TexCmd('relax'), TexCmd('def', [BraceGroup('\\'), BraceGroup('natexlab')]), '#1', BraceGroup('#1'), TexCmd('fi'), '\n', TexCmd('expandafter'), TexCmd('ifx'), TexCmd('csname'), ' bibnamefont', TexCmd('endcsname'), TexCmd('relax'), '\n  ', TexCmd('def', [BraceGroup('\\'), BraceGroup('bibnamefont')]), '#1', BraceGroup('#1'), TexCmd('fi'), '\n', TexCmd('expandafter'), TexCmd('ifx'), TexCmd('csname'), ' bibfnamefont', TexCmd('endcsname'), TexCmd('relax'), '\n  ', TexCmd('def', [BraceGroup('\\'), BraceGroup('bibfnamefont')]), '#1', BraceGroup('#1'), TexCmd('fi'), '\n', TexCmd('expandafter'), TexCmd('ifx'), TexCmd('csname'), ' citenamefont', TexCmd('endcsname'), TexCmd('relax'), '\n  ', TexCmd('def', [BraceGroup('\\'), BraceGroup('citenamefont')]), '#1', BraceGroup('#1'), TexCmd('fi'), '\n', TexCmd('expandafter'), TexCmd('ifx'), TexCmd('csname'), ' url', TexCmd('endcsname'), TexCmd('relax'), '\n  ', TexCmd('def', [BraceGroup('\\'), BraceGroup('url')]), '#1', BraceGroup(TexCmd('texttt', [BraceGroup('#1')])), TexCmd('fi'), '\n', TexCmd('expandafter'), TexCmd('ifx'), TexCmd('csname'), ' urlprefix', TexCmd('endcsname'), TexCmd('relax'), TexCmd('def', [BraceGroup('\\'), BraceGroup('urlprefix')]), BraceGroup('URL '), TexCmd('fi'), '\n', TexCmd('providecommand', [BraceGroup(TexCmd('bibinfo')), BracketGroup('2'), BraceGroup('#2')]), '\n', TexCmd('providecommand', [BraceGroup(TexCmd('eprint')), BracketGroup('2'), BracketGroup(), BraceGroup(TexCmd('url', [BraceGroup('#2')]))]), '\n', '\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Mossberg')]), '(1982)')), BraceGroup('moss82')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.~W.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Mossberg')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Opt. Lett.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('7')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('77')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('1982')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Fraval et~al.')]), '(2005)', TexCmd('citenamefont', [BraceGroup('Fraval, Sellars, and\n  Longdell')]))), BraceGroup('frav05')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('E.')]), '~', TexCmd('bibnamefont', [BraceGroup('Fraval')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('95')]))]), ', ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('030506')]), '\n  ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2005')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Longdell et~al.')]), '(2005)', TexCmd('citenamefont', [BraceGroup('Longdell, Fraval,\n  Sellars, and Manson')]))), BraceGroup('stopped')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('E.')]), '~', TexCmd('bibnamefont', [BraceGroup('Fraval')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.~B.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup('Manson')]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('95')]))]), ', ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('063601')]), '\n  ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2005')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Hedges et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Hedges, Longdell, Li,\n  and Sellars')]))), BraceGroup('hedg10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~P.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Hedges')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('Y.')]), '~', TexCmd('bibnamefont', [BraceGroup('Li')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Nature (London)')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('465')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('1052')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Saglamyurek et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Saglamyurek,\n  Sinclair, Jin, Slater, Oblak, Bussi', BraceGroup("\\'", 'e'), 'res, George, Ricken, Sohler, and\n  Tittel')]))), BraceGroup('sagl10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('E.')]), '~', TexCmd('bibnamefont', [BraceGroup('Saglamyurek')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Sinclair')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.')]), '~', TexCmd('bibnamefont', [BraceGroup('Jin')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~A.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Slater')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('D.')]), '~', TexCmd('bibnamefont', [BraceGroup('Oblak')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('F.')]), '~', TexCmd('bibnamefont', [BraceGroup('Bussi', BraceGroup("\\'", 'e'), 'res')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('George')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('R.')]), '~', TexCmd('bibnamefont', [BraceGroup('Ricken')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('W.')]), '~', TexCmd('bibnamefont', [BraceGroup('Sohler')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('W.')]), '~', TexCmd('bibnamefont', [BraceGroup('Tittel')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Nature (London)')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('469')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('512')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Bonarota et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Bonarota,', BraceGroup('Le~Gou', BraceGroup('\\"', 'e'), 't'), ', and Chaneli', BraceGroup('\\`', 'e'), 're')]))), BraceGroup('usma10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Bonarota')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.-L.')]), '~', TexCmd('bibnamefont', [BraceGroup('Le Gou', BraceGroup('\\"', 'e'), 't')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.')]), '~', TexCmd('bibnamefont', [BraceGroup('Chaneli', BraceGroup("\\'", 'e'), 're')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('New J. Phys.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('13')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('013013')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2011')]), ').\n\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Ledingham et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Ledingham, Naylor,\n  Longdell, Beavan, and Sellars')]))), BraceGroup('ledi10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('P.~M.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Ledingham')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('W.~R.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Naylor')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S.~E.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Beavan')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('81')]))]), ', ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('012301')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Ruggiero et~al.')]), '(2009)', TexCmd('citenamefont', [BraceGroup('Ruggiero,\n  ', BraceGroup('Le~Gou', BraceGroup('\\"', 'e'), 't'), ', Simon, and Chaneli', BraceGroup('\\`', 'e'), 're')]))), BraceGroup('rugg08')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.')]), '~', TexCmd('bibnamefont', [BraceGroup('Ruggiero')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.-L.')]), ' ', TexCmd('bibnamefont', [BraceGroup(BraceGroup('Le~Gou', BraceGroup('\\"', 'e'), 't'))]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('C.')]), '~', TexCmd('bibnamefont', [BraceGroup('Simon')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.')]), '~', TexCmd('bibnamefont', [BraceGroup('Chaneli', BraceGroup('\\`', 'e'), 're')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('79')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('053851')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2009')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Sangouard et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Sangouard, Simon,\n  Min', BraceGroup("\\'", 'a'), 'r, Afzelius, Chaneli', BraceGroup('\\`', 'e'), 're, Gisin, Le-Gou', BraceGroup('\\"', 'e'), 't, de~Riedmatten, and Tittel')]))), BraceGroup('sang10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Sangouard')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('C.')]), '~', TexCmd('bibnamefont', [BraceGroup('Simon')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.')]), '~', TexCmd('bibnamefont', [BraceGroup('Min', BraceGroup("\\'", 'a'), 'r')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Afzelius')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.')]), '~', TexCmd('bibnamefont', [BraceGroup('Chaneli', BraceGroup('\\`', 'e'), 're')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Gisin')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.-L.')]), '~', TexCmd('bibnamefont', [BraceGroup('Le-Gou', BraceGroup('\\"', 'e'), 't')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('H.')]), '~', TexCmd('bibnamefont', [BraceGroup('de~Riedmatten')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('W.')]), '~', TexCmd('bibnamefont', [BraceGroup('Tittel')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('81')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('062333')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Moiseev and Kr', BraceGroup('\\"', 'o'), 'll')]), '(2001)')), BraceGroup('mois01')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S.~A.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Moiseev')]))]), ' ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S.')]), '~', TexCmd('bibnamefont', [BraceGroup('Kr', BraceGroup('\\"', 'o'), 'll')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('87')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('173601')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2001')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Kraus et~al.')]), '(2006)', TexCmd('citenamefont', [BraceGroup('Kraus, Tittel, Gisin,\n  Nilsson, Kr', BraceGroup('\\"', 'o'), 'll, and Cirac')]))), BraceGroup('krau06')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('B.')]), '~', TexCmd('bibnamefont', [BraceGroup('Kraus')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('W.')]), '~', TexCmd('bibnamefont', [BraceGroup('Tittel')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Gisin')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Nilsson')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S.')]), '~', TexCmd('bibnamefont', [BraceGroup('Kr', BraceGroup('\\"', 'o'), 'll')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~I.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Cirac')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('73')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('020302(R)')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2006')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Alexander et~al.')]), '(2006)', TexCmd('citenamefont', [BraceGroup('Alexander,\n  Longdell, Sellars, and Manson')]))), BraceGroup('alex06')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('A.~L.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Alexander')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.~B.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup('Manson')]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('96')]))]), ', ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('043602')]), '\n  ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2006')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Longdell et~al.')]), '(2008)', TexCmd('citenamefont', [BraceGroup('Longdell,\n  H', BraceGroup("\\'", 'e'), 'tet, Lam, and Sellars')]))), BraceGroup('long08')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('G.')]), '~', TexCmd('bibnamefont', [BraceGroup('H', BraceGroup("\\'", 'e'), 'tet')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('P.~K.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Lam')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('78')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('032337')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2008')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('H', BraceGroup("\\'", 'e'), 'tet et~al.')]), '(2008)', TexCmd('citenamefont', [BraceGroup('H', BraceGroup("\\'", 'e'), 'tet,\n  Longdell, Alexander, Lam, and Sellars')]))), BraceGroup('hete08')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('G.')]), '~', TexCmd('bibnamefont', [BraceGroup('H', BraceGroup("\\'", 'e'), 'tet')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('A.~L.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Alexander')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('P.~K.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Lam')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('100')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('023601')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2008')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('de~Riedmatten et~al.')]), '(2008)', TexCmd('citenamefont', [BraceGroup('de~Riedmatten,\n  Afzelius, Staudt, Simon, and Gisin')]))), BraceGroup('ried08')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('H.')]), '~', TexCmd('bibnamefont', [BraceGroup('de~Riedmatten')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Afzelius')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~U.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Staudt')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('C.')]), '~', TexCmd('bibnamefont', [BraceGroup('Simon')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Gisin')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Nature (London)')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('456')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('773')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2008')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Afzelius et~al.')]), '(2009)', TexCmd('citenamefont', [BraceGroup('Afzelius, Simon,\n  de~Riedmatten, and Gisin')]))), BraceGroup('afze09')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Afzelius')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('C.')]), '~', TexCmd('bibnamefont', [BraceGroup('Simon')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('H.')]), '~', TexCmd('bibnamefont', [BraceGroup('de~Riedmatten')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Gisin')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('79')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('052329')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2009')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Sabooni et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Sabooni, Beaudoin, Walther, Lin, Amari, Huang, Kr', BraceGroup('\\"', 'o'), 'll')]))), BraceGroup('chan10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Sabooni')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('F.')]), '~', TexCmd('bibnamefont', [BraceGroup('Beaudoin')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('A.')]), '~', TexCmd('bibnamefont', [BraceGroup('Walther')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Lin')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('A.')]), '~', TexCmd('bibnamefont', [BraceGroup('Amari')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Huang')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S.')]), '~', TexCmd('bibnamefont', [BraceGroup('Kr', BraceGroup('\\"', 'o'), 'll')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('105')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('060501')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Lauritzen et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Lauritzen, Min', BraceGroup("\\'", 'a'), 'r,\n  de~Riedmatten, Afzelius, Sangouard, Simon, and Gisin')]))), BraceGroup('laur10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('B.')]), '~', TexCmd('bibnamefont', [BraceGroup('Lauritzen')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.')]), '~ ', TexCmd('bibnamefont', [BraceGroup('Min', BraceGroup("\\'", 'a'), 'r')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('H.')]), '~', TexCmd('bibnamefont', [BraceGroup('de~Riedmatten')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Afzelius')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Sangouard')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('C.')]), '~', TexCmd('bibnamefont', [BraceGroup('Simon')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('N.')]), '~', TexCmd('bibnamefont', [BraceGroup('Gisin')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. Lett.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('104')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('080502')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Moiseev')]), '(2011)')), BraceGroup('mois11')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S. A.')]), '~', TexCmd('bibnamefont', [BraceGroup('Moiseev')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. A')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('83')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('12307')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2011')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Graf et~al.')]), '(1998)', TexCmd('citenamefont', [BraceGroup('Graf, Renn, Zumofen,\n  and Wild')]))), BraceGroup('graf98')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('F.~R.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Graf')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('A.')]), '~', TexCmd('bibnamefont', [BraceGroup('Renn')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('G.')]), '~', TexCmd('bibnamefont', [BraceGroup('Zumofen')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('U.~P.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Wild')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. B')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('58')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('5462')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('1998')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Holliday et~al.')]), '(1993)', TexCmd('citenamefont', [BraceGroup('Holliday, Croci,\n  Vauthey, and Wild')]))), BraceGroup('holi93')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('K.')]), '~', TexCmd('bibnamefont', [BraceGroup('Holliday')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Croci')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('E.')]), '~', TexCmd('bibnamefont', [BraceGroup('Vauthey')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('U.~P.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Wild')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Phys. Rev. B')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('47')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('14741')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('1993')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Beavan et~al.')]), '(2011)', TexCmd('citenamefont', [BraceGroup('Beavan, Ledingham,\n  Longdell, and Sellars')]))), BraceGroup('beav11')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('S.~E.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Beavan')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('P.~M.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Ledingham')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.~J.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Longdell')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.~J.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup('Sellars')]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('Opt. Lett.')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('36')]))]), ', ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('1272')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2011')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup('led()')), BraceGroup('ledingham_in_prep')]), '\n', TexCmd('bibinfo', [BraceGroup('howpublished'), BraceGroup('P. M. Ledingham et al. (unpublished).')]), '\n', '\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Zafarullah et~al.')]), '(2007)', TexCmd('citenamefont', [BraceGroup('Zafarullah, Tian,\n  Chang, and Babbitt')]))), BraceGroup('zafa07')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('I.')]), '~', TexCmd('bibnamefont', [BraceGroup('Zafarullah')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Tian')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.')]), '~', TexCmd('bibnamefont', [BraceGroup('Chang')]))]), ', ', TexCmd('bibnamefont', [BraceGroup('and')]), '\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('W.~R.')]), ' ', TexCmd('bibnamefont', [BraceGroup('Babbitt')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('J. Lumin.')]), ' ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('127')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('158')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2007')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup(TexCmd('citenamefont', [BraceGroup('Ruggiero et~al.')]), '(2010)', TexCmd('citenamefont', [BraceGroup('Ruggiero,\n  Chanel', BraceGroup('\\`', 'e'), 're, and ', BraceGroup('Le~Gou', '\\"', 'et'))]))), BraceGroup('rugg10')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.')]), '~', TexCmd('bibnamefont', [BraceGroup('Ruggiero')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.')]), '~', TexCmd('bibnamefont', [BraceGroup('Chaneli', BraceGroup('\\`', 'e'), 're')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.-L.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup(BraceGroup('Le~Gou', '\\"', 'et'))]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('J. Opt. Soc. Am. B')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('27')]))]), ', ', TexCmd('bibinfo', [BraceGroup('pages'), BraceGroup('32')]), ' ', '(', TexCmd('bibinfo', [BraceGroup('year'), BraceGroup('2010')]), ').\n\n', TexCmd('bibitem', [BracketGroup(BraceGroup('rose()')), BraceGroup('rose')]), '\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('V.')]), '~', TexCmd('bibnamefont', [BraceGroup('Damon')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('M.')]), '~', TexCmd('bibnamefont', [BraceGroup('Bonarota')]))]), ',\n', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('A.')]), '~', TexCmd('bibnamefont', [BraceGroup('Louchet-Chauvet')]))]), ',\n  ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('T.')]), '~', TexCmd('bibnamefont', [BraceGroup('Chaneli', BraceGroup('\\`', 'e'), 're')]))]), ',\n  ', TexCmd('bibnamefont', [BraceGroup('and')]), ' ', TexCmd('bibinfo', [BraceGroup('author'), BraceGroup(TexCmd('bibfnamefont', [BraceGroup('J.-L.')]), '\n  ', TexCmd('bibnamefont', [BraceGroup(BraceGroup('Le~Gou', '\\"', 'et'))]))]), ', ', TexCmd('bibinfo', [BraceGroup('journal'), BraceGroup('ArXiv')]), '\n  ', TexCmd('textbf', [BraceGroup(TexCmd('bibinfo', [BraceGroup('volume'), BraceGroup('quant-ph/1104.4875')]))]), '.\n\n'], [BraceGroup('25')]), '\n', '\n', '\n', TexCmd('end', [BraceGroup('document')]), '\n', '\n', '\nStart of comment  LocalWords:  linewidth detunings heterodyne AOMs acousto dopants repumping\nStart of comment  LocalWords:  quadrupolar AOM beamsplitter online dopant holeburning rephased\nStart of comment  LocalWords:  inhomogeneously coherences spectrally unbroadened rephasing\nStart of comment  LocalWords:  dephasing Raman decoherence\n']
willsower commented 3 years ago

latexthesis.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 11:22:34] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
    doc = expand_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 235, in expand_doc_macros
    expand_doc_macros_sub(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 215, in expand_doc_macros_sub
    expand_doc_macros_sub(child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 215, in expand_doc_macros_sub
    expand_doc_macros_sub(child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 215, in expand_doc_macros_sub
    expand_doc_macros_sub(child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 215, in expand_doc_macros_sub
    expand_doc_macros_sub(child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 215, in expand_doc_macros_sub
    expand_doc_macros_sub(child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 215, in expand_doc_macros_sub
    expand_doc_macros_sub(child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 230, in expand_doc_macros_sub
    safe_replace_child(node, child, i, bindingList[binding].expand_macro(child))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/tex_soup_utils.py", line 15, in safe_replace_child
    for delete_cand in parent.find_all(name):
AttributeError: 'TexMathModeEnv' object has no attribute 'find_all'
willsower commented 3 years ago

zzz.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
    doc = expand_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 236, in expand_doc_macros
    return TexSoup.TexSoup(str(doc))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 212, in read_math_env
    unclosed_env_handler(src, expr, src.peek())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 186, in unclosed_env_handler
    raise EOFError('[Line: %d, Offset: %d] "%s" env expecting %s. %s' % (
EOFError: [Line: 0, Offset: 5727] "math" env expecting \). Reached end of file.
willsower commented 3 years ago

cells.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 11:34:22] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
    doc = expand_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 234, in expand_doc_macros
    create_macro_bindings()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 186, in create_macro_bindings
    macro = CmdMacro(defn, activeCmdBindings, activeEnvBindings)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 76, in __init__
    if isinstance(macro_defn.args[1], TexSoup.data.BracketGroup):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 1418, in __getitem__
    value = super().__getitem__(key)
IndexError: list index out of range
willsower commented 3 years ago

dna.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 11:37:28] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 365, in parse
    self._parseNodes(doc.contents, tree, tree.children)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 304, in _parseNodes
    parseOut = self._parseEnvironment(texNode, ssml_parent, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 205, in _parseEnvironment
    self._parseNodes(contents, ssml_parent, elem_list, left_child=left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 304, in _parseNodes
    parseOut = self._parseEnvironment(texNode, ssml_parent, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 207, in _parseEnvironment
    self._resolveEnvironmentElements(env_node, ssml_parent, elem_list, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 163, in _resolveEnvironmentElements
    output = run_sympy(self._envContentsToString(env_node))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 122, in _envContentsToString
    for val in env.all:
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/utils.py", line 552, in wrapper
    return list(f(*args, **kwargs))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 118, in all
    assert isinstance(child, TexExpr)
AssertionError
willsower commented 3 years ago

globalRev.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 323, in start_polly
    expand_doc_new_labels(master[0])
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 101, in expand_doc_new_labels
    contents = replace_references(doc.read(), myHash)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 72, in replace_references
    myDoc = TexSoup.TexSoup(str(contents))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 114, in read_expr
    return read_arg(src, c, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 342, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
    name, args = read_command(src, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
    args = read_args(buf, n_required_args, n_optional_args,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 342, in read_args
    n_required = read_arg_required(src, args, n_required, tolerance, mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
    args.append(read_arg(
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 114, in read_expr
    return read_arg(src, c, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 114, in read_expr
    return read_arg(src, c, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 461, in read_arg
    content.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 284, in read_env
    unclosed_env_handler(src, expr, src.peek((0, 6)))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 186, in unclosed_env_handler
    raise EOFError('[Line: %d, Offset: %d] "%s" env expecting %s. %s' % (
EOFError: [Line: 0, Offset: 3604] "equation" env expecting \end{equation}. Instead got \end{array}\
willsower commented 3 years ago

soupfinal.tex Error Log

Notes: Renders fine in Overleaf

Normal Error Log:

127.0.0.1 - - [22/Apr/2021 11:45:20] "POST /form HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 365, in parse
    self._parseNodes(doc.contents, tree, tree.children)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 304, in _parseNodes
    parseOut = self._parseEnvironment(texNode, ssml_parent, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 205, in _parseEnvironment
    self._parseNodes(contents, ssml_parent, elem_list, left_child=left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 304, in _parseNodes
    parseOut = self._parseEnvironment(texNode, ssml_parent, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 205, in _parseEnvironment
    self._parseNodes(contents, ssml_parent, elem_list, left_child=left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 304, in _parseNodes
    parseOut = self._parseEnvironment(texNode, ssml_parent, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 207, in _parseEnvironment
    self._resolveEnvironmentElements(env_node, ssml_parent, elem_list, left_child)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 163, in _resolveEnvironmentElements
    output = run_sympy(self._envContentsToString(env_node))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 122, in _envContentsToString
    for val in env.all:
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/utils.py", line 552, in wrapper
    return list(f(*args, **kwargs))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 118, in all
    assert isinstance(child, TexExpr)
AssertionError
willsower commented 3 years ago

spatialsoup.tex Error Log

Notes: Doesn't render in Overleaf

Normal Error Log:

Traceback (most recent call last):
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
    file_links = start_polly(file_holder, bib_holder)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
    parsed_contents = start_conversion(tex_file.read())
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
    parsed_contents = parser.parse(contents)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
    doc = expand_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 158, in expand_doc_macros
    doc = normalize_doc_macros(doc)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 149, in normalize_doc_macros
    return TexSoup.TexSoup(text)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
    parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
    return TexEnv('[tex]', begin='', end='', contents=buf), tex
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
    super().__init__(name, contents, args, preserve_whitespace, position)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
    self._contents = list(contents) or []
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
    yield read_expr(buf,
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 93, in read_expr
    return read_math_env(src, expr, tolerance=tolerance)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 210, in read_math_env
    contents.append(read_expr(src, tolerance=tolerance, mode=MODE_MATH))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 109, in read_expr
    read_env(src, expr, tolerance=tolerance, mode=mode)
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 281, in read_env
    contents.append(read_expr(src, tolerance=tolerance, mode=mode))
  File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 97, in read_expr
    assert mode != MODE_MATH, 'Command \item invalid in math mode.'
AssertionError: Command \item invalid in math mode.
willsower commented 3 years ago

Aztex.tex file now works fine!

Connor wrote regex to get rid of \left \right commands that were being weird. For example in this line \def\determinant#1{\left|#1\right|} broke the program.

I also found out that % that were being replaced in the code made it possible that the functions couldn't find the correct end tags.

willsower commented 3 years ago

We have new error log