• No results found

, v. 0.08 using bold characters with

N/A
N/A
Protected

Academic year: 2021

Share ", v. 0.08 using bold characters with"

Copied!
4
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

xfakebold

, v. 0.08

using bold characters with

pdflatex

,

lualatex

or

xelatex

Herbert Voß

June 24, 2020

Contents

1 TEX-engines 2

2 How does it work? 2

3 Optional package argument 2

4 The macros 2

5 The example code 3

5.1 Default setting . . . 3

6 Loading the package with another value 3 7 Using the optional argument of the macro 4

Abstract

The package fakes a vector font with outline characters by the text render of PDF. It writes directly into the pdf output with\pdfliteral and uses the colorstack package

pdfrenderto allow boldness with a pagebreak inside the bold part. The package defines two macros which can be used in text and in math mode. However, for the text mode one should use the bold version of the text font which should be available in most cases. This is different to the math mode where only some free math fonts provide a bold version.

Thanks to: Heiko Oberdiek; Scott Pakin, Will Robertson; Yusuke Terada;

(2)

1

TEX-engines

With XƎLATEX you do not really need this package, because you can use the optional argument

AutoFakeBoldfrom packagefontspecorunicode-mathwhich does the same internally. For LuaTEX the

optionAutoFakeBoldis only supported byunicode-mathfor math typesetting. For pdfLATEX this package

can be used for text and math.

2

How does it work?

PDF knows different text render modes for outline fonts.

Mode 0{ 0 Tr 0 w }

OTTO

OTTO Mode 1{ 1 Tr 0 w }

OTTO

OTTO Mode 1{ 1 Tr 0.3 w }

OTTO

OTTO Mode 2{ 2 Tr 0 w }

OTTO

OTTO Mode 2{ 2 Tr 0.3 w }

OTTO

OTTO

In mode 0 the character is filled but without drawing its outline which can be seen when printing in mode 1, where the linewidth of the outline is the smallest one which the system allows. Setting the linewidth to 0.3 bp, which is nearly the same as 0.3 pt, the linewidth of the outline increases. In mode 2 the character is printed with filling and drawing the outline, which is mode 0 and 1 together. The reason why the character is bold by default. Increasing the linewidth makes it more bold.

3

Optional package argument

The only package option isboldwhich is preset by 0.3, which is the linewidth of the outlines of the characters.

\usepackage[bold=0.6]{xfakebold}

makes the characters more bold.

4

The macros

\setBold[<optional value>] \unsetBold

Without using the optional argument the default setting is used.

(3)

5

The example code

The following examples use the value for𝜋, defined in LATEX3 as\c_pi_fp. To get rid of the L3-syntax

we define a new variable:

\ExplSyntaxOn \let\PI\c_pi_fp \ExplSyntaxOff

5.1

Default setting

\documentclass{article} \usepackage{xfakebold,xfp} \begin{document} An example: $\pi^{\pi}=\fpeval{\PI^\PI}$ and $\displaystyle\int\limits_1^{\infty}\frac1{x^2}\symup dx=1$ \setBold\noindent An example: $\pi^{\pi}=\fpeval{\PI^\PI}$ and $\displaystyle\int\limits_1^{\infty}\frac1{x^2}\symup dx=1$ \unsetBold\noindent An example: $\pi^{\pi}=\fpeval{\PI^\PI}$ and $\displaystyle\int\limits_1^{\infty}\frac1{x^2}\symup dx=1$ \end{document} An example:𝜋𝜋= 36.46215960720789and ∞ ∫ 1 1 𝑥2d𝑥 = 1 An example:𝜋𝜋= 36.46215960720789and ∞ ∫ 1 1 𝑥2d𝑥 = 1 An example:𝜋𝜋= 36.46215960720789and ∞ ∫ 1 1 𝑥2d𝑥 = 1

6

Loading the package with another value

(4)

An example:𝜋𝜋= 36.46215960720789and ∞ ∫ 1 1 𝑥2d𝑥 = 1 An example:𝜋𝜋= 36.46215960720789and ∞ ∫ 1 1 𝑥2d𝑥 = 1

7

Using the optional argument of the macro

\documentclass{article} \usepackage{xfakebold,xfp} \begin{document} \setBold[0.01]\noindent An example: $\pi^{\pi}=\fpeval{\PI^\PI}$ and $\displaystyle\int\limits_1^{\infty}\frac1{x^2}\symup dx=1$ \setBold[0.2]\noindent An example: $\pi^{\pi}=\fpeval{\PI^\PI}$ and $\displaystyle\int\limits_1^{\infty}\frac1{x^2}\symup dx=1$ \setBold[0.6]\noindent An example: $\pi^{\pi}=\fpeval{\PI^\PI}$ and $\displaystyle\int\limits_1^{\infty}\frac1{x^2}\symup dx=1$ \unsetBold

Referenties

GERELATEERDE DOCUMENTEN

II The tagpdf-user module Code related to L A TEX2e user commands and document com- mands Part of the tagpdf package 25 1 Setup commands 25 2 Commands related to mc-chunks 25 3

This package defines more suitable representations for vectors and unit vectors, using different fonts (boldface roman and sans serif) and two kinds of underlining (straight and

xesoul : Using the soul package with XƎL A TEX Apostolos Syropoulos Xanthi, Greece asyropoulos@yahoo.com 2021/02/23 Abstract.. This is a small package that allows users to

Numbers written in italic refer to the page where the corresponding entry is de- scribed; numbers underlined refer to the definition; numbers in roman refer to the pages where the

This page discusses Quinn McNemar who introduced McNemar’s test andM. Giuseppe Peano who discovered

\MF@make@bg essentially builds a list of as many filler elements as the tem- plate has characters, using a loop macro \MF@make@bg. We run \MF@store@field@bg with an additional

Since it is sometimes necessary to be able to typeset the glyphs representing the ASCII control characters (typically in programming or interface documents), we have created a new

This article describes a new font and style option (ascii.sty which includes the IBM graphics characters commonly used by PCs to represent the control codes (ASCII 1–31)..