# whose value is not default before the float.
# The check here is not accurate, but it doesn't matter
# as extra '\foo default' commands are ignored.
- # In fact, it might be safer to output '\foo default' for all
+ # In fact, it might be safer to output '\foo default' for all
# font attributes.
k = get_paragraph(lines, i)
flag = 0
return filter(is_nonempty_line, lines) == []
move_rexp = re.compile(r"\\(family|series|shape|size|emph|numeric|bar|noun|end_deeper)")
-ert_rexp = re.compile(r"\\begin_inset|.*\\SpecialChar")
+ert_rexp = re.compile(r"\\begin_inset|\\hfill|.*\\SpecialChar")
spchar_rexp = re.compile(r"(.*)(\\SpecialChar.*)")
ert_begin = ["\\begin_inset ERT",
"status Collapsed",
k = i+1
while 1:
k2 = find_re(lines, ert_rexp, k, j)
- inset = specialchar = 0
+ inset = hfill = specialchar = 0
if k2 == -1:
k2 = j
elif check_token(lines[k2], "\\begin_inset"):
inset = 1
+ elif check_token(lines[k2], "\\hfill"):
+ hfill = 1
+ del lines[k2]
+ j = j-1
else:
specialchar = 1
mo = spchar_rexp.match(lines[k2])
if not is_nonempty_line(lines[k]):
k = k+1
new.append("")
+ elif hfill:
+ new = new+["\hfill", ""]
+ k = k2
elif specialchar:
if new == []:
# This is not necessary, but we want the output to be
lines[j:k] = text
i = i+1
-
+
oldunits = ["pt", "cm", "in", "text%", "col%"]
def get_length(lines, name, start, end):