Partial font changes in LaTeX (I want to have a partially plasticized isometric font set)

Asked 2 years ago, Updated 2 years ago, 122 views

I'm looking for a way to partially change the font with LaTeX. Specifically, I'd like to partially combine it with the Osaka regular mono that comes standard with MacOS.

Perhaps there is a way to change the font called by \textt{...}, but it has failed because I don't know the font map properly. Also, if \textt{...} allows equal width fonts to be called out, I would like you to tell me if that part is set equal width without automatic line length adjustment.

The reason why the title says "formable" is because I tried environments such as verbatim and jverbatim and found that they could be equal (equal width and alphanumeric characters should be half the width of full-width characters), but I couldn't underline them.

Note:
Symbols for transcription

LaTeX is used in research in areas where the words spoken are written as closely as possible without loss of information. It is desirable to be wide and underlined to make space meaningful. By the way, I think other researchers often use wysiwyg tools such as word or paste them into diagrams.

font latex

2022-09-30 19:38

2 Answers

The font settings on LaTeX vary greatly depending on the TeX engine used (and depending on the OS version). If you are not particularly particular about the TeX engine you use, you can easily set the font settings with LuaTeX.

Specifically, you can change the default typewriter by simply entering the font file name you want to use in <font file> of the following models (for example, Osaka).

\ documentclass {ltjsarticle}

\uspackage {fontspec}
\setmonofont {<font file>}

\begin { document }

\texttt{Hello, World!}

\end { document }

However, recent MacOS standard fonts may require you to execute the following commands on the command line in advance (depending on the macOS version).

 sudo cjk-gs-integrate --link-texmf --force

Note: http://doratex.hatenablog.jp/entry/20161202/1480665692


2022-09-30 19:38

If you want LaTeX to print the "shapable" part as if you had entered a space or new line, and you want to use font style or underscore, you can use the following alternatives to the verbatim environment (all should already be installed, so you can use them):

  • alltt package alltt environment
  • Listings Package lstlisting Environment
  • Fancyvrb Package Verbatim Environment
  • Verbatim Environment for the fvex ttra Package

Basically, the more multifunctional the ones listed below, but each has its own advantages and disadvantages and has a habit of using it, so I think the alltt environment is sufficient for the purpose.

To add to the font, TeX (maybe pTeX in Japanese) does not use the font installed in the operating system, but in principle, it uses only what is visible from TeX's system.The answer is that Osaka is not a font visible from TeX's system, so you can't use it as it is.However, if the TeX engine is different from the TeX called LuaTeX (or XeTeX), there is a relatively easy way to use the font installed in the OS, so you can use the method that wtsnjp commented on.Of course, I can't build it with a different engine just like I used to work with TeX...


2022-09-30 19:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.