Umlauts dalam LaTeX - bagaimana ia berfungsi
Anda tidak boleh menaip umlauts dalam LaTeX semudah anda dengan cepat dapat melihat ketika menulis teks Jerman. Petua praktikal ini menunjukkan kepada anda bagaimana umlaut masih dipaparkan seperti penyusunan semula.
Gunakan umlaut secara tidak langsung di LaTeX
Jika anda memasukkan umlaut secara tidak langsung di LaTeX, anda boleh mengedit dokumen anda dengan mudah pada sistem operasi yang berbeza. Anda tidak memerlukan pakej untuk ini. Kecil "ö" sentiasa terbentuk dalam teks ini. Anda boleh membentuk umlaut lain secara analog. Sebagai contoh, untuk modal "Ä", ganti "o" dengan "A".
- Anda membentuk "ö" secara tidak langsung dengan \ "o (backslash, tanda petikan, o).
- Masukkan varian sebelumnya dalam pendakap kerinting jika tidak berfungsi: {\ "o}.
- Jika anda telah memasukkan pakej "jerman" atau pakej "ngerman", anda juga boleh membentuk ö kecil dengan "o (tanda petikan o).
Sertakan umlauts dalam inputenc pakej dalam LaTeX
Jika anda memasukkan inputenc pakej, anda boleh memasukkan umlaut secara langsung dalam dokumen anda dan tidak perlu menulis semula dengan kod. Oleh kerana sistem operasi yang berlainan menggunakan pengekodan yang berlainan, anda memerlukan arahan LaTeX yang berbeza di sini, yang anda salin di depan \ begin {document} anda.
- Di Windows, anda biasanya menggunakan pengekodan "ansinew". Kod yang sepadan ialah: \ usepackage [ansinew] {inputenc}.
- Pengekodan "latin1" Linux biasanya digunakan. Kod yang perlu anda pasangkan sebelum \ begin {document} ialah: \ usepackage [latin1] {inputenc}.
- Pengekodan "AppleMac" harus digunakan pada Mac anda. Anda mesti salin kod \ usepackage [applemac] {inputenc} sebelum \ begin {document}.
- Jika pengekodan masing-masing tidak berfungsi atau jika anda mahu menggunakan dokumen LaTeX anda pada sistem yang berbeza, anda harus mencuba UTF-8. Anda mengintegrasikan pengekodan ini dengan kod \ usepackage [utf8] {inputenc}. Walau bagaimanapun, pastikan dokumen LaTeX anda benar-benar dikodkan dalam UTF-8.
Umlaut dalam persekitaran matematik
Anda juga harus menghadapi masalah dengan umlaut dalam persekitaran matematik LaTeX. Walau bagaimanapun, dengan helah ringkas, ini juga boleh dihapuskan dari dunia.
- Dengan perintah \ textrm {dikehendaki teks} umlauts dalam persekitaran matematik tetap tidak lagi menjadi kebimbangan.
- Gunakan pakej "amsmath", letakkan teks yang dikehendaki di antara kurungan kerinting perintah \ text {text yang dikehendaki}.
Di kawasan muat turun kami, anda akan menemui Texmaker, editor LaTeX pepejal. Dalam petua praktikal lain, kami akan menunjukkan kepada anda cara menggunakan LaTeX untuk mencipta pelbagai jenis tanda petikan.