Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use underscore for overline to reduce the gap #59

Merged
merged 2 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lua/nabla/ascii.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ local put_if_only_sup


local style = {
div_bar = "―",
div_high_bar = "‾",
div_middle_bar = "―",
div_low_bar = "_",

left_top_par = '⎛',
left_middle_par = '⎜',
Expand Down Expand Up @@ -1562,7 +1564,7 @@ function to_ascii(explist, exp_i)
local bar = ""
local w = math.max(leftgrid.w, rightgrid.w)
for x=1,w do
bar = bar .. style.div_bar
bar = bar .. style.div_middle_bar
end


Expand Down Expand Up @@ -1761,7 +1763,7 @@ function to_ascii(explist, exp_i)
local bar = ""
local w = belowgrid.w
for x=1,w do
bar = bar .. style.div_bar
bar = bar .. style.div_low_bar
end
local overline = grid:new(w, 1, { bar })
g = overline:join_vert(belowgrid)
Expand All @@ -1773,7 +1775,7 @@ function to_ascii(explist, exp_i)
local txt = ""
local w = belowgrid.w
for x=1,w-1 do
txt = txt .. style.div_bar
txt = txt .. style.div_middle_bar
end
txt = txt .. style.vec_arrow

Expand Down
6 changes: 4 additions & 2 deletions src/core/ascii.lua.t
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,15 @@ for y=1,h do
end

@style_variables+=
div_bar = "―",
div_high_bar = "‾",
div_middle_bar = "―",
div_low_bar = "_",

@generate_appropriate_size_fraction_bar+=
local bar = ""
local w = math.max(leftgrid.w, rightgrid.w)
for x=1,w do
bar = bar .. style.div_bar
bar = bar .. style.div_middle_bar
end

@grid_data+=
Expand Down
2 changes: 1 addition & 1 deletion src/core/overline.lua.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ elseif name == "overline" then
local bar = ""
local w = belowgrid.w
for x=1,w do
bar = bar .. style.div_bar
bar = bar .. style.div_low_bar
end
local overline = grid:new(w, 1, { bar })
2 changes: 1 addition & 1 deletion src/core/vec.lua.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vec_arrow = "→",
local txt = ""
local w = belowgrid.w
for x=1,w-1 do
txt = txt .. style.div_bar
txt = txt .. style.div_middle_bar
end
txt = txt .. style.vec_arrow

Expand Down