Halo, Ukuran "garis horizontal" (horizontal rule) berwarna hijau akurat (Anda mungkin ingin mengaturnya menjadi sekitar 0). Sayangnya, pengaturan 'Bottom of header to top of text' tidak dapat diandalkan. Perhitungan untuk menentukannya rumit, bergantung pada font, dan saat ini salah. Saya tidak berhasil menempelkan gambar, entah mengapa, tetapi... untuk memulai, 1. atur angka (hijau) horizontal rule menjadi 0pt 2. Atur 'bottom of header to top of text' (ungu) menjadi, misalnya, setengah tinggi font. 3. Sesuaikan sehingga garis horizontal berada di atas garis aturan dengan benar. Setengah adalah baik untuk Charis, sekitar 0,2 lebih baik untuk Arial, jika saya tidak salah ingat. 4. Ingat offset-nya. 5. Atur nilai sesuai keinginan Anda, dengan menambahkan offset.Apa yang salah? Angka ungu digunakan untuk menghitung angka biru di sebelahnya, yang karena alasan historis adalah jarak dari atas halaman ke atas kotak yang berisi teks. Sayangnya, kotak itu mencakup ruang yang ditinggalkan oleh perancang font untuk aksen. Untuk Charis, 'ascent' font sekitar 1,5 kali tinggi font, tetapi untuk Arial adalah 1,2 kali. Untuk menghitung offset yang benar, antarmuka pengguna Python perlu (a) menentukan font apa yang digunakan di header, (b) membaca font tersebut untuk menentukan mana yang memiliki ascent tertinggi. Sebagai alternatif, perhitungan dalam TeX dapat dilakukan dengan cara lain, yang akan merusak proyek yang ada. Saat ini, kami menggunakan perkiraan, yang sering kali salah, tetapi sebenarnya tidak merusak apa pun...
Hi, The green "horizontal rule" measure is accurate (you probably want it to be about 0). Unfortunately the 'Bottom of header to top of text' setting is unreliable. The maths to work it out is complex, depends on the font, and currently wrong. I can't successfully past an image, for some reason, but... to start with, 1. set the (green) horizontal rule figure to 0pt 2. Set the purple 'bottom of header to top of text' to, say half the font height. 3. Adjust so the horizontal line is sitting on the rule properly. Half is good for charis, 0.2 or so is better for Arial, if I remember correctly. 4. Remember the offset. 5. Set values how you actually want them to be, adding in the offset.What's going wrong? The purple figure is used to calculate the blue figure beside it, which for historical reasons is the distance from the top of the page to the top of the box containing the text. Unfortunately, that box includes the space the font designers decided to leave for accents. For Charis, the 'ascent' of the font is about 1.5 times the font height, but for Ariel it is 1.2 times. To calculate the correct offset, The Python user interface would need to (a) work out which font(s) are in use in the header, (b) somehow read the font(s) to determine which one has the highest ascent. Alternatively, the calculation in TeX could be done in a different way, which would break existing projects. At the moment, we have a guess, which is frequently wrong, but doesn't actually break anything...
Diterjemahkan secara otomatis dari English Tampilkan asli