-
Notifications
You must be signed in to change notification settings - Fork 65
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
Row Emphasis #221
Comments
That's an interesting proposal, thank you. We currently have But this might suggest to rename the current options a bit, e.g. we might have:
And the @DaveJarvis, until this is done, you might want to add the backticks to the columns before calling > i <- head(iris)
> i$Sepal.Width <- sapply(i$Sepal.Width, pandoc.verbatim.return)
> pander(i, emphasize.strong.cols = 2:3)
-------------------------------------------------------------------
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
-------------- ------------- -------------- ------------- ---------
5.1 **`3.5`** **1.4** 0.2 setosa
4.9 **`3`** **1.4** 0.2 setosa
4.7 **`3.2`** **1.3** 0.2 setosa
4.6 **`3.1`** **1.5** 0.2 setosa
5.0 **`3.6`** **1.4** 0.2 setosa
5.4 **`3.9`** **1.7** 0.4 setosa
------------------------------------------------------------------- Resulting in:
|
This seems like a great idea. @daroczig, wouldn't renaming options be bad for backward compatibility? |
@RomanTsegelskyi, sure it would :) But it's only the
Well, this would result in even more arguments to |
Implemented in #222 > pander(head(iris), emphasize.strong.cols = 2:3, emphasize.verbatim.cols = 2)
-------------------------------------------------------------------
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
-------------- ------------- -------------- ------------- ---------
5.1 **`3.5`** **1.4** 0.2 setosa
4.9 **`3`** **1.4** 0.2 setosa
4.7 **`3.2`** **1.3** 0.2 setosa
4.6 **`3.1`** **1.5** 0.2 setosa
5 **`3.6`** **1.4** 0.2 setosa
5.4 **`3.9`** **1.7** 0.4 setosa
------------------------------------------------------------------- |
Thanks a lot, @RomanTsegelskyi, closing. |
Brilliant. This will work just fine. Thank you. |
Background
In markdown, it is possible to create the following table:
-28309.3
7.2
29200.0
4.6
-15.5
0.3
-5.5
0.2
-2.5
0.2
-1.5
0.6
0.5
0.4
-690.3
2.0
-122.7
0.3
-40.0
1.9
1.2
13.2
18.9
In this table, the MWh/y and Cost columns are bold and fixed width. This allows a custom font to be applied via ConTeXt. The result is quite lovely:
Problem
It appears as though pander only supports a single mechanism for column emphasis (the double asterisk for bold).
Request
Is it possible to support both double asterisk and a double asterisk with backticks?
The text was updated successfully, but these errors were encountered: