siefkenj / pretext-book

Monorepo for Typescript/Javascript tools for working with PreTeXt documents
MIT License
2 stars 14 forks source link

Tabular-related tags #85

Closed trshemanske closed 2 months ago

trshemanske commented 3 months ago

Here is the first draft of these five tags. I have some overlapping but reasonably broad starting examples which populate <tables> and <tabular>. I redirected examples for <col>, <row> and <cell> to the table/tabular pages.

We could obviously rethink that, but I would need to know have to represent a code snippet as a fragment in this mark down setting.

Of course, now that there is something to talk about, we can discuss how to improve these pages. In particular, if there are other examples you have in mind or features to demonstrate, let me know.

siefkenj commented 3 months ago

Looks like a good start. I think there should be a simple example of a table with a row and col and cell that can be used in common for each tag. It's nice not to have to click away from the page to see an example, so I'd suggest duplicating examples rather than referencing other pages.

trshemanske commented 2 months ago

Hi Jason,

Before I make any changes, perhaps tomorrow, I need some more clarity on things.

In many cases, I am guessing what certain aspects of some of your code means:

is clear means either environment or nested environments? I copied it from an example of yours. But to me, "parents" is unclear unless you want a nested environment
... The side by side was the example with defaults followed by how cell parameters will change things. Seems to make it visually clear without combing the code, but your call. Certain aspects of VS code periodically give me grief, like formatting (indentation). I have extensions: mdx, pretext-tools, Prettier code installed. Are there better options? Tom On Thu, Aug 22, 2024 at 11:32 AM Jason Siefken ***@***.***> wrote: > ***@***.**** commented on this pull request. > ------------------------------ > > In packages/docs/pages/reference/elements/cell.mdx > : > > > \ No newline at end of file > +```ptx-example > + > + > > Why the . This seems like too much for a simple example. > ------------------------------ > > In packages/docs/pages/reference/elements/col.mdx > : > > > + > + > + > + A > + > + > + C > + > + > + > + > +``` > + > +```ptx-example > + > + > > Inconsistent indentation > ------------------------------ > > In packages/docs/pages/reference/elements/col.mdx > : > > > \ No newline at end of file > +```ptx-example > + > +
> + Column options (top="minor" right="medium") > > We don't need to say the options top and right again. They can be clearly > seen in the source. > ------------------------------ > > In packages/docs/pages/reference/elements/row.mdx > : > > > + > + > + A > + B > + > + > + AA A AA > + B BB B > + > + > +
> +

+ + +ptx-example +

Can a table not go directly in a

? I am wondering why you included a subsection as a parent.

— Reply to this email directly, view it on GitHub https://github.com/siefkenj/pretext-book/pull/85#pullrequestreview-2254958787, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANHA5DG2MCLDHMZU4MX6TWLZSX77DAVCNFSM6AAAAABMUPWUFSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENJUHE2TQNZYG4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Thomas R. Shemanske Grantham, NH

siefkenj commented 2 months ago

Hi Jason, Before I make any changes, perhaps tomorrow, I need some more clarity on things. In many cases, I am guessing what certain aspects of some of your code means: is clear means either environment or nested environments? I copied it from an example of yours. But to me, "parents" is unclear unless you want a nested environment

... The side by side was the example with defaults followed by how cell parameters will change things. Seems to make it visually clear without combing the code, but your call. Certain aspects of VS code periodically give me grief, like formatting (indentation). I have extensions: mdx, pretext-tools, Prettier code installed. Are there better options? Tom

Indeed the parents represents a chain of elements that will be created as parents. If the tag you're making an example for involves showing a number (like a section number), then it makes sense to have a subsection (maybe this is why it's a good idea, because the table will get a number like 1.2.3?)

In general we should avoid excess tags in the examples. So, for the <sidebyside> if both tables are helpful, it would be better to have them as two different examples, rather than one with an extra <sidebyside> tag.

trshemanske commented 2 months ago

I left the section, subsection headers for the reason you mentioned about label depth. Mostly fixed indentation (easier than I thought, but I figured a formatter would do it). I am still building pretext code to test the examples since I can't get your build scripts to work. So often my code is more deeply indented in PreTeXt than when I put it into your viewable framework on localhost:3000