Garamond Math: a New Mathematical Font for Use With XeTeX / LyX

Combining fonts can be a headache, especially when we have mathematical formulas in our documents. And that’s why I am very happy that the following new project exists:

Garamond-Math | An OTF math font matching the EB Garamond

Clearly, in order to use this font we need a system that recognizes it, like XƎTEX with the  unicode-math package.

This mathematical font picks its main glyphs from EBGaramond, while its mathematical elements are modifications of other projects like STIX Two, Libertinus Math and TeX Gyre Termes Math.

Still on an early development stage, this font is very promising and allows us to build technical documents with one of the most beautiful typefaces ever developed.

Advertisements

Vollkorn Typeface

Maybe it’s time to talk about the font I use on this site:

Vollkorn Typeface, by Friedrich Althausen

a gorgeous typeface available under SIL Open Font License (OFL).

Originally developed on 2006, Vollkorn have gained many amazing options and extensions. Since version 4.1 it’s available on six “weights,” each accompanied by an unique Italic form: Regular, Medium, SemiBold, Bold, ExtraBold and Black.

Note: LibreOffice gets confused by so many variants and, in fact, does not offer the Medium weight. Everything works on XƎTEX, of course.

Some examples of this font at work:

As you can see from the screenshots, this font offers an impressive list of OpenType features, and many of these features can be combined on several ways (I let for you, my dear reader, the joy of playing with them).

With full support for many languages that use the Latin alphabet, variants of Cyrillic (including italics), Greek, etc., Vollkorn is one of the most complete typefaces on the free software world.


Just in case someone do not get the joke on the font name: Vollkorn is a German whole grain bread 😉

Writer: List Numbering and Chapter Numbering

This is a concept that confuse a lot of new, and not so new, users: the “difference” (yes, between quotes) between list numbering, both manually formatted and list styles, and chapter numbering.

We’ve seen how to align lists on a previous article: that holds for both kinds of numberings so let’s focus on the difference between “normal” lists and what we find on Tools → Chapter numbering.

  • The numbered/bulleted list we find on the toolbar/sidebar are useful ONLY for quick lists. Those lists need to be configured by hand each time.
  • Lists styles have the advantage of making the configuration just once (they are styles!) and the disadvantage that “levels” need to be chosen by hand.
  • Finally, Tools → Chapter numbering is the dedicated tool to number headings. It’s by far the easiest way to number chapters on your document, but have some limitations we’ll see below.

So yes, all three generate “numbered items”, all three work more or less the same way but all three are used for different purposes.

Let’s see the “logic” behind all that.

Numbered & Bulleted Toolbar/Sidebar

All of us used it more than once: with the cursor on a paragraph, one click and we get a working list.

I’ll not repeat here the previous article about how to align a list, check it out for more details, but it’s clear that if we need to perform all that every time we insert a list it’s better to not need them too often.

If our document need many lists, all of them with a consistent, and not standard, look then we need to use styles.

List Styles

The fifth button on the style editor (F11) gives us several predefined list styles. Five of those styles, the ones called “List 1” to “List 5”, are bullet styles while the other five are different types of numbered lists: normal numbers, letters and two kinds of Roman numerals.

Each of those styles offer up to ten nested levels and can be set as any list, so again I’ll not enter on the details of their configuration. Let’s focus on the use of list styles, because that can be a bit tricky.

On both, a paragraph style definition or on the setting of a particular manually formatted paragraph we can find the Outline & Numbering section

Here, under “Numbering style” we can pick any list style to use on that paragraph/paragraph style. In fact, if with the cursor on any paragraph we double click on a given list style the only way to later remove the list from that paragraph is to go to the “Outline & Numbering” section of the paragraph formatting and select “None”.

NOTE: Because we are now using a numbering style, by default the numbering will continue without restarting so if you create a new list later on your document you’ll need to restart the numbering by using the corresponding button on the Bullets and Numbering toolbar.

Chapter Numbering, a.k.a Outline Numbering

As you can see on the previous screenshot there is also something called “Outline Level” there. What’s that?

On a Writer document it’s possible to create a hierarchy of “levels” that takes care of the document structure. There are 10 levels available to choose from. For example, you can build a structure like this:

Level 1 → Part

Level 2 → Chapter

Level 3 → Section

etc.

NOTE: By “section” here I mean the usual meaning of “Section”, that is, a lower level block of document that’s grouped below chapters, not what Writer gives with Insert  → Section which is a completely different beast. [Yeah, Writer’s use of “section” is a clear example of bad naming, but other programs do even worst on the “misuse of common terminology” scale… just saying]

Each paragraph (style) with a given “outline level” will be picked by the TOC, but that’s not enough to get chapters numbered.

Now the confusing part: there are two ways to assign to a given paragraph style a level.

One way to assign a level to a paragraph style is what we’ve already seen: the “outline level” on the “outline & numbering” section of the paragraph style. With that way if you want the chapters to be numbered you need to also pick a numbering style there. Not recommended.

The other way, the highly recommended way, to assign a level to a paragraph style is with Tools → Chapter numbering

For any “level” you can set a numbering, pick a character style to be applied to that numbering, select “separators” (for example, to write the word “Chapter” before the number), show “sublevels” (section 3 on chapter 2 displays as “2.3”), etc.

This recommended way have its limitations, though. For example you cannot use a scheme like

1.1

1.2

2.3

etc.

because each time a higher level change, the lower level numbering get reset.

To obtain that kind of “running numbering” you need to mix both methods: for example using the “outline & numbering” section of the paragraph style for the higher level and the “chapter numbering” for the lower.

Why is the system so convoluted, you may ask. Well, Writer have a really long and complex history (its initial release was more than three decades ago) so understanding this will make this already long article impossible to read, so let’s move on, after all it’s not that difficult to master.

Just remember: nothing is perfect 😉

One more thing: NEVER mix Tools → Chapter numbering with the “Outline & numbering” on the same paragraph, both method are incompatible.

Let’s hope I did not confuse you even more, my dear reader, and that finally the numbering system on Writer results a bit clearer for you.

Pali, Far More Than Another Palatino Font

Originally developed by Hermann Zapf in 1949, Palatino  is an old style typeface that  has inspired several revivals (i.e., it was copied several times). In fact, we already discussed one of those revivals: TeX Gyre Pagella, which is based on URW Palladio, which is…

So, why another Palatino, you may ask? Because this one is gorgeous and full of OpenType tricks, that’s why!

Pali, by Bhikkhu Pesala

As you can see from the last screenshot, Pali is more “compact” than TeX Gyre Pagella, but it also has lower default line space: for a 10 pts font size, Pali has a 12 pts default line spacing instead of the more than 13 pts of Pagella.

Pali match beautifully with TeX Gyre Pagella Math, so it’s a really good font for technical documents too.

Bhikkhu Pesala have many other high quality Open Source fonts, we’ll discuss some of them on future articles.

Two new features on LibreOffice Writer 6.1

Unusual article on unusual day: side effects yesterday’s holiday! (I’m in Italy, if you wonder).

There are still a few months left for version 6.1 to be available (tomorrow is the first “bug hunt” session for alpha 1), but you can already see some of the interesting news that will come with the next “major” version of this popular Program.

Today I will talk about two changes that resolve two feature request I opened some time ago. Clearly, I can say that I am more than happy with the development of the program.

Two-line headings

This solves a request I filled less than a year ago

Bug 112384 Chapter Numbering: Allow line breaks for “separator, after” in the Chapter Numbering dialog

In a nutshell, now we have the possibility to set as separator between numbering and paragraph a line break, which gives us the capability easily set up two-line headings

A fix for navigator’s “tree view” behaviour

Fixing this took more time, more precisely seven years, but finally it’s here!

Bug 36308 [UI]Change behaviour for “tree view” on Writer’s Navigator

The problem is that with the current behaviour the “tree view” for headings on the navigator have a serious usability issue: a double click on the heading moves the cursor there, but also open/close the corresponding node, making it more difficult to return to the original point. For 6.1 this behaviour is finally corrected and the only way to open/close a node on the navigator is to use the “triangles” to the left of each node.

I’m happy! For me that’s one of the most annoying problems when using Writer.

And there is more!

For a (growing) list of changes for the upcoming version, it’s possible to check the “release notes“.

The TeX Gyre Font Family

The TeX Gyre project , developed by the GUST group (the Polish users TeX group) provides a series of fonts derived from a package originally released with Ghostscript 4.00 with an open license. The TeX Gyre fonts can be used as replacement for popular, but proprietary, fonts

If you are a Linux user or at least have a recent LATEX distribution, chances are you already have these fonts installed on your system (if you don’t, you can download the whole package from here).

The fonts are

Adventor, a sans font derived from URW Gothic L. It can be used as a replacement for ITC Avant Garde Gothic.

Bonum, a serif font derived from URW Bookman L. It can be used as a replacement for ITC Bookman.

Chorus, a decorative font derived from URW Chancery L Medium Italic. It can be used as replacement for ITC Zapf Chancery(R).

Cursor, a monospaced font derived from URW Nimbus Mono L. It can be used as a replacement for Courier.

Heros, another sans, derived from URW Nimbus Sans L. There is a condensed version, Heros CN. It can be used as a replacement for Helvetica.

Pagella, another serif font, derived from URW Palladio L. It can be used as a replacement for Palatino. There is also a “mathematical” version, Pagella Math that can be used with XƎTEX/LuaTEX to build mathematical expressions thanks to unicode-math.

Schola, another serif font, derived from URW Century Schoolbook L. It can be used as a replacement for the Century Schoolbook.

Termes, another serif font, derived from URW Nimbus Roman No9 L. It can be used as a replacement for Times (new) Roman. There is also a “mathematical” version, Termes Math that can be used with XƎTEX/LuaTEX to build mathematical expressions thanks to unicode-math.

Beside Small Caps, old numerals, and a couple of other things (fractions are limited to the unicode ones) these fonts do not offer a lot of OpenType goodies, but nevertheless they form a quite impressive family of fonts, specially thanks to the mathematical ones that give us the possibility to build rich technical documents.

Cochineal Fonts

Today’s font is a fork of Crimsom, an interesting design from Sebastian Kosch inspired by «classical» designs.

Cochineal, by Michael Sharpe

Compared with the original design, Cochineal adds more than 1500 glyphs, eliminates the semibold variant and fix several bugs.

With real small caps on all its variants, real superscripts for all the Latin alphabet (except for some vowels with diacritics) including caps, different numeral styles, a “long tailed Q” variant and more, Cochineal is a beautiful and quite complete typeface, ready to be used on elegant texts.

Michael Sharpe have many other high quality Open Source fonts. We’ll discuss some of them on future articles.

Tab Stops vs. Tables on Writer Documents

The infamous Tab key has changed its function since its introduction on old typewriters: nowadays we use it to switch between windows (in combination with Alt), to jump from one field to another, from one button to another, and of course to create annoying formatting problems.

Introduction

On most WYSIWYG (What You See is What You Get) processors, and Writer is no exception here, the “tab” key has retained in part its original function of jumping between “imaginary columns” in the text, but with the problem of being represented by a formatting character that moves with the text itself, generating confusion among many users.

Under Tools → Options → LibreOffice Writer → General we find an option to set Tab stops, by default on 1.25 cm. Many people think this means that by adding a Tab stop you’ll move the following text by that amount, but that’s not true: in reality they are called Tab stops because by using them you divide the text area on fixed columns so the character used to represent the Tab stop just moves the following text to the nearest column to the right of the insertion point.

To see this at work just Write two words with a Tab stop between them and start inserting text before the first word: now it should be clear why the text after the tab “jumps” like it does.

This mobility turns tab stops into a dangerous tool: the paragraph distribution could change dramatically by adding just a single character.

But tab stops are also a powerful formatting tool if properly used. And by “properly used” I mean “together with styles”.

But before continuing, a warning:

Please, please, PLEASE! Do NOT use tab stops for first line indents, your paragraph styles are able to deal with that (and more!) just fine. Do NOT mess the formatting by overusing Tab stops!

Thanks.

The use of styles is the biggest strength of Writer. On any paragraph style you can define as many Tab stops as you need, set their distance from the margin, how the text should align with them, etc.

But of course, if you need more than one of Tab stop to format your ideal paragraph then it’s better to think of using tables instead.

In fact, you may ask why bothering with tab stops at all if you can use tables. Well, tables in Writer have their own share of problems… but let’s try to focus on today’s topic.

I’ll explain now two methods to create a particular formatting on which a term “to be defined” is followed by “its definition”: a two column table will be the first method while the use of a tab stop combined with some strategic indents will be the second.

Look at the following screenshot

Can you see the difference between both paragraphs? No? Don’t worry, that’s OK. It just means that both methods are equally valid.

Using tables

Insert on your document a table with two columns and without borders. Set the table properties so the “spacing to contents” (right click on the table → Table properties → Borders) is zero and pick the correct column widths.

Pros

  • It’s really simply to use
  • It’s possible to use different paragraph styles on each column
  • For more paragraphs like this, just add new rows

Cons

  • With many “definitions” (many rows) it’s difficult to change their order
  • It’s not that easy to move a table on a Writer document as it’s to move simple text, so if you need to rearrange the content be ready for lots of cut, move, paste and reformat
  • Because table styles are still a complex issue on Writer (and they will be a complex issue for a long time, I’m afraid), in order to use this method several times on a document while keeping a coherent formatting you’ll need to work a bit more (copy and paste existing “definitions”, use of AutoTexts, etc.)

Using Tab Stops

On the paragraph style you’ll use for your “definitions”, under Tabs define a tab stop at, say, 3 cm. Under Indents & Spacing select an indent before text of 3 cm and a negative first line indent of also 3 cm. Finally, when you write the actual paragraph insert a tab stop between the leading text and its “definition”.

NOTE: It’s not really needed to define a tab stop because setting the space before text defines a “phantom tab stop” with the right value by itself. If you define a tab stop you’ll just override the default tab stop.

Pros

  • It’s easier to implement than a table
  • Styles make the reuse of this format more accessible
  • You can easily move the paragraph above or below the surrounding text with the keyboard shortcuts Ctrl-Alt-Up/Down arrow as you can do with any paragraph on Writer

Cons

  • The text “to be defined” and its “definition” are on the same paragraph, so you’ll need to also use character styles to differentiate the format as shown on the screenshot

Conclusion

On this article we’ve talked about tab stops on a Writer document and compared their use with tables. Both tools are powerful but non of them is perfect.

Choose your own poison 😉

Inserting arbitrary Unicode characters on XeTeX | 2

On a previous article we’ve seen how to insert an arbitrary character on a XƎTEX document by indicating its Unicode code. Today we’ll see a more “elegant” way and how to implement a character style on LyX to make things easier.

Let’s go back to the example used on the previous article: a document build upon XƎTEX that uses Libertinus Serif font where we want to introduce the happy penguin that font provides on its private use area under the code U-E000, but this time guarded by two dragons: U-E13B and U-E13C.

The instruction we need is \symbol{"XXXX}, where XXXX  represents the hexadecimal code for the character, but this time in capital letters!

On LyX we create a “local format” (I’ve already explained how to do that!) like the following one

Format 60
    InsetLayout Flex:UniCodes
    LyxType       charstyle
    LabelString   UnCod
    LatexType     command
    LatexName     unicodes
    Preamble
       \newcommand{\unicodes}[1]{\symbol{"#1}}
    EndPreamble
    ResetsFont true
End

(we are using the “local formatformat of version 2.2 here)

After validating and accepting we go to the document to type

E13B E000 E13C

then select each of the three “blocks” and with a right click → Text style we just need to apply the style UniCodes

That’s all.

Inserting arbitrary Unicode characters on XeTeX | 1

Today’s topic is how to introduce arbitrary Unicode characters on a XƎTEX document while working on LyX. There are two main ways (plus a third, LyX centric one) to accomplish such a task, today we’ll see the most “direct” one.

To get a clear example, let’s suppose we have a XƎTEX document using Libertinus Serif as main “roman” font and that we want to introduce the happy penguin that font provides on its private use area under the code U-E000.

The trick here is simple: we write four circumflex accents followed by the hexadecimal code (in lowercase!) of the character we need. Following the example we open a “TEX box” (Ctrl-L) on LyX to write

^^^^e000

and that’s it.

If we need to introduce this special character several times on the document we can create a new instruction: I’ve already explained how to do that so I’ll let the details as an exercise for the reader.

As I said at the beginning there is another way to insert special characters by their Unicode code. And no, I’m not talking about copy pasting from KCharSelect or other similar software. This other method requires a bit more typing, but it’s more “elegant” and allows us to create a character style to make the whole thing more easy.

We’ll talk about that method on the second part of this article.


Oh, you may wonder about the third form, centred on LyX that I subtly mentioned at the beginning. It’s all about “LFUNs.” Maybe one day I’ll write something about them.