From b998fc56f42a74c8dc8064c75d9c61a16e7ba6d0 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Tue, 5 Apr 2022 14:01:21 +0200 Subject: [PATCH] update --- .github/workflows/docs.yml | 16 ++++++---------- src/backends/unicodeplots.jl | 10 ++++++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ffca8f0e..93d16b74 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,7 +9,7 @@ on: jobs: Build_docs: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: @@ -29,17 +29,14 @@ jobs: - name: Install dependencies run: | sudo apt-get update -y - sudo apt-get install -y qt5-default \ + sudo apt-get install -y \ + texlive-{latex-{base,extra},binaries,pictures,luatex} \ ttf-mscorefonts-installer \ poppler-utils \ - pdf2svg \ - texlive-latex-base \ - texlive-binaries \ - texlive-pictures \ - texlive-latex-extra \ - texlive-luatex \ ghostscript-x \ - libgconf2-4 \ + libgconf-2-4 \ + qt5-default \ + pdf2svg \ gnuplot - name: Install fonts run: | @@ -49,7 +46,6 @@ jobs: url="$repo/releases/download/$ver/JuliaMono-ttf.tar.gz" echo "downloading & extract url=$url" wget -q "$url" -O - | tar -xz -C ~/.fonts - ls ~/.fonts sudo fc-cache -vr fc-list | grep 'JuliaMono' - name: Build documentation diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index 0ec0fbb1..7afa3156 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -294,7 +294,10 @@ function _show(io::IO, ::MIME"image/png", plt::Plot{UnicodePlotsBackend}) end Base.show(plt::Plot{UnicodePlotsBackend}) = show(stdout, plt) -Base.show(io::IO, plt::Plot{UnicodePlotsBackend}) = _show(io, MIME("text/plain"), plt) +function Base.show(io::IO, plt::Plot{UnicodePlotsBackend}) + prepare_output(plt) + _show(io, MIME("text/plain"), plt) +end # NOTE: _show(...) must be kept for Base.showable (src/output.jl) function _show(io::IO, ::MIME"text/plain", plt::Plot{UnicodePlotsBackend}) @@ -361,4 +364,7 @@ function _show(io::IO, ::MIME"text/plain", plt::Plot{UnicodePlotsBackend}) end # we only support MIME"text/plain", hence display(...) falls back to plain-text on stdout -_display(plt::Plot{UnicodePlotsBackend}) = (show(stdout, plt); println(stdout)) +function _display(plt::Plot{UnicodePlotsBackend}) + show(stdout, plt) + println(stdout) +end