Skip to content

Conversation

Skillmon
Copy link
Member

This pull request will reduce the amount of information in lesson-08 and instead move more to more-08. It is a result from the discussion here.

You can also use `\multicolumn` on a single cell to prevent whatever you defined
in the table preamble for the current column from applying. The following uses
this to centre the table's head row:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we are supposed to use "center" (the intro explicitly says the lessons use US spelling)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(which I never read and I'm writing standard English most of the time, not English simplified...)

en/more-08.md Outdated

As the lesson didn't cover all the available preamble-tokens I'll go on and
explain a few others here. You might want to revisit the tables at the start of
the lesson to get an overview of the things available. I hope the short
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use first person elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone for 'we' in various places, to keep the language informal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I meant to add that if it is used, then use the plural we form not "I"

en/more-08.md Outdated
horizontal space.)

The `!` preamble token does something pretty similar. The difference is, that it
_adds_ its argument to the space in the centre between two columns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

center

en/more-08.md Outdated
### Vertical rules

Though you _don't_ want to use vertical rules, sometimes you just have to. LaTeX
still got you covered.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing "has"

en/more-08.md Outdated
Comment on lines 471 to 475
Oftentimes one might think it's a good idea to merge cells vertically to get
some desired output, but instead one should have split a cell into several
vertically. With this small trick one can get pretty neat things done. Splitting
cells into many vertically can be done by nesting a `tabular` environment in a
single cell:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't read naturally at all. Perhaps

Often, rather than making a cell span multiple rows it is better to instead have a single row in which some cells are split vertically by the use of nested tabular environments.

environment, in which you specify the columns by using single letter names. The
available column types are:
environment, in which you specify the columns by using single-letter names, so
called preamble-tokens. The available column types are:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so calledcalled

en/lesson-08.md Outdated
| `w{align}{width}` | prints the contents with a fixed `width`, silently overprinting if things get larger. You can choose the horizontal alignment using `l`, `c`, or `r`. |
| `W{align}{width}` | like `w`, but this will issue an overfull box warning if things get too wide. |

In addition a few other preamble-tokens are available which don't define a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comma after In addition

en/lesson-08.md Outdated
package. Note however that other packages can add other types as well. This
lesson will not cover all of these but only the essentials. So if you want to
have an idea about what the other types are useful for after reading this
lesson, make sure to visit the more-info page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a bit hard to read (for me, at least). Perhaps:

A few more useful column types, from different packages, are presented
in the [further details page](en/more-08) for this lesson.

en/lesson-08.md Outdated
```
<!-- {% endraw %} -->

If a table column should contain a lot of text you will have issues to get that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should containcontains

en/lesson-08.md Outdated
following `\\` or another `\hline` or `\cline`).

The issue is that the `l` type column typesets its contents in a single row at
its natural width, meaning taking as much space as it takes, even if there is a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meaning taking as much space as it takestaking as much space as it needs

en/lesson-08.md Outdated
two columns and change the space between the latter two to `1cm` we could do so
by using
If you want to declare many columns of the same type you'll think this is
cumbersome to do for each. Luckily you can have an easier life in that case by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to do for each what? Perhaps you'll think this is cumbersome when the table has many columns

en/lesson-08.md Outdated
for professional tables you shouldn't use any of the standard lines; instead you
should get familiar with the facilities of the `booktabs` package, which is why
it is covered here first &ndash; for the sake of completeness I'll show you the
standard lines later on in the more-info page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the idea is showing best practices, is it worth showing standard rules at all? (I can see reasons to answer “yes”; I'm just raising the question)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another issue is the first person usage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought they should be covered just because of the vertical rules. We can throw them out and stick to "don't use vertical rules, ever", but I'm not sure whether this would be the right thing to do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People do want to make 'grids' for good reasons: I think we can but standard lines in 'more'.

en/lesson-08.md Outdated
`*{num}{string}` | repeats `string` for `num` times in the preamble. With this you can define multiple identical columns.
`>{decl}` | this will put `decl` before the contents of every cell in the following column (this is useful, e.g., to set a different font for this column)
`<{decl}` | this will put `decl` after the contents of each cell in the previous column
A word of advice prior to introducing lines; lines should be used really
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linesrules?

en/more-08.md Outdated

You might find this handy, but now you want the first cell not to be affected
because it's the table head. Here `\multicolumn` comes in handy. Remember that
it can be used to change a single cells alignment as well? In fact, if you use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cellscell's

en/more-08.md Outdated
provided by LaTeX, those are `\hline` (equaling `\toprule`, `\midrule`, and
`\bottomrule`) and `\cline` (which behaves like `\cmidrule`).

## Customising `booktabs` rules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomisingCustomizing (besides the paragraph below also uses the US English spelling)

which is not built into the LaTeX kernel only for historic reasons. So put the
following in your preamble and we're good to go:

<!-- {% raw %} -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cut down the 'raw' parts to those that are necessary, largely as most of our examples don't need it. I've no problem with it being added back in, but just to note why it's absent at present here.

example with putting a colon in between the first two columns? How about we also
append that colon to the first column, so that things don't look as clunky.
`booktabs` provides four different types of lines. Each of those macros has to
be used as the first thing in a row or following another rule, else you'll get a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'or else' rather than just 'else' is more natural to me.

```latex
\documentclass{article}
\usepackage{array}
\usepackage{array, booktabs}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd favour splitting over two lines: it makes life easier when commenting out packages or similar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only not split it into two because it was done like this elsewhere. I'm fine with splitting it into several, which is what I'd have done in my own document anyways.

@davidcarlisle davidcarlisle merged commit dd39be4 into master May 20, 2020
@josephwright josephwright deleted the rework-lesson-08 branch June 1, 2020 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants