1

This is somewhat of a repost, but all the help I got did not really help. I am using Linux Libertine in LaTeX as my font in my thesis and I love every character except for the italic uppercase J. However, the uppercase J in mathmode is nice and I would like to replace the italic J with the mathmode J throughout the whole document. Is this possible? MWE:

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{libertine} 
\usepackage[libertine]{newtxmath}

\begin{document}
    
I do not like the italic \textit{J}, I want $J$ for that.
    
\end{document}

Output:

MWE compiled

I know that mathmode J is produced by the newtxmath package, whereas the italic J is provided by the libertine package itself. I found several examples on how to redefine mathmode characters using \DeclareMathSymbol, but I only want to change textmode italic uppercase J to be the $J$.

Thank you in advance.

9
  • Have you considered defining a macro for this using \newcommand? That would be a much simpler approach (at least, as far as I know, and I looked into similar stuff for my own thesis). However, that is best for stand-along things and may not do what you need if you sometimes have an italic uppercase J in part of a word. Apr 1, 2022 at 9:08
  • How would I do this exactly using \newcommand? Also, this mainly concerns my Bibliography, in which many scientific Journals get abbreviated, e.g. J. Chem. Edu. The Bibliography is generated by natbib from a .bib file.
    – keyuu
    Apr 1, 2022 at 9:17
  • You would put something like this\newcommand{\J}{$J$} into your preamble, then use it like this: \J. The bibliography wrinkle may make it more difficult, but you could try replacing the J in journal names with it. Note: if you want to use it as a stand-alone character (so there is a space after it), you will have to do \J{}. Otherwise the following space just gets consumed. Apr 1, 2022 at 9:36
  • This sounds like it's worth a try, although it would include replacing every J in my .bib file with \J. Maybe there is a more elegant way...? Anyway, thank you for your suggestion!
    – keyuu
    Apr 1, 2022 at 9:46
  • Regular expressions? But that requires knowing how to use them, and also depends on where you're writing the document. If you do try it, just test it on one, or a few references before replacing all of them. Apr 1, 2022 at 9:53

0

You must log in to answer this question.

Browse other questions tagged .