rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
results = self.current_user().results() | results = user.results() | def save(self, user): results = self.current_user().results() for argument in self.request.arguments(): match = re.match(r'^(homeScore|awayScore)\.(.*)$', argument) if match: name, key = match.groups() try: result = self.current_user().singlegame_result(SingleGame.get(key)) except db.BadKeyError: continue if self.reque... |
result = self.current_user().singlegame_result(SingleGame.get(key)) | result = user.singlegame_result(SingleGame.get(key)) | def save(self, user): results = self.current_user().results() for argument in self.request.arguments(): match = re.match(r'^(homeScore|awayScore)\.(.*)$', argument) if match: name, key = match.groups() try: result = self.current_user().singlegame_result(SingleGame.get(key)) except db.BadKeyError: continue if self.reque... |
def point(self, multiplier=1): point = 0 result = self.reference() if self.homeScore >=0 and self.homeScore == result.homeScore: point = point + 1 elif self.homeScore > 4 and result.homeScore > 4: point = point + 1 if self.awayScore >=0 and self.awayScore == result.awayScore: point = point + 1 elif self.awayScore > 4 a... | def point(self, multiplier=1): point = 0 result = self.reference() if self.homeScore >=0 and self.homeScore == result.homeScore: point = point + 1 elif self.homeScore > 4 and result.homeScore > 4: point = point + 1 if self.awayScore >=0 and self.awayScore == result.awayScore: point = point + 1 elif self.awayScore > 4 a... | |
game_stored = SingleGame.all().filter('id =',game['id']).get() | game_stored = SingleGame.all().filter('fifaId =',game['id']).get() | def init_fifa_group_game(self, game): """Create game if not exists.""" group = self.init_fifa_group(game['group']) game_stored = SingleGame.all().filter('id =',game['id']).get() if game_stored is None: game_stored = SingleGame(fifaId=int(game['id']),group=self.fifa_groupstage()) game_stored.time = game['time'] game_s... |
self._bindpwd = bindpwd | if bindpwd != self.getEncryptedBindPassword(): self._bindpwd = bindpwd | def manage_edit( self, title, login_attr, uid_attr, users_base , users_scope, roles, groups_base, groups_scope , binduid, bindpwd, binduid_usage=1, rdn_attr='cn' , obj_classes='top,person', local_groups=0 , implicit_mapping=0, encryption='SHA', read_only=0 , extra_user_filter='', REQUEST=None ): """ Edit the LDAPUserF... |
assert (self.neteval.clear_network(), -15.6842310683) | assert allclose(self.neteval.clear_network(), -15.6842310683) | def test_score2(self): assert (self.neteval.clear_network(), -15.6842310683) |
subst = [old_put_cmd_in_ert("\\multirow{2}{2cm}{")] document.body[i + 4:i + 4] = subst i = find_token(document.body, "</cell>", i) if i == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") break subst = [old_put_cmd_in_ert("}")] document.body[i - 3:i - 3] = subst i = find_token(docume... | cend = find_token(document.body, "</cell>", i) if cend == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue blay = find_token(document.body, "\\begin_layout", i, cend) if blay == -1: document.warning("Can't find layout for cell!") i = j continue bend = find_end_of_layou... | def revert_multirow(document): " Revert multirow cells in tables to TeX-code" i = 0 multirow = False while True: # cell type 3 is multirow begin cell i = find_token(document.body, '<cell multirow="3"', i) if i == -1: break # a multirow cell was found multirow = True # remove the multirow tag, set the valignment to top ... |
add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\usepackage{multirow}"]) | add_to_preamble(document, ["% lyx2lyx multirow additions ", "\\usepackage{multirow}"]) | def revert_multirow(document): " Revert multirow cells in tables to TeX-code" i = 0 multirow = False while True: # cell type 3 is multirow begin cell i = find_token(document.body, '<cell multirow="3"', i) if i == -1: break # a multirow cell was found multirow = True # remove the multirow tag, set the valignment to top ... |
document.body[i + 6:i + 6] = subst | document.body[i - 3:i - 3] = subst | def revert_multirow(document): " Revert multirow cells in tables " i = 0 multirow = False while True: # cell type 3 is multirow begin cell i = find_token(document.body, '<cell multirow="3"', i) if i == -1: break # a multirow cell was found multirow = True # remove the multirow tag, set the valignment to top # and remov... |
" Load mathdots if used in the document " | " Load mathdots automatically " | def convert_mathdots(document): " Load mathdots if used in the document " while True: i = find_token(document.header, "\\use_esint" , 0) if i != -1: document.header.insert(i + 1, "\\use_mathdots 1") break |
add_to_preamble(document, ["\\@ifundefined{iddots}{\\usepackage{mathdots}}"]) | add_to_preamble(document, ["\\@ifundefined{iddots}{\\usepackage{mathdots}}\n"]) | def revert_mathdots(document): " Load mathdots if used in the document " while True: i = find_token(document.header, "\\use_mathdots" , 0) if i != -1: # use \@ifundefined to catch also the "auto" case add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\@ifundefined{iddots... |
"caolanm () redhat ! com>", | "caolanm () redhat ! com", | def main(argv, contributers): if len(argv) != 4: error(usage(argv[0])) txt_credits_data = unicode(as_txt_credits(contributers)).encode("utf-8") txt_credits = open(argv[1], "w") txt_credits.write(txt_credits_data) php_credits_data = unicode(as_php_credits(contributers, argv[2])).encode("utf-8") php_credits = open(argv... |
document.warning("size: " + size) if size == "a0paper" or "a1paper" or "a2paper" or "a6paper" \ or "b0paper" or "b1paper" or "b2paper" or "b6paper" \ or "b0j" or "b1j" or "b2j" or "b3j" or "b4j" or "b5j" or "b6j": | if size == "a0paper" or size == "a1paper" or size == "a2paper" \ or size == "a6paper" or size == "b0paper" or size == "b1paper" \ or size == "b2paper" or size == "b6paper" or size == "b0j" \ or size == "b1j" or size == "b2j" or size == "b3j" or size == "b4j" \ or size == "b5j" or size == "b6j": | def revert_pagesizes(document): i = 0 " Revert page sizes to default " i = find_token(document.header, '\\papersize', 0) if i != -1: size = document.header[i][11:] document.warning("size: " + size) if size == "a0paper" or "a1paper" or "a2paper" or "a6paper" \ or "b0paper" or "b1paper" or "b2paper" or "b6paper" \ or "b0... |
p = p - 1 / len(self.lines) | def randomdrop_independant(self): p = self.p | |
print 'Line read: <<' + line + '>>\n' | sys.stdout.write('r') | def getCommand(self): if self.count >= self.max_count: os._exit(0) if self.i >= len(self.lines): self.loops = self.loops + 1 if self.loops > 3: os._exit(0) self.i = 0 return 'Loop' line = self.lines[self.i] self.count = self.count + 1 self.i = self.i + 1 print 'Line read: <<' + line + '>>\n' return line.rstrip('\n').rs... |
print '.', | sys.stdout.write('.') | def sendKeystring(keystr, LYX_PID): # print "sending keystring "+keystr+"\n" if not re.match(".*\w.*", keystr): print 'print .' + keystr + '.\n' keystr = 'a' before_secs = time.time() while not lyx_sleeping(): time.sleep(0.02) print '.', if time.time() - before_secs > 180: print 'Killing due to freeze (KILL_FREEZE)' ... |
subprocess.call(["xvkbd", "-xsendevent", "-delay", DELAY, "-text", keystr]) | if (subprocess.call( ["xvkbd", "-xsendevent", "-delay", DELAY, "-text", keystr], stdout=FNULL,stderr=FNULL ) == 0): sys.stdout.write('*') else: sys.stdout.write('X') | def sendKeystring(keystr, LYX_PID): # print "sending keystring "+keystr+"\n" if not re.match(".*\w.*", keystr): print 'print .' + keystr + '.\n' keystr = 'a' before_secs = time.time() while not lyx_sleeping(): time.sleep(0.02) print '.', if time.time() - before_secs > 180: print 'Killing due to freeze (KILL_FREEZE)' ... |
os.system('echo -n LOADAVG:; cat /proc/loadavg') | def RaiseWindow(): os.system("echo x-session-manager PID: $X_PID.") os.system("echo x-session-manager open files: `lsof -p $X_PID | grep ICE-unix | wc -l`") ####os.system("wmctrl -l | ( grep '"+lyx_window_name+"' || ( killall lyx ; sleep 1 ; killall -9 lyx ))") #os.system("wmctrl -R '"+lyx_window_name+"' ;sleep 0.1") s... | |
add_to_preamble(document, ["\\usepackage{mathdots}"]) | add_to_preamble(document, ["\\@ifundefined{iddots}{\\usepackage{mathdots}}"]) | def revert_mathdots(document): " Load mathdots if used in the document " while True: i = find_token(document.header, "\\use_mathdots" , 0) if i != -1: add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\usepackage{mathdots}"]) del document.header[i] break |
[399, []] | [399, [convert_mathdots]] | def revert_mathdots(document): " Load mathdots if used in the document " while True: i = find_token(document.header, "\\use_mathdots" , 0) if i != -1: add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\usepackage{mathdots}"]) del document.header[i] break |
has_preamble = 0 | has_preamble = False has_equal_spacing = False | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = 0 while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: C... |
for curline in range(len(document.body[i:j])): found = document.body[i+curline].find("\\xymatrix@!") | for curline in range(i,j): found = document.body[curline].find("\\xymatrix@!") | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = 0 while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: C... |
for curline in range(len(document.body[i+1:j])): content += document.body[i+1+curline] | content += '\n'.join(document.body[i+1:j]) | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = 0 while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: C... |
for curline in range(len(document.body[i:j])): l = document.body[i+curline].find("\\xymatrix") | for curline in range(i,j): l = document.body[curline].find("\\xymatrix") | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = 0 while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: C... |
has_preamble = 1; i += 1 if has_preamble == 0: | has_preamble = True; break; i = j + 1 if has_equal_spacing and not has_preamble: | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = 0 while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: C... |
def put_cmd_in_ert(strlist): | def put_cmd_in_ert(arg): | def put_cmd_in_ert(strlist): ret = ["\\begin_inset ERT", "status collapsed", "\\begin_layout Plain Layout", ""] # Despite the warnings just given, it will be faster for us to work # with a single string internally. That way, we only go through the # unicode_reps loop once. s = "\n".join(strlist) for rep in unicode_reps... |
s = "\n".join(strlist) | if type(arg) is list: s = "\n".join(arg) else: s = arg | def put_cmd_in_ert(strlist): ret = ["\\begin_inset ERT", "status collapsed", "\\begin_layout Plain Layout", ""] # Despite the warnings just given, it will be faster for us to work # with a single string internally. That way, we only go through the # unicode_reps loop once. s = "\n".join(strlist) for rep in unicode_reps... |
vec = [ argv[0], argv[2], argv[3], argv[1], argv[4], argv[5], argv[6] ] | vec = [ argv[0], argv[2], argv[3], argv[1], argv[4], argv[5], latex ] | def main(argv): # Parse and manipulate the command line arguments. if len(argv) != 6 and len(argv) != 7: error(usage(argv[0])) output_format = string.lower(argv[1]) dir, latex_file = os.path.split(argv[2]) if len(dir) != 0: os.chdir(dir) dpi = string.atoi(argv[3]) fg_color = make_texcolor(argv[4], False) bg_color = ... |
if rgx: | if m: | def revert_math_output(document): " Revert \html_math_output to \html_use_mathml " i = find_token(document.header, "\\html_math_output", 0) if i == -1: return rgx = re.compile(r'\\html_math_output\s+(\d)') m = rgx.match(document.header[i]) newval = "true" if rgx: val = m.group(1) if val == "1" or val == "2": newval = "... |
path, htmlconv = checkProg('a LaTeX -> MS Word converter', ["htlatex $$i 'html,word' 'symbol/!' '-cvalidate'", \ "htlatex.sh $$i 'html,word' 'symbol/!' '-cvalidate'", \ "/usr/share/tex4ht/htlatex $$i 'html,word' 'symbol/!' '-cvalidate'"], rc_entry = [ r'\converter latex wordhtml "%%" "needaux"' ]) if htmlconv.fi... | if elyxerfound: addToRC(r'''\converter lyx wordhtml "python -m elyxer --html --directory $$r $$i $$o" ""''') else: path, elyxer = checkProg('a LyX -> MS Word converter', ['elyxer.py --directory $$r $$i $$o', 'elyxer --html --directory $$r $$i $$o'], rc_entry = [ r'\converter lyx wordhtml "%%" ""' ... | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex"' ]) ''' If we're running ... |
while True: i = find_token(document.header, "\\use_mathdots" , 0) if i != -1: add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\@ifundefined{iddots}{\\usepackage{mathdots}}\n"]) del document.header[i] break | i = 0 ddots = re.compile(r'\\begin_inset Formula .*\\ddots', re.DOTALL) vdots = re.compile(r'\\begin_inset Formula .*\\vdots', re.DOTALL) iddots = re.compile(r'\\begin_inset Formula .*\\iddots', re.DOTALL) mathdots = find_token(document.header, "\\use_mathdots" , 0) no = find_token(document.header, "\\use_mathdots 0" ,... | def revert_mathdots(document): " Load mathdots if used in the document " while True: i = find_token(document.header, "\\use_mathdots" , 0) if i != -1: # use \@ifundefined to catch also the "auto" case add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\@ifundefined{iddots... |
document.warning("Malformed LyX document: Can't find end of line inset.") | document.warning("Malformed LyX document: Can't find end of Formula inset.") | def revert_diagram(document): " Add the feyn package if \\Diagram is used in math " i = 0 re_diagram = re.compile(r'\\begin_inset Formula .*\\Diagram', re.DOTALL) while True: i = find_token(document.body, '\\begin_inset Formula', i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning... |
\Format lyx13x lyx13 "LyX 1.3.x" "" "" "" "document" \Format lyx14x lyx14 "LyX 1.4.x" "" "" "" "document" \Format lyx15x lyx15 "LyX 1.5.x" "" "" "" "document" \Format lyx16x lyx16 "LyX 1.6.x" "" "" "" "document" | \Format lyx13x 13.lyx "LyX 1.3.x" "" "" "" "document" \Format lyx14x 14.lyx "LyX 1.4.x" "" "" "" "document" \Format lyx15x 15.lyx "LyX 1.5.x" "" "" "" "document" \Format lyx16x 16.lyx "LyX 1.6.x" "" "" "" "document" | def checkFormatEntries(dtl_tools): ''' Check all formats (\Format entries) ''' checkViewerEditor('a Tgif viewer and editor', ['tgif'], rc_entry = [r'\Format tgif obj Tgif "" "%%" "%%" "vector"']) # checkViewerEditor('a FIG viewer and editor', ['xfig', 'jfig3-itext.jar', 'jfig3.jar'], rc_entr... |
k = find_token(document.body, 'use_parbox', i) | z = find_end_of_inset(document.body, i) if z == -1: document.warning("Can't find end of box inset!!") i += 1 continue blay = find_token(document.body, "\\begin_layout", i, z) if blay == -1: document.warning("Can't find layout in box inset!!") i = z continue k = find_token(document.body, 'use_parbox', i, blay) | def convert_use_makebox(document): " Adds use_makebox option for boxes " i = 0 while 1: # remove the option use_makebox i = find_token(document.body, '\\begin_inset Box', i) if i == -1: return k = find_token(document.body, 'use_parbox', i) if k == -1: document.warning("Malformed LyX document: Can't find use_parbox stat... |
return | i = z continue | def convert_use_makebox(document): " Adds use_makebox option for boxes " i = 0 while 1: # remove the option use_makebox i = find_token(document.body, '\\begin_inset Box', i) if i == -1: return k = find_token(document.body, 'use_parbox', i) if k == -1: document.warning("Malformed LyX document: Can't find use_parbox stat... |
i = k + 1 | i = z + 1 | def convert_use_makebox(document): " Adds use_makebox option for boxes " i = 0 while 1: # remove the option use_makebox i = find_token(document.body, '\\begin_inset Box', i) if i == -1: return k = find_token(document.body, 'use_parbox', i) if k == -1: document.warning("Malformed LyX document: Can't find use_parbox stat... |
i = 0 z = 0 | i = position | def revert_flex_inset(document, name, LaTeXname, position): " Convert flex insets to TeX code " i = 0 z = 0 while True: i = find_token(document.body, '\\begin_inset Flex ' + name, position) if i == -1: return z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find end of... |
i = find_token(document.body, '\\begin_inset Flex ' + name, position) | i = find_token(document.body, '\\begin_inset Flex ' + name, i) | def revert_flex_inset(document, name, LaTeXname, position): " Convert flex insets to TeX code " i = 0 z = 0 while True: i = find_token(document.body, '\\begin_inset Flex ' + name, position) if i == -1: return z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find end of... |
z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find end of Flex " + name + " inset.") return document.body[z - 2:z + 1] = put_cmd_in_ert("}") j = find_token(document.body, '\\emph on', i) k = find_token(document.body, '\\noun on', i) l = find_token(document.body, '... | else: z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find end of Flex " + name + " inset.") return document.body[z - 2:z + 1] = put_cmd_in_ert("}") j = find_token(document.body, '\\emph on', i) k = find_token(document.body, '\\noun on', i) l = find_token(document.b... | def revert_flex_inset(document, name, LaTeXname, position): " Convert flex insets to TeX code " i = 0 z = 0 while True: i = find_token(document.body, '\\begin_inset Flex ' + name, position) if i == -1: return z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find end of... |
[401, []] | [401, []], [402, [convert_bibtexClearpage]] | def revert_diagram(document): " Add the feyn package if \\Diagram is used in math " i = 0 re_diagram = re.compile(r'\\begin_inset Formula .*\\Diagram', re.DOTALL) while True: i = find_token(document.body, '\\begin_inset Formula', i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning... |
revert = [[400, [revert_diagram]], | revert = [[401, []], [400, [revert_diagram]], | def revert_diagram(document): " Add the feyn package if \\Diagram is used in math " i = 0 re_diagram = re.compile(r'\\begin_inset Formula .*\\Diagram', re.DOTALL) while True: i = find_token(document.body, '\\begin_inset Formula', i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning... |
j = 0 | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = False has_equal_spacing = False while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warn... | |
while True: found = -1 | while True: | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = False has_equal_spacing = False while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warn... |
break | i += 1 continue | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = False has_equal_spacing = False while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warn... |
i += len(subst) | i += len(subst) - (j - i) + 1 | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = False has_equal_spacing = False while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warn... |
add_to_preamble(document, ['\\usepackage[all]{xy}']) | add_to_preamble(document, ['% lyx2lyx xymatrix addition', '\\usepackage[all]{xy}']) | def revert_equalspacing_xymatrix(document): " Revert a Formula with xymatrix@! to an ERT inset " i = 0 j = 0 has_preamble = False has_equal_spacing = False while True: found = -1 i = find_token(document.body, "\\begin_inset Formula", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warn... |
[375, []] | [375, []], [376, []] | def revert_includeonly(document): i = 0 while True: i = find_token(document.header, "\\begin_includeonly", i) if i == -1: return j = find_end_of(document.header, i, "\\begin_includeonly", "\\end_includeonly") if j == -1: # this should not happen break document.header[i : j + 1] = [] |
revert = [[374, [revert_includeonly]], | revert = [[375, [revert_includeall]], [374, [revert_includeonly]], | def revert_includeonly(document): i = 0 while True: i = find_token(document.header, "\\begin_includeonly", i) if i == -1: return j = find_end_of(document.header, i, "\\begin_includeonly", "\\end_includeonly") if j == -1: # this should not happen break document.header[i : j + 1] = [] |
\Format dvi3 dvi "DVI (LuaTeX)" D "%%" "" "document,vector"''']) | \Format dvi3 dvi "DVI (LuaTeX)" V "%%" "" "document,vector"''']) | def checkFormatEntries(dtl_tools): ''' Check all formats (\Format entries) ''' checkViewerEditor('a Tgif viewer and editor', ['tgif'], rc_entry = [r'\Format tgif obj Tgif "" "%%" "%%" "vector"']) # checkViewerEditor('a FIG viewer and editor', ['xfig', 'jfig3-itext.jar', 'jfig3.jar'], rc_entr... |
checkProg('a Dot -> PDF converter', ['dot -Tpdf $$i -o $$o'], rc_entry = [ r'\converter dot pdf "%%" ""']) | checkProg('a Dot -> Image converter', ['dot'], rc_entry = [ r'''\converter dot eps "dot -Teps $$i -o $$o" "" \converter dot pdf "dot -Tpdf $$i -o $$o" "" \converter dot png "dot -Tpng $$i -o $$o" ""''', '']) | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex"' ]) ''' If we're running ... |
if j > z or j == -1: | if j < z and j != -1: y = find_token(document.body, "\\begin_layout", i) if y > z or y == -1: document.warning("Malformed LyX document: Can't find layout in box.") return document.body[z - 2:z + 1] = put_cmd_in_ert("}") k = find_token(document.body, 'hor_pos', j - 4) align = document.body[k][9] l = find_token(docume... | def revert_makebox(document): " Convert \\makebox to TeX code " i = 0 while 1: # only revert frameless boxes without an inner box i = find_token(document.body, '\\begin_inset Box Frameless', i) if i == -1: return z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find en... |
y = find_token(document.body, "\\begin_layout", i) if y > z or y == -1: document.warning("Malformed LyX document: Can't find layout in box.") return document.body[z - 2:z + 1] = put_cmd_in_ert("}") k = find_token(document.body, 'hor_pos', j - 4) align = document.body[k][9] l = find_token(document.body, 'width "', j ... | del document.body[h] h += 1 | def revert_makebox(document): " Convert \\makebox to TeX code " i = 0 while 1: # only revert frameless boxes without an inner box i = find_token(document.body, '\\begin_inset Box Frameless', i) if i == -1: return z = find_end_of_inset(document.body, i) if z == -1: document.warning("Malformed LyX document: Can't find en... |
def convert_bibtexClearpage(document): | def convert_bibtex_clearpage(document): | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # o... |
i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) j = find_token(document.body, 'options "bibtotoc', 0) | j = find_token(document.body, "\\begin_inset CommandInset bibtex", j) | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # o... |
+ '\end_inset\n\n\n' \ + '\end_layout\n' | + '\\end_inset\n\n\n' \ + '\\end_layout\n' | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # o... |
document.body.insert(j -5, subst1) | document.body.insert(lay, subst1) document.warning(subst1) | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # o... |
document.body.insert(j -5, subst2) return | document.body.insert(lay, subst2) document.warning(subst2) j = k | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # o... |
[402, [convert_bibtexClearpage]], | [402, [convert_bibtex_clearpage]], | def convert_bibtexClearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " while True: i = find_token(document.header, '\\papersides', 0) if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") return else: sides = int(document.header[i][12]) # o... |
checkProg('JBibTeX, the Japanese BibTeX', ['jbibtex', 'bibtex'], | checkProg('JBibTeX, the Japanese BibTeX', ['pbibtex', 'jbibtex', 'bibtex'], | def checkOtherEntries(): ''' entries other than Format and Converter ''' checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'], rc_entry = [ r'\chktex_command "%%"' ]) checkProgAlternatives('BibTeX or alternative programs', ['bibtex', 'bibtex8', 'biber'], rc_entry = [ r'\bibtex_command "%%"' ], alt_rc_entr... |
match = re_Builtin.match(lines[i]) if match: ws = match.group(1) arg = match.group(2) newarg = "" if re_True.match(arg): newarg = "false" else: newarg = "true" lines[i] = ws + "NeedsFloatPkg " + newarg | match = re_Float.match(lines[i]) i += 1 if not match: continue builtin = False cmd = "" while True and i < len(lines): m1 = re_End.match(lines[i]) if m1: if builtin and cmd: line = " ListCommand " + cmd lines.insert(i, line) i += 1 break m2 = re_Builtin.match(lines[i]) if m2: builtin = True ws1 = m2.group(1) arg ... | def convert(lines): " Convert to new format." re_Comment = re.compile(r'^(\s*)#') re_Counter = re.compile(r'\s*Counter\s*', re.IGNORECASE) re_Name = re.compile(r'\s*Name\s+(\S+)\s*', re.IGNORECASE) re_UseMod = re.compile(r'^\s*UseModule\s+(.*)', re.IGNORECASE) re_Empty = re.compile(r'^(\s*)$') re_Format = re.compile(r'... |
if os.name == 'nt': latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """) | if LATEX != '': if os.name == 'nt': latex_out = cmdOutput(LATEX + r""" "\nonstopmode\input{\"a b\"}" """) else: latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """) | def checkTeXAllowSpaces(): ''' Let's check whether spaces are allowed in TeX file names ''' tex_allows_spaces = 'false' if lyx_check_config: msg = "Checking whether TeX allows spaces in file names... " writeToFile('a b.tex', r'\message{working^^J}' ) if os.name == 'nt': latex_out = cmdOutput(LATEX + r""" "\nonstopmode\... |
latex_out = cmdOutput(LATEX + r""" '\nonstopmode\input{"a b"}' """) | latex_out = '' | def checkTeXAllowSpaces(): ''' Let's check whether spaces are allowed in TeX file names ''' tex_allows_spaces = 'false' if lyx_check_config: msg = "Checking whether TeX allows spaces in file names... " writeToFile('a b.tex', r'\message{working^^J}' ) if os.name == 'nt': latex_out = cmdOutput(LATEX + r""" "\nonstopmode\... |
contributer(u"venoom00", | contributer(u"venom00", | def main(argv, contributers): if len(argv) != 4: error(usage(argv[0])) txt_credits_data = unicode(as_txt_credits(contributers)).encode("utf-8") txt_credits = open(argv[1], "w") txt_credits.write(txt_credits_data) php_credits_data = unicode(as_php_credits(contributers, argv[2])).encode("utf-8") php_credits = open(argv... |
u"ENTCS document class lots of useful bug reports"), | u"ENTCS document class and lots of useful bug reports"), | def main(argv, contributers): if len(argv) != 4: error(usage(argv[0])) txt_credits_data = unicode(as_txt_credits(contributers)).encode("utf-8") txt_credits = open(argv[1], "w") txt_credits.write(txt_credits_data) php_credits_data = unicode(as_php_credits(contributers, argv[2])).encode("utf-8") php_credits = open(argv... |
protected = (document.body[i].find("\\hspace*{}") != -1) | protected = "" if document.body[i].find("\\hspace*{}") != -1: protected = "*" | def revert_percent_hspace_lengths(document): " Revert relative HSpace lengths to ERT " i = 0 while True: i = find_token(document.body, "\\begin_inset space \\hspace", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Can't find end of inset at line " + str(i)) i += 1 continue # ... |
if protected: subst = put_cmd_in_ert("\\hspace*{" + length + "}") else: subst = put_cmd_in_ert("\\hspace{" + length + "}") | subst = put_cmd_in_ert("\\hspace" + protected + "{" + length + "}") | def revert_percent_hspace_lengths(document): " Revert relative HSpace lengths to ERT " i = 0 while True: i = find_token(document.body, "\\begin_inset space \\hspace", i) if i == -1: break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Can't find end of inset at line " + str(i)) i += 1 continue # ... |
protected = (document.body[i].find("\\hspace*{}") != -1) length = get_value(document.body, '\\length', i + 1) | j = find_end_of_inset(document.body, i) if j == -1: document.warning("Can't find end of inset at line " + str(i)) i += 1 continue length = get_value(document.body, '\\length', i + 1, j) | def revert_hspace_glue_lengths(document): " Revert HSpace glue lengths to ERT " i = 0 while True: i = find_token(document.body, "\\begin_inset space \\hspace", i) if i == -1: break protected = (document.body[i].find("\\hspace*{}") != -1) length = get_value(document.body, '\\length', i + 1) if length == '': document.war... |
return | i = j continue protected = "" if document.body[i].find("\\hspace*{}") != -1: protected = "*" | def revert_hspace_glue_lengths(document): " Revert HSpace glue lengths to ERT " i = 0 while True: i = find_token(document.body, "\\begin_inset space \\hspace", i) if i == -1: break protected = (document.body[i].find("\\hspace*{}") != -1) length = get_value(document.body, '\\length', i + 1) if length == '': document.war... |
glue = re.compile(r'.+[\+-]') if glue.search(length): | if length.find('-',1) != -1 or length.find('+',1) != -1: | def revert_hspace_glue_lengths(document): " Revert HSpace glue lengths to ERT " i = 0 while True: i = find_token(document.body, "\\begin_inset space \\hspace", i) if i == -1: break protected = (document.body[i].find("\\hspace*{}") != -1) length = get_value(document.body, '\\length', i + 1) if length == '': document.war... |
if protected: subst = [old_put_cmd_in_ert("\\hspace*{" + length + "}")] else: subst = [old_put_cmd_in_ert("\\hspace{" + length + "}")] document.body[i:i + 3] = subst i = i + 2 | subst = put_cmd_in_ert("\\hspace" + protected + "{" + length + "}") document.body[i:j+1] = subst i = j | def revert_hspace_glue_lengths(document): " Revert HSpace glue lengths to ERT " i = 0 while True: i = find_token(document.body, "\\begin_inset space \\hspace", i) if i == -1: break protected = (document.body[i].find("\\hspace*{}") != -1) length = get_value(document.body, '\\length', i + 1) if length == '': document.war... |
j = find_end_of_inset(document.body, i) | j = find_token(document.body, "</cell>", i) | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular.") i = j continue # don't se... |
document.warning("Malformed LyX document: Could not find end of tabular.") | document.warning("Malformed LyX document: Could not find end of tabular cell.") | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular.") i = j continue # don't se... |
document.body[j+1:j+1] = subst | document.body[j:j] = subst | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular.") i = j continue # don't se... |
revert = [[376, []], | revert = [[376, [revert_multirow]], | def revert_includeall(document): " Remove maintain_unincluded_children param " i = find_token(document.header, '\\maintain_unincluded_children', 0) if i != -1: del document.header[i] |
u"Romanian localization"), | u"Romanian localization and support for the frletter document class"), | def main(argv, contributers): if len(argv) != 4: error(usage(argv[0])) txt_credits_data = unicode(as_txt_credits(contributers)).encode("utf-8") txt_credits = open(argv[1], "w") txt_credits.write(txt_credits_data) php_credits_data = unicode(as_php_credits(contributers, argv[2])).encode("utf-8") php_credits = open(argv... |
contributer(u"Ziegler & Partner GmbH", "info () transsib ! com", "GPL", "RE: Trans-Siberian Railroad pictures - question", "m=126385210219932", "19 January 2009", u"photo for banner"), | def main(argv, contributers): if len(argv) != 4: error(usage(argv[0])) txt_credits_data = unicode(as_txt_credits(contributers)).encode("utf-8") txt_credits = open(argv[1], "w") txt_credits.write(txt_credits_data) php_credits_data = unicode(as_php_credits(contributers, argv[2])).encode("utf-8") php_credits = open(argv... | |
[398, []] | [398, []], [399, []] | def revert_mathrsfs(document): " Load mathrsfs if \mathrsfs us use in the document " i = 0 end = len(document.body) - 1 while True: j = document.body[i].find("\\mathscr{") if j != -1: add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\usepackage{mathrsfs}"]) break if i =... |
revert = [[397, [revert_mathrsfs]], | revert = [[398, [revert_mathdots]], [397, [revert_mathrsfs]], | def revert_mathrsfs(document): " Load mathrsfs if \mathrsfs us use in the document " i = 0 end = len(document.body) - 1 while True: j = document.body[i].find("\\mathscr{") if j != -1: add_to_preamble(document, ["% this command was inserted by lyx2lyx"]) add_to_preamble(document, ["\\usepackage{mathrsfs}"]) break if i =... |
[409, [convert_use_xetex]] | [409, [convert_use_xetex]], [410, []] | def revert_use_xetex(document): " revert \\use_non_tex_fonts to \\use_xetex " i = 0 i = find_token(document.header, "\\use_non_tex_fonts", 0) if i == -1: document.warning("Malformed document. No \\use_non_tex_fonts param!") return val = get_value(document.header, "\\use_non_tex_fonts", 0) document.header[i] = "\\use_x... |
revert = [[408, [revert_use_xetex]], | revert = [[409, [revert_labeling]], [408, [revert_use_xetex]], | def revert_use_xetex(document): " revert \\use_non_tex_fonts to \\use_xetex " i = 0 i = find_token(document.header, "\\use_non_tex_fonts", 0) if i == -1: document.warning("Malformed document. No \\use_non_tex_fonts param!") return val = get_value(document.header, "\\use_non_tex_fonts", 0) document.header[i] = "\\use_x... |
i = j | i += 1 | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i = j continue #... |
rx = re.compile(r'(\\author)\s+(\d+)\s+(\".*\")\s*(.*)$') | rx = re.compile(r'(\\author)\s+([-\d]+)\s+(\".*\")\s*(.*)$') | def revert_author_id(document): " Remove the author_id from the \\author definition " i = 0 anum = 0 rx = re.compile(r'(\\author)\s+(\d+)\s+(\".*\")\s*(.*)$') idmap = dict() while True: i = find_token(document.header, "\\author", i) if i == -1: break m = rx.match(document.header[i]) if m: author_id = int(m.group(2)) i... |
[404, [convert_prettyref]] | [404, [convert_prettyref]], [405, []] | def convert_bibtex_clearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " i = find_token(document.header, '\\papersides', 0) sides = 0 if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") document.warning("Assuming single sided.") sides = 1... |
revert = [[403, [revert_refstyle]], | revert = [[404, []], [403, [revert_refstyle]], | def convert_bibtex_clearpage(document): " insert a clear(double)page bibliographystyle if bibtotoc option is used " i = find_token(document.header, '\\papersides', 0) sides = 0 if i == -1: document.warning("Malformed LyX document: Can't find papersides definition.") document.warning("Assuming single sided.") sides = 1... |
j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 | end = find_end_of_inset(document.body, i) if end == -1: document.warning("Can't find end of inset at line " + str(i)) i = j | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
p = document.body[i + 2].find("islongtable") if p > -1: q = document.body[i + 2].find("tabularvalignment") if q > -1: document.body[i + 2] = document.body[i + 2][:q - 1] document.body[i + 2] = document.body[i + 2] + '>' i = i + 1 | fline = find_token(document.body, "<features", i, end) if fline == -1: document.warning("Can't find features for inset at line " + str(i)) i = end continue p = document.body[fline].find("islongtable") if p != -1: q = document.body[fline].find("tabularvalignment") if q != -1: document.body[fline] = document.body[flin... | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
m = document.body[i + 2].find('tabularvalignment="top"') if m > -1: | m = document.body[fline].find('tabularvalignment="top"') if m != -1: | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
m = document.body[i + 2].find('tabularvalignment="bottom"') if m > -1: | m = document.body[fline].find('tabularvalignment="bottom"') if m != -1: | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
q = document.body[i + 2].find("tabularvalignment") if q > -1: document.body[i + 2] = document.body[i + 2][:q - 1] document.body[i + 2] = document.body[i + 2] + '>' | q = document.body[fline].find("tabularvalignment") if q != -1: document.body[fline] = document.body[fline][:q - 1] + '>' | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
i = j | i = end | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
document.body[j:j] = subst | document.body[end:end] = subst | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
i += len(subst) + 2 | i = end + len(subst) | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i += 1 continue ... |
checkProg('a FIG -> EPS/PPM converter', ['fig2dev'], rc_entry = [ r'''\converter fig eps "fig2dev -L eps $$i $$o" "" | path, fig2dev = checkProg('a FIG -> Image converter', ['fig2dev']) if fig2dev == "fig2dev": addToRC(r'''\converter fig eps "fig2dev -L eps $$i $$o" "" | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex=pdflatex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex=xelatex"' ]) chec... |
\converter fig png "fig2dev -L png $$i $$o" ""''', '']) | \converter fig png "fig2dev -L png $$i $$o" "" \converter fig pdftex "python -tt $$s/scripts/fig2pdftex.py $$i $$o" "" \converter fig pstex "python -tt $$s/scripts/fig2pstex.py $$i $$o" ""''') | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex=pdflatex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex=xelatex"' ]) chec... |
\converter fig pdftex "python -tt $$s/scripts/fig2pdftex.py $$i $$o" "" \converter fig pstex "python -tt $$s/scripts/fig2pstex.py $$i $$o" "" | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex=pdflatex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex=xelatex"' ]) chec... | |
checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx', 'tex2lyx' + version_suffix], | checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx' + version_suffix, 'tex2lyx'], | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex=pdflatex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex=xelatex"' ]) chec... |
indices = get_value(document.header, "\\use_indices", i) preamble = "" useindices = (indices == "true") | useindices = str2bool(get_value(document.header, "\\use_indices", i)) del document.header[i] preamble = [] | def revert_splitindex(document): " Reverts splitindex-aware documents " i = find_token(document.header, '\\use_indices', 0) if i == -1: document.warning("Malformed LyX document: Missing \\use_indices.") return indices = get_value(document.header, "\\use_indices", i) preamble = "" useindices = (indices == "true") if use... |
preamble += "\\usepackage{splitidx}\n" del document.header[i] | preamble.append("\\usepackage{splitidx})") | def revert_splitindex(document): " Reverts splitindex-aware documents " i = find_token(document.header, '\\use_indices', 0) if i == -1: document.warning("Malformed LyX document: Missing \\use_indices.") return indices = get_value(document.header, "\\use_indices", i) preamble = "" useindices = (indices == "true") if use... |
preamble += "\\newindex[" + iname + "]{" + ishortcut + "}\n" | preamble.append("\\newindex[" + iname + "]{" + ishortcut + "}") | def revert_splitindex(document): " Reverts splitindex-aware documents " i = find_token(document.header, '\\use_indices', 0) if i == -1: document.warning("Malformed LyX document: Missing \\use_indices.") return indices = get_value(document.header, "\\use_indices", i) preamble = "" useindices = (indices == "true") if use... |
if preamble != "": | if preamble: | def revert_splitindex(document): " Reverts splitindex-aware documents " i = find_token(document.header, '\\use_indices', 0) if i == -1: document.warning("Malformed LyX document: Missing \\use_indices.") return indices = get_value(document.header, "\\use_indices", i) preamble = "" useindices = (indices == "true") if use... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.