-
Notifications
You must be signed in to change notification settings - Fork 61
Lessen the scope of lesson 08 #26
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
Conversation
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: | ||
|
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so called
→ called
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should contain
→ contains
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 |
There was a problem hiding this comment.
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 takes
→ taking 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 |
There was a problem hiding this comment.
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 – for the sake of completeness I'll show you the | ||
standard lines later on in the more-info page. |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lines
→ rules
?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cells
→ cell'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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customising
→ Customizing
(besides the paragraph below also uses the US English spelling)
…ithub.io into rework-lesson-08
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 %} --> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.