Text FormattingHow to make a new command for ligature?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
giby
Posts: 11
Joined: Mon Oct 04, 2010 5:46 pm

How to make a new command for ligature?

Post by giby »

Hello,

In a text (My PhD thesis) I'd like to insert quotations, with a specific font with ligatures "st" and "ct".
If I insert the command:

Code: Select all

\usepackage[oldstyle]{kpfonts}

I get the font I'd like.... but in the whole document....

how to use it only in the sentences I want?

I tried \newcommand, but I haven't found how it should be written to make it work.... (I should be too stupid to find it by myself)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: How to make a new command for ligature?

Post by frabjous »

Are you using kpfonts in the remainder of the thesis (only without the fancy ligatures), or a completely different font altogether?
giby
Posts: 11
Joined: Mon Oct 04, 2010 5:46 pm

Re: How to make a new command for ligature?

Post by giby »

I (have to) use an other font... (Actually I haven't found the official style, but I will have to respect it)

I just wanna have an old style with ligature for quotation from "literature"... to make a differance between a sentence for "the little prince" or some poetic verse, to explain biological result....
and I don't use xetex ...
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How to make a new command for ligature?

Post by frabjous »

Try using {\fontfamily{jkpos}\selectfont Text you want in KeplerFonts-old-style here}. E.g., here's an example of having body text in Times with a KP-old-style quotation:

Code: Select all

\documentclass[12pt,letterpaper]{article}
\usepackage[letterpaper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}

\usepackage[T1]{fontenc}
\usepackage{txfonts}

\begin{document}

    Here is some normal text for comparison.

    \begin{quote}
    {\fontfamily{jkpos}\selectfont J'ai ainsi vécu seul, sans personne avec qui parler véritablement, jusqu'à une panne dans le désert du Sahara, il y a six ans. Quelque chose s'était cassé dans mon moteur, Et comme je n'avais avec moi ni méchanicien, ni passagers, je me préparai à essayer de réussir, tout seul, une réparation difficile. C'était pour moi une question de vie ou de mort. J'avais à peine de l'eau à boire pour huit jours.}
\end{quote}

And here is some more normal text.
\end{document}
Result:
kp.png
kp.png (16.97 KiB) Viewed 3509 times
That's not a very robust solution and may involve some further tricks if things get more complicated.
Post Reply