Skip to content

Commit

Permalink
use underscore for overline to reduce the gap (#59)
Browse files Browse the repository at this point in the history
* use underscore for overline to reduce the gap

* gen lua

---------

Co-authored-by: jbyuki <[email protected]>
  • Loading branch information
Danie-1 and jbyuki authored Apr 7, 2023
1 parent 6a628c8 commit 87ef6bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
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

0 comments on commit 87ef6bc

Please sign in to comment.