Skip to content
Snippets Groups Projects
Commit 3637c471 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

revert back to the first commit 393dfd06

parent 58abee45
No related branches found
No related tags found
1 merge request!876Fix: Break line properly into latex when next line starts with `_`
......@@ -513,6 +513,10 @@ def make_par_table(parms):
line = ''
for i in range(0, len(seq), length):
sub_line = seq[i:i + length]
# Ensure proper line break if the
# start of the new line begins with `_`
if sub_line[0] == '_' and line[-1] == "-":
line += '\\'
line += sub_line.replace('/', '/\-')
if not any(c in lbc for c in sub_line):
line += '\-'
......@@ -528,11 +532,10 @@ def make_par_table(parms):
len_parms[0] = max_len[0]
name = split_len(name, max_len[0])
value = str(p.value)
value = tex_escape(str(p.value))
if len(value) > max_len[1]:
len_parms[1] = max_len[1]
value = split_len(value, max_len[1])
value = tex_escape(value)
if issubclass(p.type, str):
value = "``{}''".format(value)
comment = tex_escape(str(p.comment)[1:])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment