Cosmetics

This commit is contained in:
Kornel Benko 2024-10-15 10:46:41 +02:00
parent b7402aecfb
commit 7abdcb613d

View File

@ -3,11 +3,12 @@
# #
use strict; use strict;
use warnings "all";
my $useNonTexFonts = undef; my $useNonTexFonts = undef;
my $outputFormat = undef; my $outputFormat = undef;
my $texFormat = undef; my $texFormat = undef;
my $language = undef; my $language = undef;
if (-e "$ARGV[0]") { if (-e "$ARGV[0]") {
if (open(FI, "$ARGV[0]")) { if (open(FI, "$ARGV[0]")) {
while (my $l = <FI>) { while (my $l = <FI>) {
@ -35,7 +36,7 @@ if ($language eq "japanese") {
if ($useNonTexFonts) { if ($useNonTexFonts) {
if ($outputFormat =~ /^(default|pdf4)$/) { if ($outputFormat =~ /^(default|pdf4)$/) {
$outputFormat = "pdf4"; $outputFormat = "pdf4";
$texFormat = "xetex"; $texFormat = "xetex";
} }
elsif ($outputFormat =~ /^pdf[35]?$/) { elsif ($outputFormat =~ /^pdf[35]?$/) {
if ($outputFormat =~ /^pdf3?$/) { if ($outputFormat =~ /^pdf3?$/) {
@ -49,10 +50,10 @@ if ($language eq "japanese") {
$outputFormat = undef; $outputFormat = undef;
} }
} }
else { # using tex font else { # using tex font
if ($outputFormat =~ /^(default|pdf3)$/) { if ($outputFormat =~ /^(default|pdf3)$/) {
$outputFormat = "pdf3"; $outputFormat = "pdf3";
$texFormat = "platex"; $texFormat = "platex";
} }
elsif ($outputFormat =~ /^pdf5$/) { elsif ($outputFormat =~ /^pdf5$/) {
$texFormat = "luatex"; $texFormat = "luatex";
@ -62,11 +63,11 @@ if ($language eq "japanese") {
} }
} }
} }
else { # not a japanese language else { # not a japanese language
if ($useNonTexFonts) { if ($useNonTexFonts) {
if ($outputFormat =~ /^(default|pdf4)$/) { if ($outputFormat =~ /^(default|pdf4)$/) {
$outputFormat = "pdf4"; $outputFormat = "pdf4";
$texFormat = "xetex"; $texFormat = "xetex";
} }
elsif ($outputFormat eq "pdf5") { elsif ($outputFormat eq "pdf5") {
$texFormat = "luatex"; $texFormat = "luatex";
@ -75,10 +76,10 @@ else { # not a japanese language
$outputFormat = undef; $outputFormat = undef;
} }
} }
else { # using tex fonts else { # using tex fonts
if ($outputFormat =~ /^(default|pdf2)$/) { if ($outputFormat =~ /^(default|pdf2)$/) {
$outputFormat = "pdf2"; $outputFormat = "pdf2";
$texFormat = "pdflatex"; $texFormat = "pdflatex";
} }
elsif ($outputFormat eq "pdf5") { elsif ($outputFormat eq "pdf5") {
$texFormat = "luatex"; $texFormat = "luatex";