0

I am trying to make a minitoc, but the whole document is in an unusual font (specifically This one if it matters). I have managed to get everything else right, but the entries of the \minitoc are in the wrong font, as shown in an example below, except the page numbers themselves, which are correct.

exmaple of minitoc produced

I have tried the font commands listed in the documentation, as \renewcommand{\mtcfont}{\Fontskrivan}. With a bunch of trial and error, I have managed to get the page numbers in the right font, but not the actual entries.

MWE:

\documentclass[12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{aurical}
\usepackage[left=1in,right=1in,top=1in,bottom=1.5in,bindingoffset=0in, footskip=1in]{geometry}
\usepackage{titletoc,tocloft}
\usepackage{titlesec}
\usepackage{minitoc}

\setlength{\cftchapindent}{1cm}
\renewcommand\numberline[1]{}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{0}
%
\titleformat{\chapter}[display]{\bfseries}{}{0pt}{\fontsize{50}{55}\selectfont}
\titleformat{\section}[display]{\bfseries}{}{0pt}{\Large}
\dominitoc% Initialization
\renewcommand{\mtcSfont}{\Fontskrivan}

\renewcommand\cftchapfont{\large\bfseries}
\renewcommand\cftchappagefont{\large\bfseries}
\renewcommand\cftpartfont{\LARGE\bfseries}
\renewcommand\cftpartpagefont{\LARGE\bfseries}

\renewcommand{\contentsname}{\fontsize{50}{55}\selectfont\Fontskrivan Table of Contents}
\mtcsettitle{minitoc}{}
\begin{document}
\Fontskrivan
\tableofcontents

\chapter{Tester}
\minitoc
\newpage
\section{Stuff}

\newpage
\section{Stuff 2}

\newpage
\chapter{Terster 2}
\end{document}
1
  • The log shows that some sizes (e.g., 50) are not available, and size substitutions are being done; and also that sometimes scaling is being done; plus sometimes default font substitution is being done.
    – Cicada
    Commented Jul 10, 2021 at 13:26

1 Answer 1

0

Amended answer:

Luckily, JanaSkrivana font has .tfm files defined. And a reverse slant.

So, using fontspec, we can set up all the faces, with "regular" slant occupying the italics command, and the reverse slant sitting in the slant command (say):

\usepackage{fontspec}
\setmainfont[
    UprightFont = * ,
    BoldFont = *Bold ,
    ItalicFont = *Slant ,
    BoldItalicFont = *BoldSlant ,
    SlantedFont = *Rslant ,
    BoldSlantedFont = *BoldRslant , 
]{JanaSkrivana}

JanaSkrivana sample

MWE

\documentclass[12pt]{book}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage{aurical}
\usepackage[table]{xcolor}
\usepackage{fontspec}
\setmainfont[
    UprightFont = * ,
    BoldFont = *Bold ,
    ItalicFont = *Slant ,
    BoldItalicFont = *BoldSlant ,
    SlantedFont = *Rslant ,
    BoldSlantedFont = *BoldRslant , 
]{JanaSkrivana}

%%\newfontfamily\fontjs{JanaSkrivana}
\usepackage[left=1in,right=1in,top=1in,bottom=1.5in,bindingoffset=0in, footskip=1in]{geometry}
\usepackage{titletoc,tocloft}
\usepackage{titlesec}
\usepackage{minitoc}

\setlength{\cftchapindent}{1cm}
\renewcommand\numberline[1]{}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{0}
%
\titleformat{\chapter}[display]{\bfseries}{}{0pt}{\Huge}
\titleformat{\section}[display]{\bfseries}{}{0pt}{\Large}
\dominitoc% Initialization
%\renewcommand{\mtcSfont}{\fontjs}

\renewcommand\cftchapfont{\large\bfseries}
\renewcommand\cftchappagefont{\large\bfseries}
\renewcommand\cftpartfont{\LARGE\bfseries}
\renewcommand\cftpartpagefont{\LARGE\bfseries}


\renewcommand{\contentsname}{\fontsize{50}{55}\selectfont Table of Contents}

\mtcsettitle{minitoc}{}
\newcommand\testtext{{\large abc qwerty}}

\begin{document}
upright text \textbf{bold face weight} \textit{italic shape} \textbf{\textit{bold italic}}

\begin{tabular}{llll}
\hline
\rowcolor{blue!12}
Font & Command & Result & Comment \\
upright & 
-- & 
\testtext &
regular\\
bold & 
textbf & 
\textbf{\testtext}  &
bold\\
slanted & 
textit & 
\textit{\testtext}  &
slanted further\\
boldslanted & 
textbf, textit & 
\textbf{\textit{\testtext}}  &
slanted further, bold\\
rslanted & 
textsl & 
\textsl{\testtext}  &
slanted other way\\
boldrslanted & 
textbf, textsl & 
\textbf{\textsl{\testtext}}  &
slanted other way, bold\\
\hline
\end{tabular}

\tableofcontents

\chapter{Tester}
\minitoc
\testtext
\newpage
\section{Stuff\fontname\font}

\newpage
\section{Stuff 2}

\newpage
\chapter{Terster 2}
\end{document}

Original answer

Not an answer because not entirely clear on what you want (e.g., the large font size in the header).

If I use fontspec, set the main font to JanaSkivana, and compile with lualatex, everything is in that font, \fontskrivan is not needed (nor the aurical package, etc), nor the mtc renewcommand, and so on.

JanaSkrivana

I put a \fontname\font in to check the font being used.

MWE

\documentclass[12pt]{book}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage{aurical}
\usepackage{fontspec}
\setmainfont{JanaSkrivana}
\newfontfamily\fontjs{JanaSkrivana}
\usepackage[left=1in,right=1in,top=1in,bottom=1.5in,bindingoffset=0in, footskip=1in]{geometry}
\usepackage{titletoc,tocloft}
\usepackage{titlesec}
\usepackage{minitoc}

\setlength{\cftchapindent}{1cm}
\renewcommand\numberline[1]{}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{0}
%
\titleformat{\chapter}[display]{\bfseries}{}{0pt}{\Huge}
\titleformat{\section}[display]{\bfseries}{}{0pt}{\Large}
\dominitoc% Initialization
%\renewcommand{\mtcSfont}{\fontjs}

\renewcommand\cftchapfont{\large\bfseries}
\renewcommand\cftchappagefont{\large\bfseries}
\renewcommand\cftpartfont{\LARGE\bfseries}
\renewcommand\cftpartpagefont{\LARGE\bfseries}


\renewcommand{\contentsname}{\fontsize{50}{55}\selectfont Table of Contents}

\mtcsettitle{minitoc}{}
\begin{document}

\tableofcontents

\chapter{Tester}
\minitoc
\newpage
\section{Stuff\fontname\font}

\newpage
\section{Stuff 2}

\newpage
\chapter{Terster 2}
\end{document}
4
  • Sorry I wasn't clear, I wanted the sizes I had, but all in the same font. This seems to do it, so I am good with it. Commented Jul 10, 2021 at 16:46
  • I was doing proofreading, and noticed that this method doesn't allow for bolding or italicising (in either \textbf or \bfseries version), even though the forms exist in the documentation for the font. I didn't include body text because I didn't think it would be relevant, but it is, at least in the bolding part Commented Jul 10, 2021 at 19:54
  • Do you want a fontspec solution, or a legacy font solution? (or both?) The sizes will still be substituted, though, depending on combinations of things. Note also: JanaSkrivana has regular, bold, slanted, boldslanted; no italic (fair enough for a handwriting font - see the doc). I'll try fontspec first.
    – Cicada
    Commented Jul 11, 2021 at 4:28
  • See amended answer. fontspec allows options at the typeface level (and even more low-level granularity if needed (e.g., for specific size ranges, or if smallcaps were involved, etc)).
    – Cicada
    Commented Jul 11, 2021 at 5:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .