-1

In TexStudio I just click Edit => Insert Unicode Character to get 0x...., and after filling in with 03D8 to get 0x03D8, and compiling, I obtain archaic Greek Koppa. Similarly, 0x2289 gives me the symbol for not being a superset. How may I go about to insert Unicodes similarly in Overleaf? Lualatex is used, so the compilation ought to succeed as soon as the unicode is entered properly.

Edit - an mwe which does not compile:

\documentclass{article}
\usepackage[T1]{fontenc}


\usepackage[greek,english]{babel}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mathtools}
\begin{document}


0x03D8

0x2289


\end{document}
23
  • 1
  • 1
    "do not compile" isn't a useful error descriptions. We can't see your tex file. We don;t know which compiler you selected in overleaf and we don't know if your font has these characters. Commented Apr 29 at 22:11
  • 1
    there is a difference in editor input between overleaf and texstudio but neither has any influence over how latex processes the characters Commented Apr 29 at 22:17
  • 2
    how can we know if you need more fonts? If the document works on one system and fails on another then you will have messages in the log saying what is wrong, but if you show no input or output or log messages it's impossible to help Commented Apr 29 at 22:18
  • 1
    @FrodeAlfsonBjørdal It is rather pointless to engage in long chat conversations if you refuse to give us the information needed to solve the problem. Commented Apr 29 at 22:21

1 Answer 1

4

The example seems completely unrelated to the question in the title as the posted document would work the same way in any tex system so it would not act differently in texstudio and overleaf, however....

You could do

\documentclass{article}
% No!!! don't use 8-bit fonts with unicode engines \usepackage[T1]{fontenc}


\usepackage[greek,english]{babel}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mathtools}
\begin{document}


0x03D8 [^^^^03d8] or [Ϙ] or [\symbol{"03D8}]

0x2289 [^^^^2289] or [⊉] or [\symbol{"2289}]


\end{document}

which produces the log

Missing character: There is no Ϙ (U+03D8) in font [lmroman10-regular]:+tlig;!
Missing character: There is no Ϙ (U+03D8) in font [lmroman10-regular]:+tlig;!
Missing character: There is no Ϙ (U+03D8) in font [lmroman10-regular]:+tlig;!
Missing character: There is no ⊉ (U+2289) in font [lmroman10-regular]:+tlig;!
Missing character: There is no ⊉ (U+2289) in font [lmroman10-regular]:+tlig;!
Missing character: There is no ⊉ (U+2289) in font [lmroman10-regular]:+tlig;!

As Latin Modern doesn't have Math or Greek.

However choosing suitable fonts...

enter image description here

\documentclass{article}
% No!!! don't use 8-bit fonts with unicode engines \usepackage[T1]{fontenc}

\usepackage{unicode-math}
\setmainfont{Noto Serif}
\setmathfont{TeX Gyre Termes Math}

\usepackage[greek,english]{babel}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mathtools}
\begin{document}


0x03D8 [^^^^03d8] or [Ϙ] or [\symbol{"03D8}]

0x2289 $[^^^^2289]$ or $[⊉]$ or $[\symbol{"2289}]$


\end{document}
4
  • Many thanks! ^^^^03d8, \symbol{"03D8} are different from 0x03D8 which I discovered worked in TexStudio, and your answer is not unrelated to the question in the title - as the former codes work in Overleaf, but the latter does not. Commented Apr 30 at 0:00
  • 3
    @FrodeAlfsonBjørdal No. Writing 0x03D8 as text in any editor will just write 0x03D8 into the output, Open your "mwe" in texstudio and process it you will just get 0x03D8 . There will be no difference in behaviour whichever editor you use. Please next time provide an exampe and if getting an error provide the error message from the log. As you describe in your question you do not enter 0x03D8 into the document you opened a separate menu in the editor and entered a control code. That is obviously editor specific but unrelated to typing 0x03D8 as text Commented Apr 30 at 0:05
  • "you do not enter 0x03D8 into the document you opened a separate menu in the editor and entered a control code. That is obviously editor specific but unrelated to typing 0x03D8 as text" That is clearly right. But TexStudio did not give me any clues as to what code I would need in Overleaf, and I did not find anything which could help me by looking for information for several hours. Commented Apr 30 at 0:14
  • 1
    you could simply have copied the text you had written in texstudio which would have worked just as the text here was written in emacs (and I used ctrx-8 x 03D8 to type Ϙ) but you can copy it here or to texstudio or to overleaf. Your question implies the document that you posted produced a Ϙ if typeset from texstudio, which is simply not the case. Commented Apr 30 at 0:35

You must log in to answer this question.

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