Discussion:
[rkward] [Bug 399427] New: How to configure the fonts and background color of the "preview of rendered R Markdown"
Adley
2018-10-06 02:05:22 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399427

Bug ID: 399427
Summary: How to configure the fonts and background color of the
"preview of rendered R Markdown"
Product: rkward
Version: unspecified
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: User Interface
Assignee: rkward-***@kde.org
Reporter: ***@gmail.com
Target Milestone: ---

SUMMARY

My desktop environment is GNOME and using the dark themes "Adwaita-dark". I
found that, the results of the function "preview R markdown" can't read. It is
because the themes "Adwaita-dark" forces all the background to black. However,
the default font color of the preview also in black.

Are there any ways to configure the font color of the "preview R markdown" ?

Thanks.



STEPS TO REPRODUCE
1.
2.
3.

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
Qt Version:

ADDITIONAL INFORMATION
---Problem description---
Please fill in the missing bits *in English*.

Please give a brief summary on the problem:
###Please fill in###

What - in detail - did you do directly before you encountered this problem?
###Please fill in###

When you try to repeat the above, does the problem occur again (no, sometimes,
always)?
###Please fill in###

If applicable: When doing the same thing in an R session outside of RKWard, do
you see the same problem?
###Please fill in###

Do you have any further information that might help us to track this problem
down? In particular, if applicable, can you provide sample data and sample R
code to reproduce this problem?
###Please fill in###

RKWard is available in many different packagings, and sometimes problems are
specific to one method of installation. How did you install RKWard (which
file(s) did you download)?
###Please fill in###


---Session Info---
-- Frontend --
RKWard version: 0.7.0z+0.7.1+devel1
KDE Frameworks version (runtime): 5.48.0
KDE Frameworks version (compile time): 5.48.0
Qt version (runtime): 5.11.1
Local config directory: /home//.config
RKWard storage directory: /home//.rkward/
Backend version (as known to the frontend): 3.5.1

Debug message file (this may contain relevant diagnostic output in case of
trouble):
/tmp/rkward.frontend

-- Backend --
Debug message file (this may contain relevant diagnostic output in case of
trouble):
/tmp/rkward.rbackend

R version (compile time): 3.5.1 (2018-07-02 r74947)
R runtime session info:
R version 3.5.1 (2018-07-02)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 28 (Workstation Edition)

Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8
[9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rkward_0.7.1

loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1
--
You are receiving this mail because:
You are the assignee for the bug.
Adley
2018-10-07 03:32:34 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399427

Adley <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Platform|Fedora RPMs |Compiled Sources
--
You are receiving this mail because:
You are the assignee for the bug.
Thomas Friedrichsmeier
2018-10-07 07:01:14 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399427

Thomas Friedrichsmeier <***@ruhr-uni-bochum.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@ruhr
| |-uni-bochum.de

--- Comment #1 from Thomas Friedrichsmeier <***@ruhr-uni-bochum.de> ---
Well, this is a partial answer at best, but you can influence the text colors
of the output by adding meta and style information at the top of the .Rmd.
E.g.:

---
title: "Habits"
output:
html_document:
highlight: espresso
---
<style type="text/css">
body p {
color: #CCCCCCCC;
}
</style>

The "highlight" affects the R highlighting colors, only, while to change the
default text color, apparently you have to use CSS. (It would be possible to
control both via CSS).

I do not really have an idea on how this could be handled automatically from
within RKWard. I suppose we could add a setting to specify a custom CSS for
.Rmd previews, but that would both need manual action, _and_ it would override
whatever is specified in the .Rmd header.

Let me know, if anybody has a good idea on this.
--
You are receiving this mail because:
You are the assignee for the bug.
Adley
2018-10-08 11:00:16 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399427

--- Comment #2 from Adley <***@gmail.com> ---
It's work, Thanks.
--
You are receiving this mail because:
You are the assignee for the bug.
Adley
2018-10-20 15:48:02 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=399427

Adley <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |NOT A BUG
Status|REPORTED |RESOLVED
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...