MCPcopy Create free account
hub / github.com/ActiveState/code / next

Method next

recipes/Python/252124_LaTeX_codec/recipe-252124.py:143–151  ·  view source on GitHub ↗

Find and return another piece of converted output.

(self)

Source from the content-addressed store, hash-verified

141 return p < len(t) and t[p] or None
142
143 def next(self):
144 """Find and return another piece of converted output."""
145 if self.pos >= len(self.tex):
146 raise StopIteration
147 nextoutput = self.chunk()
148 if self.lastoutput[0] == '\\' and self.lastoutput[-1].isalpha() and nextoutput[0].isalpha():
149 nextoutput = ' ' + nextoutput # add extra space to terminate csname
150 self.lastoutput = nextoutput
151 return nextoutput
152
153 def chunk(self):
154 """Grab another set of input tokens and convert them to an output string."""

Callers 5

recipe-228010.pyFile · 0.45
FeedMethod · 0.45
_tokenizeFunction · 0.45
get_verbatimFunction · 0.45
isAtomMethod · 0.45

Calls 1

chunkMethod · 0.95

Tested by

no test coverage detected