* "Full Block" character in example block not visible in Beamer PDF
@ 2024-02-12 10:05 Loris Bennett
2024-02-12 11:06 ` Juan Manuel Macías
0 siblings, 1 reply; 3+ messages in thread
From: Loris Bennett @ 2024-02-12 10:05 UTC (permalink / raw)
To: Org Mode Mailing List
Hi,
I have a command line tool which generates an ASCII histogram. I would
like to include the output in a PDF Beamer presentation.
Currently I am using an 'example' block, thus:
#+begin_example
...
---------------------
CPU Efficiency (%)
---------------------
0.00 - 10.00 [ 0]
10.00 - 20.00 [ 0]
20.00 - 30.00 [ 0]
30.00 - 40.00 [ 0]
40.00 - 50.00 [ 0]
50.00 - 60.00 [ 0]
60.00 - 70.00 [ 0]
70.00 - 80.00 [ 1] ▉
80.00 - 90.00 [24] ████████████████████
90.00 - 100.00 [48] ████████████████████████████████████████
...
#+end_example
The blocks of the histogram are present in the PDF, but are white, like
the background of the slides. I can see this by marking them with the
mouse.
Does anyone know what I need to do to make the full block character
visible in this situation?
Cheers,
Loris
--
This signature is currently under constuction.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: "Full Block" character in example block not visible in Beamer PDF
2024-02-12 10:05 "Full Block" character in example block not visible in Beamer PDF Loris Bennett
@ 2024-02-12 11:06 ` Juan Manuel Macías
2024-02-12 12:40 ` Loris Bennett
0 siblings, 1 reply; 3+ messages in thread
From: Juan Manuel Macías @ 2024-02-12 11:06 UTC (permalink / raw)
To: Loris Bennett; +Cc: Org Mode Mailing List
Loris Bennett writes:
> The blocks of the histogram are present in the PDF, but are white, like
> the background of the slides. I can see this by marking them with the
> mouse.
>
> Does anyone know what I need to do to make the full block character
> visible in this situation?
Do you compile your document with pdfLaTeX?
It looks like you're using a Unicode character (FULL BLOCK / #2588 /
descomp: █ #2588) that pdfLaTeX doesn't recognize. You would have to use
LuaTeX or XeTeX as a TeX engine. And load the fontspec package to manage
the ttf or otf fonts. Additionally, you must define a mono font that
contains that character, for example Ubuntu Mono. An example:
#+TITLE: Some title
#+AUTHOR: author
#+Beamer_Header:\usepackage{fontspec}
#+Beamer_Header:\setsansfont{Linux Biolinum O}
#+Beamer_Header:\setmonofont{Ubuntu Mono}
#+LATEX_CLASS: beamer
#+LATEX_CLASS_OPTIONS: [presentation]
#+BEAMER_THEME: Boadilla
#+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col)
Screenshot:
https://i.imgur.com/ulYxJgr.png
Bonus: To check which fonts on your system contain a certain character,
you can use the TeX live tool Albatross. E.g.:
albatross █ --border-style 0 --detailed --show-styles --include-tex-fonts
Best regards,
Juan Manuel
--
Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño editorial y ortotipografía
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: "Full Block" character in example block not visible in Beamer PDF
2024-02-12 11:06 ` Juan Manuel Macías
@ 2024-02-12 12:40 ` Loris Bennett
0 siblings, 0 replies; 3+ messages in thread
From: Loris Bennett @ 2024-02-12 12:40 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Org Mode Mailing List
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Loris Bennett writes:
>
>> The blocks of the histogram are present in the PDF, but are white, like
>> the background of the slides. I can see this by marking them with the
>> mouse.
>>
>> Does anyone know what I need to do to make the full block character
>> visible in this situation?
>
> Do you compile your document with pdfLaTeX?
Yes.
> It looks like you're using a Unicode character (FULL BLOCK / #2588 /
> descomp: █ #2588) that pdfLaTeX doesn't recognize. You would have to use
> LuaTeX or XeTeX as a TeX engine. And load the fontspec package to manage
> the ttf or otf fonts. Additionally, you must define a mono font that
> contains that character, for example Ubuntu Mono. An example:
>
> #+TITLE: Some title
> #+AUTHOR: author
>
> #+Beamer_Header:\usepackage{fontspec}
> #+Beamer_Header:\setsansfont{Linux Biolinum O}
> #+Beamer_Header:\setmonofont{Ubuntu Mono}
> #+LATEX_CLASS: beamer
> #+LATEX_CLASS_OPTIONS: [presentation]
> #+BEAMER_THEME: Boadilla
>
> #+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col)
>
> Screenshot:
>
> https://i.imgur.com/ulYxJgr.png
The following seems to be sufficient for me
#+LATEX_COMPILER: xelatex
#+BEAMER_HEADER: \setmonofont{Fira Code}
Fira Code being the font for the terminal in which the histograms are
generated.
> Bonus: To check which fonts on your system contain a certain character,
> you can use the TeX live tool Albatross. E.g.:
>
> albatross █ --border-style 0 --detailed --show-styles --include-tex-fonts
Good to know.
Thanks!
Loris
> Best regards,
>
> Juan Manuel
>
> --
> Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño editorial y ortotipografía
>
--
This signature is currently under constuction.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-12 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-12 10:05 "Full Block" character in example block not visible in Beamer PDF Loris Bennett
2024-02-12 11:06 ` Juan Manuel Macías
2024-02-12 12:40 ` Loris Bennett
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).