btex: right/centre par alignment

This commit is contained in:
minjaesong
2024-05-09 16:51:43 +09:00
parent ef7138939d
commit 56fa7783e0
3 changed files with 7 additions and 5 deletions

Binary file not shown.

View File

@@ -1408,6 +1408,8 @@ object BTeXParser {
): List<BTeXDrawCall> {
val strat = when (align) {
"left" -> TypesettingStrategy.RAGGED_RIGHT
"right" -> TypesettingStrategy.RAGGED_LEFT
"center", "centre" -> TypesettingStrategy.CENTRED
"justify" -> TypesettingStrategy.JUSTIFIED
else -> throw IllegalArgumentException("Unknown text alignment")
}
@@ -1429,7 +1431,7 @@ object BTeXParser {
val subset = linesOut to remainder
val posYline = doc.linesPrintedOnPage[pageNum]
println("typeset par slugHeight=$slugHeight, remainder=$remainder, linesOut=$linesOut")
// println("typeset par slugHeight=$slugHeight, remainder=$remainder, linesOut=$linesOut")
val textDrawCalls = textToDrawCall(handler, posYline, slugs, subset.first, subset.second)
val objectDrawCalls = parseAndGetObjDrawCalls(textDrawCalls[0], font, handler, posYline, slugs, subset.first, subset.second)

View File

@@ -24,8 +24,8 @@ import kotlin.system.measureTimeMillis
*/
class BTeXTest : ApplicationAdapter() {
val filePath = "btex.xml"
// val filePath = "test.xml"
// val filePath = "btex.xml"
val filePath = "test.xml"
// val filePath = "literature/en/daniel_defoe_robinson_crusoe.xml"
// val filePath = "literature/ruRU/anton_chekhov_palata_no_6.xml"
// val filePath = "literature/koKR/yisang_nalgae.xml"