Various xelatex things

taxonomy

eng

 

russ

 

lith

 

opportunities

 

Tryout of taxonomy environment definition code from StackExchange, applied to various languages, using Wikipedia rubber tree classification as lipsum text:

\documentclass[12pt]{article}

\usepackage{fontspec}
\setmainfont[Scale=1.2]{Cambria}
\newfontface\fcjk[Scale=1.2]{Noto Serif CJK TC Medium}
\newfontface\fmal[Scale=1.2]{Noto Serif Malayalam}
\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentEnvironment{taxonomy}{O{1em}O{0pt}}
{
\begin{center}
\taxon_get_line:
}
{
\taxon_print:nn { #1 } { #2 }
\end{center}
}

\seq_new:N \l_taxon_item_seq
\seq_new:N \l_taxon_itemsA_seq
\seq_new:N \l_taxon_itemsB_seq
\dim_new:N \l_taxon_width_dim
\dim_new:N \l_taxon_indent_dim
\dim_new:N \l_taxon_default_indent_dim
\dim_new:N \l_taxon_corr_dim
\box_new:N \l_taxon_item_box

\cs_new_protected:Npn \taxon_get_line:
{
\peek_meaning_ignore_spaces:NF \end { \taxon_get_line:w }
}

\cs_new_protected:Npn \taxon_get_line:w #1 \\
{
\seq_set_split:Nnx \l_taxon_items_seq { ~ } { \tl_trim_spaces:n { #1 } }
\seq_pop_left:NN \l_taxon_items_seq \l_tmpa_tl
\seq_put_right:NV \l_taxon_itemsA_seq \l_tmpa_tl
\seq_put_right:Nx \l_taxon_itemsB_seq { \seq_use:Nn \l_taxon_items_seq { ~ } }
\taxon_get_line:
}

\cs_new_protected:Npn \taxon_print:nn #1 #2
{
\dim_zero:N \l_taxon_indent_dim
\dim_set:Nn \l_taxon_default_indent_dim { #1 }
\dim_set:Nn \l_taxon_corr_dim { #2 }
\seq_map_inline:Nn \l_taxon_itemsA_seq
{
\hbox_set:Nn \l_taxon_item_box { \hspace{ \l_taxon_indent_dim } ##1 }
\dim_compare:nT { \l_taxon_width_dim < \box_wd:N \l_taxon_item_box }
{
\dim_set:Nn \l_taxon_width_dim { \box_wd:N \l_taxon_item_box }
}
\dim_add:Nn \l_taxon_indent_dim { \l_taxon_default_indent_dim }
}
\dim_add:Nn \l_taxon_width_dim { \l_taxon_default_indent_dim }
\dim_zero:N \l_taxon_indent_dim
\leavevmode
\vbox:n
{
\seq_mapthread_function:NNN \l_taxon_itemsA_seq \l_taxon_itemsB_seq \taxon_print_line:nn
}
}
\cs_new_protected:Npn \taxon_print_line:nn #1 #2
{
\hbox:n
{
\hspace{ \l_taxon_indent_dim }
\makebox[\l_taxon_width_dim][l]{#1\dotfill\hspace{ -\l_taxon_corr_dim }}
\hspace{ \l_taxon_corr_dim }
#2
}
\dim_add:Nn \l_taxon_indent_dim { \l_taxon_default_indent_dim }
}

\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx }
\ExplSyntaxOff

\begin{document}

%\begin{taxonomy}
%Class Mammalia Linnaeus, 1758 \\
%Order Primates Linnaeus, 1758 \\
%Superfamily Hominoidea (Gray, 1825) \\
%Family Hominidae Gray, 1825 \\
%Genus Homo Linnaeus, 1758 \\
%Species Homo sapiens Linnaeus, 1758 \\
%\end{taxonomy}
%
%
%\begin{taxonomy}[2em][-6em]
%Class Mammalia Linnaeus, 1758 \\
%Order Primates Linnaeus, 1758 \\
%Superfamily Hominoidea (Gray, 1825) \\
%Family Hominidae Gray, 1825 \\
%Genus Homo Linnaeus, 1758 \\
%Species Homo sapiens Linnaeus, 1758 \\
%\end{taxonomy}


\section{English}
\begin{taxonomy}[1em][-5em]
Kingdom: Plantae \\
Clade: Angiosperms \\
Clade: Eudicots \\
Clade: Rosids \\
Order: Malpighiales \\
Family: Euphorbiaceae \\
Genus: Hevea \\
Species: \textit{Hevea brasiliensis} \\
\end{taxonomy}

\section{Russian}
\begin{taxonomy}[1em][-5em]
Домен: Эукариоты \\
Царство: Растения \\
Отдел: Цветковые \\
Класс: Двудольные \\
Порядок: Мальпигиецветные \\
Семейство: Молочайные \\
Род: Гевея \\
Вид: \textit{Гевея бразильская} \\
\end{taxonomy}

\section{Chinese}
\begin{taxonomy}[1em][-5em]
\fcjk{界}: \fcjk{植物界} Plantae \\
\fcjk{演化支}: \fcjk{被子植物} Angiosperms \\
\fcjk{演化支}: \fcjk{核心被子植物} Mesangiospermae \\
\fcjk{演化支}: \fcjk{真双子叶植物} Eudicots \\
\fcjk{演化支}: \fcjk{蔷薇类植物} Rosids \\
\fcjk{目}: \fcjk{金虎尾目} Malpighiales \\
\fcjk{科}: \fcjk{大戟科} Euphorbiaceae \\
\fcjk{属}: \fcjk{橡胶树属} Hevea \\
\fcjk{种}: \fcjk{橡膠樹} \textit{Hevea brasiliensis} \\
\end{taxonomy}

\section{Malayalam}
\begin{taxonomy}[1em][-5em]
\fmal{സാമ്രാജ്യം}: Plantae \\
\fmal{ഡിവിഷൻ}: Magnoliophyta \\
\fmal{ക്ലാസ്സ്‌}: Magnoliopsida \\
\fmal{നിര}: Malpighiales \\
\fmal{കുടുംബം}: Euphorbiaceae \\
\fmal{ഉപകുടുംബം}: Crotonoideae \\
Tribe: Micrandreae \\
Subtribe: Heveinae \\
\fmal{ജനുസ്സ്}: Hevea \\
\fmal{വർഗ്ഗം}: \textit{Hevea brasiliensis} \\
\end{taxonomy}

\section{French}
\begin{taxonomy}[1em][-5em]
Règne Plantae \\
Sous-règne Tracheobionta \\
Division Magnoliophyta \\
Classe Magnoliopsida \\
Sous-classe Rosidae \\
Ordre Euphorbiales \\
Famille Euphorbiaceae \\
Genre Hevea \\
{Nom binominal} 
\textit{Hevea brasiliensis} \\
\end{taxonomy}


%\section{Hebrew}
%\begin{taxonomy}[1em][-5em]
%ממלכה: צומח
%מערכה: בעלי פרחים
%מחלקה: דו-פסיגיים
%סדרה: מלפיגאים
%משפחה: חלבלוביים
%סוג: Hevea
%מין: הוואה ברזילאית
%\end{taxonomy}

\section{Gaelic}
\begin{taxonomy}[1em][-5em]
Ríocht: Plantae \\
Ord: Malpighiales \\
Fine: Euphorbiaceae \\
Fofhine: Crotonoideae \\
Géineas: Hevea \\
Speiceas: \textit{Hevea brasiliensis} \\
\end{taxonomy}

\section{Czech}
\begin{taxonomy}[1em][-5em]
Říše rostliny (Plantae) \\
Podříše cévnaté rostliny (Tracheobionta) \\
Oddělení krytosemenné (Magnoliophyta) \\
Třída vyšší dvouděložné (Rosopsida) \\
Řád malpígiotvaré (Malpighiales) \\
Čeleď pryšcovité (Euphorbiaceae) \\
Rod kaučukovník (Hevea) \\
{Binomické jméno}
\textit{Hevea brasiliensis} \\
\end{taxonomy}


\section{Lithuanian}
\begin{taxonomy}[1em][-5em]
Karalystė: Augalai \\
Skyrius: Magnolijūnai \\
Klasė: Magnolijainiai \\
Poklasis: Dilenijažiedžiai \\
Šeima: Karpažoliniai \\
Gentis: Kaučiukmedis \\
Rūšis: Brazilinis kaučiukmedis \\
\end{taxonomy}

\section{Hungarian}
\begin{taxonomy}[1em][-5em]
Ország: Növények (Plantae) \\
Törzs: Zárvatermők (Magnoliophyta) \\
Csoport: Valódi kétszikűek (eudicots) \\
Csoport: Rosidae \\
Csoport: Eurosids \\ 
Rend: Malpighiales \\
Család: Kutyatejfélék (Euphorbiaceae) \\
Alcsalád: Crotonoideae \\
Nemzetség-csoport: Micrandreae \\
Nemzetség: Hevea \\
Faj: \textit{Hevea brasiliensis} \\
\end{taxonomy}


\section{Paper}
\begin{taxonomy}[1em][-5em]
Newspaper: \textit{The Sydney Morning Herald} \\
Date: Saturday, 28 July 2018 \\
Liftout: Spectrum\\
Page: 15 \\
Section: The Planner \\ 
Column: Film \\
{Film name}: \textbf{The Equalizer 2} \\
Reviewer: Jake Wilson \\
\end{taxonomy}
\textsc{Quote}: ``as an actor he's a master of his domain'' \\
\textsc{Quote}: ``opportunities to watch the character think''

\end{document}

 

fontweights

Raleway: normal fonts, and small caps :

raleway

The core definition is:

\setmainfont{Raleway}[
Extension=.otf,
UprightFont=*-Regular,
ItalicFont=*-Regular-Italic,
BoldFont=*-Bold,
BoldItalicFont=*-Bold-Italic,
FontFace={xl}{n}{*-ExtraLight},
FontFace={xl}{it}{*-ExtraLight-Italic},
FontFace={l}{n}{*-Light},
FontFace={l}{it}{*-Light-Italic},
FontFace={mb}{n}{*-Medium},
FontFace={mb}{it}{*-Medium-Italic},
FontFace={k}{n}{*-Black},
FontFace={k}{it}{*-Black-Italic},
]

Small caps are already defined in the font itself (for this font, anyway), since they are activated with only a \scshape.


Pinpoint specifications for the various weights allow, after removing the * basename, some variation:

dfferentweights

 

which in turn leads to (with the idea that people can be recognised by how they speak):

conversations

Good for doing the typeset version of the voices for Goldilocks and the Three Bears.

Some middle-sized narrative voice, hobbit-sized, is necessary, to provide the matrix against which the others are displayed.

 

The code:

\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{xcolor}

\newfontface\verd[Scale=0.8]{Verdana}

\setromanfont{Georgia}[
FontFace={ul}{n}{Font=Lapidaria},
FontFace={el}{n}{Font=Leafy glade,Scale=1.5},
FontFace={l}{n}{Font=League Script Thin},
% FontFace={rr}{n}{Font=* Regular}, 
FontFace={med}{n}{Font=Linglese},
FontFace={sb}{n}{Font=Leipzig Fraktur ,Scale=1.5,Color=blue},
FontFace={b}{n}{Font=Libertinus Keyboard}, 
FontFace={eb}{n}{Font=LightUnciale},
FontFace={xb}{n}{Font=Line Dings (BRK)},
FontFace={lp}{n}{Font=Lydia Puente),Scale=2.5},
]

\DeclareRobustCommand{\ulseries}{\fontseries{ul}\selectfont}
\DeclareRobustCommand{\elseries}{\fontseries{el}\selectfont}
\DeclareRobustCommand{\lseries}{\fontseries{l}\selectfont}
%\DeclareRobustCommand{\rrseries}{\fontseries{rr}\selectfont}
\DeclareRobustCommand{\medseries}{\fontseries{med}\selectfont}
\DeclareRobustCommand{\sbseries}{\fontseries{sb}\selectfont}
\DeclareRobustCommand{\bseries}{\fontseries{b}\selectfont}
\DeclareRobustCommand{\ebseries}{\fontseries{eb}\selectfont}
\DeclareRobustCommand{\xbseries}{\fontseries{xb}\selectfont}
\DeclareRobustCommand{\lpseries}{\fontseries{lp}\selectfont}

\DeclareTextFontCommand{\textul}{\ulseries}
\DeclareTextFontCommand{\textel}{\elseries}
\DeclareTextFontCommand{\textl}{\lseries}
%\DeclareTextFontCommand{\textrr}{\rrseries}
\DeclareTextFontCommand{\textmed}{\medseries}
\DeclareTextFontCommand{\textsb}{\sbseries}
\DeclareTextFontCommand{\textb}{\bseries}
\DeclareTextFontCommand{\texteb}{\ebseries}
\DeclareTextFontCommand{\textxb}{\xbseries}
\DeclareTextFontCommand{\textlp}{\lpseries}


\newcommand\new[1]{\textul{#1}}
\newcommand\elf[1]{\textel{#1}}
\newcommand\nerd[1]{\textb{#1}}
\newcommand\elegant[1]{\textsb{#1}}
\newcommand\browncow[1]{\textlp{#1}}
\newcommand\lecturer[1]{\texteb{#1}}

\begin{document}

%\fontname\mseries
\section{Georgia and Co}

\ \par
\rmfamily
%\itshape
%\scshape
\indent{\verd Lapidaria:} \textul{Abc Thin} {\ulseries Thin}
%

{\verd Leafy Glade:} \textel{Abc ExtraLight} {\elseries ExtraLight}

{\verd Georgia:} Abc Regular

{\verd Linglese:} \textmed{Abc Medium} {\medseries Medium}

{\verd Leipzig Fraktur:} \textsb{Abc SemiBold} {\sbseries SemiBold}

{\verd Georgia bold:} \textbf{Abc Bold} {\bfseries Bold}

{\verd Libertinus Keyboard:} \textb{Abc Bold} {\bseries Bold}

{\verd LightUnciale:} \texteb{Abc ExtraBold} {\ebseries ExtraBold}

{\verd Line Dings (BRK):} \textxb{Abc Black} {\xbseries Black}

{\verd Lydia Puente:} \textlp{How now} {\lpseries Brown Cow}

\section{Introductions}
\ \par
`\new{Hi. I'm new here. My name's Milady,}' said Milady.

`\nerd{I am George},' said George. `\nerd{I like computers.}'

`\elf{Firiel. Nice to meet you},' said Firiel. `\elf{This is my first day in the city}.'

`\elegant{And my name is Veronica. I'm from the Moon,}' said Veronica.

`Here comes Professor Browncow,' said Jack.

\browncow{Good morning everyone Shall we go in now} said Professor Browncow, bringing out the keys.

\lecturer{Todays\ \ topic\ \ is\ \ all\ \ about\ \ Quantum\ \ Mechanics ...} the lecturer was saying as they moved to their seats. `\elegant{Great},' murmured Veronica.

\end{document}

 


Google’s Noto fonts collection is expanding: various weight of Noto Serifs are now there, e.g. (random letters):

 

notoweights

The code:

\documentclass[12pt]{article}
\usepackage{fontspec}

\newcommand\tfont{Noto Serif Sinhala}

\newfontface\verd[Scale=0.8]{Verdana}
\setmainfont[Scale=2]{\tfont}[
% Extension=.ttf,
UprightFont=*,
% ItalicFont=*-Regular-Italic,
BoldFont=*-Bold,
% BoldItalicFont=*-Bold-Italic,
%SmallCapsFont={[PlayfairDisplaySC-Regular.otf]},
%SmallCapsFeatures={Letters=SmallCaps},
FontFace={xl}{n}{*-ExtraLight},
% FontFace={xl}{it}{*-ExtraLight-Italic},
FontFace={l}{n}{*-Light},
% FontFace={l}{it}{*-Light-Italic},
FontFace={mb}{n}{*-Medium},
% FontFace={mb}{it}{*-Medium-Italic},
FontFace={k}{n}{*-Black},
% FontFace={k}{it}{*-Black-Italic},
]

\begin{document}

\newcommand{\test}[2]{%
{\verd{#1}:} {\fontseries{#2}\selectfont අඕ ඥිසෑ ශැචුඵ බභමඩ }\par
}

{\verd \tfont}

\test{ExtraLight}{xl}
\test{Light}{l}
\test{Regular}{m}
\test{Medium}{mb}
\test{Bold}{bx}
\test{Black}{k}


%\scshape
%\test{ExtraLight}{xl}
%\test{Light}{l}
%\test{Regular}{m}
%\test{Medium}{mb}
%\test{Bold}{bx}
%\test{Black}{k}

\end{document}
Advertisements

Precedents

precedents

 

Having a 2012:320-style reference is a bit twee in the case of well-known works; \citetitle does the trick, plus a customised pinpoint reference format defined using the classics package.

 

Since a biblatex bib file is a database, and biblatex allows the definition and creation of new datamodels and associated formatting, new styles for any structured data can be created, e,g, for star names, for amateur astronomers and science fiction writers

starnames

 

or for artworks, for non-physicists and science fiction writers:

 

artwork

 

The code for the bibart entry and formatting:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@bibart{monalisa,
artist = {Leonardo da Vinci},
title = {Mona Lisa},
origtitle = {La Gioconda},
year = {c1503},
provenance = {The Louvre},
origprov = {Musée du Louvre},
city = {Paris},
medium = {oil on wood (Lombardy poplar)},
dimensions = {77 x 53 cm},
type = {painting}
%type painting 
%style Renaissance
%school
%movement
%specimenname
%specimen
%description %e.g, Roman copy of Greek original
}

\end{filecontents*}
\begin{filecontents}{bibart.dbx}
\DeclareDatamodelEntrytypes{bibart}
\DeclareDatamodelFields[type=field, datatype=literal]{
title,
origtitle,
year,
} 
\DeclareDatamodelFields[type=list, datatype=name]{
artist,
}


\DeclareDatamodelFields[type=field, datatype=verbatim]{
provenance,
city,
medium,
dimensions,
style,
}
\DeclareDatamodelEntryfields[bibart]{
artist,
title,
origtitle,
year,
provenance,
city,
medium,
dimensions,
style,
}
\end{filecontents}

\documentclass[english,12pt]{article}
\usepackage{xcolor}
\usepackage{fontspec}

\newfontface\frff[Scale=4,Colour=blue]{Rough Fleurons Free}
\newfontface\fri[Scale=4,Colour=darkgreen]{Royal Initialen}

\usepackage{babel}
\usepackage{csquotes}
\usepackage[datamodel=bibart, backend=biber]{biblatex}
%\usepackage{hyperref}
\addbibresource{\jobname.bib}

\begin{filecontents*}{english-bibart.lbx}
\ProvidesFile{english-bibart.lbx}[2018/07/19 english with additions for artworks]
\InheritBibliographyExtras{english}
\NewBibliographyString{by, mass, luminosity, answered, edited}
\DeclareBibliographyStrings{%
inherit = {english},
mass = {{mass}{mass}},
by = {{by}{by}},
luminosity = {{luminosity}{luminosity}},
answered = {{answered}{answered}},
edited = {{edited}{edited}},
}
\end{filecontents*}
\DeclareLanguageMapping{english}{english-bibart}

\DeclareFieldFormat[bibart]{name}{#1}

\DeclareFieldFormat[bibart]{title}{\mkbibemph{#1}}

\DeclareFieldFormat[bibart]{origtitle}{\mkbibemph{#1}}

\DeclareFieldFormat[bibart]{year}{%
\mkbibbold{#1}}

\DeclareFieldFormat[bibart]{provenance}{%
#1}
\DeclareFieldFormat[bibart]{city}{%
#1}
\DeclareFieldFormat[bibart]{medium}{%
#1}
\DeclareFieldFormat[bibart]{dimensions}{%
#1}
\DeclareFieldFormat[bibart]{style}{%
\textsc{#1}}


\newbibmacro*{artist}{%
\printnames{artist}%
\setunit{\addcomma\addspace}%
}

\newbibmacro*{artworkname}{%
\printfield{title}%
\setunit{\addcomma\addspace}%
\printfield{year}%
}

\newbibmacro{provenance}{%
% \setunit{\addspace}%
\printfield{provenance}%
\setunit{\addcomma\addspace}
\printfield{city}%
\setunit{\addcomma\addspace}
}% end bibmacro

\newbibmacro{medium}{%
\printfield{medium}%
\setunit{\addcomma\addspace}%
\printfield{dimensions}%
% \setunit{\addcolon\addspace}
}% end bibmacro

\DeclareBibliographyDriver{bibart}{%
\usebibmacro{artworkname}%
\setunit{\addcomma\addspace}%
\bibstring{by}
\setunit{\addspace}%
\usebibmacro{artist}%
\setunit{\addspace -- \addspace}%
\usebibmacro{medium}%
\setunit{\addcolon\addspace}% 
\usebibmacro{provenance}%
\usebibmacro{finentry}}

\usepackage{changepage}

\usepackage{fontspec}
\setmainfont{Cambria}


\usepackage{graphicx}

\begin{document}
\listoffigures
%\nocite{*}
When Leonardo did his famous work\cite{monalisa}, the \citetitle{monalisa}, the whole world was amazed.

The fullcite, \fullcite{monalisa}, as for a caption.


\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{picturefilename.jpg}
\begin{adjustwidth}{3cm}{3cm}\caption[{\frff R} Mona Lisa]{\fullcite{monalisa}}
\end{adjustwidth}
\end{figure}

\printbibliography
\end{document}