ManimCommunity / ManimCommunity/manim

0.17.3 MathTable - first and last column of MathTable are truncated

Open
#3,446 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior
Setting a fixed width of the columns in a MathTable() is not correctly supported for the first and last column, which are truncated at the left and right edge of the table elements.

## Expected behavior
The given width should be obeyed independent on the contents of the cells.

## How to reproduce the issue
Code for reproducing the problem

```python
class Test(Scene):
def construct(self):
mytable = MathTable(
[[1, 10, 100, 1000, 10000, 100000], [0,0,0,0,0,0]],
h_buff=.1,
v_buff=.1,
include_outer_lines=True,
arrange_in_grid_config={"col_widths":[3]*6, "col_alignments": ["c"]*6}
).scale_to_fit_width(10)
self.add(mytable)
```

## Additional media files
Images/GIFs
![image](https://github.com/ManimCommunity/manim/assets/8582807/81f27b5e-1ef0-4fdc-88a1-f0f32e3803c0)

## System specifications

System Details

- OS: Windows 10 64bit
- Python version (`python/py/python3 --version`): 3.11.6

LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020): MikTex

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MathTable entry point and reproduce the supplied Scene using arrange_in_grid_config and scale_to_fit_width. Trace how the outer columns are laid out and rendered, then verify that the fixed widths remain visible at both table edges regardless of cell contents. Add regression coverage for the reported example if the relevant test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.