First of all be warned, that it is not recommended to use such special chars in your math source code, as they are very hard to distinguish from each other. For example look at ğ
(\breve{g}
) and ǧ
(\check{g}
) or ı
(dottless i U+0131) and ι
(\iota
).
If you still need it, the way to go these days is to use either xetex
or luatex
for compilation and the unicode-math
package. In this example, my math font does not contain a native character ğ
, so I also have to declare it with \newunicodechar
:
\documentclass{article}
\usepackage{fontspec,unicode-math}
\setmainfont[Mapping=tex-text]{STIXGeneral}
\setmathfont{XITS Math}
\usepackage{newunicodechar}
\newunicodechar{ğ}{\ifmmode\breve{g}\else ğ\fi}
\begin{document}
Text-mode: ğ,ı and math-mode: $ğ,ı$.
\end{document}
If you want to use citations, you also have to define the CSL-style (Citation Style Language) to be used, via a *.csl
-file you have to reference.
Here is an MWE in Markdown. It tests a few different methods to provide references to citations in Markdown:
# Markdown source code for relevant part of this page
``` {.markdown}
i. [@nonexistent]
i. @nonexistent
i. @z1 says fooo.
i. @z1 [p. 30] says baaar.
i. @z1 [p. 30, with suffix] says blahblah.
i. @z1 [-@z2 p. 30; see also @z3] says blah-blubb.
i. In a footnote.[^1]
i. A citation group [see @z1 p. 34-35; also @z3 chap. 3].
i. Another one [see @z1 p. 34-35].
i. And still another, in a footnote.[^2]
i. Quote with a *suffix* and a *locator* [@z1 pp. 33, 35-37, and nothing else].
i. Quote with only one locator [@z1 and nowhere else].
i. Now a few *modifiers*[^3]...
i. With some extra Markup [*siehe* @z1 p. **32**].
i. Jane Doz doesnt like me [***siehe*** **@z4**].
[^1]: A citation without locators [@z3].
[^2]: Multiple citations [siehe @z2 chap. 3; @z3; @z1].
[^3]: ...like a quote without author: [-@z1]. And now OStR Oster with a locator [-@z2 p. 44].
$x^2 + y^2 = 1$ @z1
```
# Document output of Markdown code
i. [@nonexistent]
i. @nonexistent
i. @z1 says fooo.
i. @z1 [p. 30] says baaar.
i. @z1 [p. 30, with suffix] says blahblah.
i. @z1 [-@z2 p. 30; see also @z3] says blah-blubb.
i. In a footnote.[^1]
i. A citation group [see @z1 p. 34-35; also @z3 chap. 3].
i. Another one [see @z1 p. 34-35].
i. And still anoter, in a footnote.[^2]
i. Quote with a *suffix* and a *locator* [@z1 pp. 33, 35-37, and nothing else].
i. Quote with only one locator [@z1 and nowhere else].
i. Now a few *modifiers*[^3]...
i. With some extra Markup [*see also* @z1 p. **32**].
i. Jane Doz doesnt like me [***see*** **@z4**].
[^1]: A citation without locators [@z3].
[^2]: Multiple citations [siehe @z2 chap. 3; @z3; @z1].
[^3]: ...like a quote without author: [-@z1]. And now OStR Oster with a locator [-@z2 p. 44].
$x^2 + y^2 = 1$ @z1
# Bibliography
You convert this Markdown with f.e. the following Pandoc command:
pandoc -V geometry="paperwidth=18cm, paperheight=34cm, margin=0.3cm" \
-V language=de-DE -V lang=ngerman \
--highlight-style=espresso --filter=pandoc-citeproc \
--biblio=my-biblio.bib --csl=stuttgart-media-university.csl \
-o stuttgart-media-university---csl.pdf mwe.md
As you can see from the command, it references three files:
- The Markdown source,
mwe.md
.
- An additional file defining the CSL-style to be used,
stuttgart-media-university.csl
. (I downloaded it from the core repository, of citationstyles.org on GitHub.)
The third one, my-biblio.bib
, which holds my citation references. Its content is here:
@Book{z1,
author="Thales von Milet",
title="Doppelwinkel-Funktionen",
url="http://de.wikipedia.org/wiki/Formelsammlung_Trigonometrie#Doppelwinkelfunktionen",
year="600 v.Chr.",
address="Milet, Kleinasien",
publisher="Wikipedia"
}
@Article{z2,
author="OStR Dr. math.nat. Oster",
title="Unterrichtsmaterialen für Klasse 9 (Mittelstufe)",
year="1969",
journal="Journal of Generic Studies",
volume="9",
pages="33-34"
}
@InCollection{z3,
author="Elvis Presley, Madonna and Pink Floyd",
title="Kombinatorik Hypergeometrischer Verteilungen",
booktitle="Wiederholungslose Auswahlprobleme",
editor="Cleopatra, Königin von Ägypten",
publisher="Steintafeln Moses GmbH & Co. KG",
address="Gizeh",
year="30 v.Chr."
}
@Article{z4,
author="Jane Doz",
title="Why All Men Suck",
year="2006",
journal="Journal of Gender Studies",
volume="6",
pages="33-34"
}
Here is a screenshot of the resulting PDF page:
Looking closely at that page, you can see how exactly each occurrence of Markdown source citational references translate into the final page layout.
Be aware, that the final page layout is heavily influenced by the specific CSL style file you use! Apply a different CSL, and the page content will look different (specifically: the spots with the references, the footnotes and the "Bibliography" section are all influenced by the CSL).
My recently created GitHub repo for testing CSL style files contains even more detailed instructions about this topic.
Best Answer
It doesn't make a lot of difference to latex.
Essentially if you are using pdflatex the unicode character will expand to the classic ascii markup, and if you are using lulatex or xelatex the classic ascii markup will expand to the unicode character, so either way they end up being the same.
Of course not all commands in latex expand to Unicode characters but you can look at the list in
tex/latex/base/tuenc.def
which shows around 500 commands for accents and composites that are defined by default, for example:\c{c}
ends up asç
with lualatex because ofConversely not all of unicode is mapped to commands in pdflatex, but most of the common European accents are, and you can add more as needed.
ç
expands to\c{c}
in pdflatex because of the definition inutf8enc.dfu