Compare commits

...

4 Commits

Author SHA1 Message Date
Juergen Spitzmueller
8d724b23a6 Better fix for Spanish Tufte problem
The option "nohyper" causes the issue
2024-09-22 17:16:54 +02:00
Juergen Spitzmueller
4df40706b4 Revert "Work around fragility problem in Spanish Tufte Handout"
This reverts commit 8298454577.
2024-09-22 17:15:46 +02:00
Juergen Spitzmueller
8298454577 Work around fragility problem in Spanish Tufte Handout
It is unclear what the actual problem is; it only shows up in this
document (not the other l7ns)
2024-09-22 11:50:40 +02:00
Kornel Benko
3add2204d4 Cmake tests: Amend 6e05409d
Use with a slightly better thought out selection of possible exports to tex-source.
2024-09-22 11:40:28 +02:00
4 changed files with 63 additions and 31 deletions

View File

@ -230,19 +230,11 @@ if (extension MATCHES "\\.lyx$")
message(STATUS "Executing ${PERL_EXECUTABLE} ${readDefaultOutputFormat} ${LYX_SOURCE}")
execute_process(
COMMAND ${PERL_EXECUTABLE} ${readDefaultOutputFormat} "${LYX_SOURCE}"
OUTPUT_VARIABLE _export_format)
message(STATUS "readDefaultOutputFormat = ${_export_format}")
if (${_export_format} MATCHES "pdf2")
set(_texformat "pdflatex")
elseif(${_export_format} MATCHES "pdf3")
# Ideally we would set to "platex" if Japanese, and "latex" if not Japanese.
# For example, currently we invert export/examples/Articles/Chess/Game_1_lyx because
# it should be exported to "latex" instead of "platex".
set(_texformat "platex")
elseif(${_export_format} MATCHES "pdf4")
set(_texformat "xetex")
elseif(${_export_format} MATCHES "pdf5")
set(_texformat "luatex")
OUTPUT_VARIABLE _formats)
message(STATUS "readDefaultOutputFormat = ${_formats}")
if (${_formats} MATCHES "^([a-z]+)/(pdf[2345]?)$")
set(_texformat ${CMAKE_MATCH_1})
set(_export_format ${CMAKE_MATCH_2})
else()
set(_texformat "empty")
endif()

View File

@ -57,10 +57,6 @@ export/export/lyx2lyx/lyx_2_3_test2_lyx(16|20)
# clear it is worth the time to try to fix the issue.
export/doc/ja/UserGuide_lyx(16|20)
export/examples/ja/Modules/LilyPond_Book_lyx(16|20)
# in export.cmake, if output format is pdf3, we try to export to "platex" which
# makes sense for all other tests except this one (which should be exported to
# "latex" instead).
export/examples/Articles/Chess/Game_1_lyx.*
# nonstandard tests failing for unknown reason:
export/templates/Articles/R_Journal_(dvi3|pdf[45])_systemF

View File

@ -6,7 +6,7 @@ use strict;
my $useNonTexFonts = undef;
my $outputFormat = undef;
my $outputFormat = undef;
my $texFormat = undef;
my $language = undef;
if (-e "$ARGV[0]") {
if (open(FI, "$ARGV[0]")) {
@ -24,34 +24,75 @@ if (-e "$ARGV[0]") {
last if (defined($useNonTexFonts) && defined($outputFormat) && defined($language));
}
close(FI);
if (defined($ARGV[1])) {
print "outputformat = \"$outputFormat\"\n";
print "useNonTexFonts = \"$useNonTexFonts\"\n";
print "language = \"$language\"\n";
}
}
}
if (defined($useNonTexFonts) && defined($outputFormat)) {
if ($language eq "japanese") {
if ($useNonTexFonts) {
if ($outputFormat eq "default") {
if ($language eq "japanese") {
$outputFormat = "pdf4";
if ($outputFormat =~ /^(default|pdf4)$/) {
$outputFormat = "pdf4";
$texFormat = "xetex";
}
elsif ($outputFormat =~ /^pdf[35]?$/) {
if ($outputFormat =~ /^pdf3?$/) {
$texFormat = "platex";
}
else {
$outputFormat = "pdf5";
$texFormat = "luatex";
}
}
else {
$outputFormat = undef;
}
}
elsif ($outputFormat eq "default") {
if ($language eq "japanese") {
else { # using tex font
if ($outputFormat =~ /^(default|pdf3)$/) {
$outputFormat = "pdf3";
$texFormat = "platex";
}
elsif ($outputFormat =~ /^pdf5$/) {
$texFormat = "luatex";
}
else {
$outputFormat = "pdf2";
$outputFormat = undef;
}
}
if ($outputFormat !~ /^pdf/) {
$outputFormat = undef;
}
else { # not a japanese language
if ($useNonTexFonts) {
if ($outputFormat =~ /^(default|pdf4)$/) {
$texFormat = "xetex";
}
elsif ($outputFormat eq "pdf5") {
$texFormat = "luatex";
}
else {
$outputFormat = undef;
}
}
else { # using tex fonts
if ($outputFormat =~ /^(default|pdf2)$/) {
$outputFormat = "pdf2";
$texFormat = "pdflatex";
}
elsif ($outputFormat eq "pdf5") {
$texFormat = "luatex";
}
elsif ($outputFormat eq "pdf3") {
$texFormat = "latex";
}
else {
$outputFormat = undef;
}
}
}
if (defined($outputFormat)) {
print "$outputFormat";
print "$texFormat/$outputFormat";
}
else {
print "undefined_output_format";

View File

@ -5,7 +5,7 @@
\save_transient_properties true
\origin /systemlyxdir/examples/es/Handouts/
\textclass tufte-handout
\use_default_options true
\use_default_options false
\maintain_unincluded_children no
\language spanish
\language_package default
@ -30,6 +30,8 @@
\output_sync 0
\bibtex_command bibtex
\index_command default
\float_placement class
\float_alignment class
\paperfontsize default
\spacing single
\use_hyperref false
@ -45,7 +47,7 @@
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine natbib
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
@ -54,6 +56,7 @@
\suppress_date false
\justification true
\use_refstyle 0
\use_formatted_ref 0
\use_minted 0
\use_lineno 0
\index Índice