Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6951cc9b4 |
||
|
|
2dffbb8df2 | ||
|
|
9cdf2358e1 | ||
|
|
1a1862d632 | ||
|
|
30e70d5bc9 | ||
|
|
6c598b75ed | ||
|
|
82c0713a3c | ||
|
|
b65bc097ea |
4 changed files with 513 additions and 2 deletions
18
texdef-perl-option-5.40.x.patch
Normal file
18
texdef-perl-option-5.40.x.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff -up texmf-dist/scripts/texdef/texdef.pl.orig texmf-dist/scripts/texdef/texdef.pl
|
||||
--- texmf-dist/scripts/texdef/texdef.pl.orig 2025-07-18 14:43:22.865503978 +0200
|
||||
+++ texmf-dist/scripts/texdef/texdef.pl 2025-07-18 14:46:49.871203706 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env perl
|
||||
+texmf-dist/scripts/texdef/texdef.pl#!/usr/bin/env perl
|
||||
################################################################################
|
||||
# texdef -- Show definitions of TeX commands
|
||||
# Copyright (c) 2011-2020 Martin Scharrer <martin@scharrer-online.de>
|
||||
@@ -222,7 +222,7 @@ sub envcode {
|
||||
}
|
||||
|
||||
## Define and process options
|
||||
-Getopt::Long::Configure ("bundling");
|
||||
+Getopt::Long::Configure ("bundling","no_ignore_case");
|
||||
GetOptions (
|
||||
'value|v!' => \$SHOWVALUE,
|
||||
'Environment|E!' => \$ISENVIRONMENT,
|
||||
197
texlive-2023-gcc15-ftbfs.patch
Normal file
197
texlive-2023-gcc15-ftbfs.patch
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
diff -up texlive-base-20230311/source/texk/web2c/luatexdir/tex/textoken.c.me texlive-base-20230311/source/texk/web2c/luatexdir/tex/textoken.c
|
||||
--- texlive-base-20230311/source/texk/web2c/luatexdir/tex/textoken.c.me 2025-01-23 16:20:29.845574328 +0100
|
||||
+++ texlive-base-20230311/source/texk/web2c/luatexdir/tex/textoken.c 2025-01-23 16:23:32.896925830 +0100
|
||||
@@ -2665,7 +2665,7 @@ static int do_feedback_pdf(halfword c)
|
||||
halfword save_def_ref;
|
||||
halfword save_warning_index;
|
||||
/*tex temp boolean */
|
||||
- boolean bool;
|
||||
+ boolean bool1;
|
||||
/*tex first temp string */
|
||||
str_number s;
|
||||
/*tex for use with |set_ff| */
|
||||
@@ -2738,7 +2738,7 @@ static int do_feedback_pdf(halfword c)
|
||||
print_int(pdf_get_obj(static_pdf, obj_type_page, cur_val, false));
|
||||
pop_selector;
|
||||
} else if (scan_keyword("colorstackinit")) {
|
||||
- bool = scan_keyword("page");
|
||||
+ bool1 = scan_keyword("page");
|
||||
if (scan_keyword("direct"))
|
||||
cur_val = direct_always;
|
||||
else if (scan_keyword("page"))
|
||||
@@ -2762,7 +2762,7 @@ static int do_feedback_pdf(halfword c)
|
||||
warning_index = save_warning_index;
|
||||
scanner_status = save_scanner_status;
|
||||
str = makecstring(s);
|
||||
- cur_val = newcolorstack(str, cur_val, bool);
|
||||
+ cur_val = newcolorstack(str, cur_val, bool1);
|
||||
free(str);
|
||||
flush_str(s);
|
||||
cur_val_level = int_val_level;
|
||||
@@ -2801,7 +2801,7 @@ void conv_toks(void)
|
||||
halfword save_def_ref;
|
||||
halfword save_warning_index;
|
||||
/*tex temp boolean */
|
||||
- boolean bool;
|
||||
+ boolean bool1;
|
||||
/*tex first temp string */
|
||||
str_number s;
|
||||
/*tex lua chunk name */
|
||||
@@ -2991,11 +2991,11 @@ void conv_toks(void)
|
||||
save_def_ref = def_ref;
|
||||
save_warning_index = warning_index;
|
||||
scan_toks(false, true);
|
||||
- bool = in_lua_escape;
|
||||
+ bool1 = in_lua_escape;
|
||||
in_lua_escape = true;
|
||||
escstr.s = (unsigned char *) tokenlist_to_cstring(def_ref, false, &l);
|
||||
escstr.l = (unsigned) l;
|
||||
- in_lua_escape = bool;
|
||||
+ in_lua_escape = bool1;
|
||||
delete_token_ref(def_ref);
|
||||
def_ref = save_def_ref;
|
||||
warning_index = save_warning_index;
|
||||
diff -up texlive-base-20230311/source/texk/web2c/luatexdir/unilib/ustring.c.me texlive-base-20230311/source/texk/web2c/luatexdir/unilib/ustring.c
|
||||
--- texlive-base-20230311/source/texk/web2c/luatexdir/unilib/ustring.c.me 2025-01-23 16:45:23.164475899 +0100
|
||||
+++ texlive-base-20230311/source/texk/web2c/luatexdir/unilib/ustring.c 2025-01-23 16:47:08.044935510 +0100
|
||||
@@ -396,7 +396,7 @@ double u_strtod(const unichar_t *str, un
|
||||
char buf[60], *pt, *ret;
|
||||
const unichar_t *upt;
|
||||
double val;
|
||||
- extern double strtod(); /* Please don't delete this, not all of us have good ansi headers */
|
||||
+ //extern double strtod(); /* Please don't delete this, not all of us have good ansi headers */
|
||||
|
||||
for ( upt=str, pt=buf; *upt<128 && *upt!='\0' && pt-buf<sizeof(buf)-1; )
|
||||
*pt++ = *upt++;
|
||||
@@ -415,7 +415,7 @@ long u_strtol(const unichar_t *str, unic
|
||||
char buf[60], *pt, *ret;
|
||||
const unichar_t *upt;
|
||||
long val;
|
||||
- extern long strtol(); /* Please don't delete this, not all of us have good ansi headers */
|
||||
+ //extern long strtol(); /* Please don't delete this, not all of us have good ansi headers */
|
||||
|
||||
for ( upt=str, pt=buf; *upt<128 && *upt!='\0' && pt<buf+sizeof(buf)-1; )
|
||||
*pt++ = *upt++;
|
||||
diff -up texlive-base-20230311/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil2.c.me texlive-base-20230311/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil2.c
|
||||
--- texlive-base-20230311/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil2.c.me 2025-01-23 16:53:43.457157308 +0100
|
||||
+++ texlive-base-20230311/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil2.c 2025-01-23 16:54:31.649278311 +0100
|
||||
@@ -2049,7 +2049,7 @@ SplineSet *SplineSetReverse(SplineSet *s
|
||||
Spline *spline, *first, *next;
|
||||
BasePoint tp;
|
||||
SplinePoint *temp;
|
||||
- int bool;
|
||||
+ int bool1;
|
||||
/* reverse the splineset so that what was the start point becomes the end */
|
||||
/* and vice versa. This entails reversing every individual spline, and */
|
||||
/* each point */
|
||||
@@ -2062,12 +2062,12 @@ return( spl ); /* Only one point, reve
|
||||
tp = spline->from->nextcp;
|
||||
spline->from->nextcp = spline->from->prevcp;
|
||||
spline->from->prevcp = tp;
|
||||
- bool = spline->from->nonextcp;
|
||||
+ bool1 = spline->from->nonextcp;
|
||||
spline->from->nonextcp = spline->from->noprevcp;
|
||||
- spline->from->noprevcp = bool;
|
||||
- bool = spline->from->nextcpdef;
|
||||
+ spline->from->noprevcp = bool1;
|
||||
+ bool1 = spline->from->nextcpdef;
|
||||
spline->from->nextcpdef = spline->from->prevcpdef;
|
||||
- spline->from->prevcpdef = bool;
|
||||
+ spline->from->prevcpdef = bool1;
|
||||
|
||||
for ( ; spline!=NULL && spline!=first; spline=next ) {
|
||||
next = spline->to->next;
|
||||
@@ -2076,12 +2076,12 @@ return( spl ); /* Only one point, reve
|
||||
tp = spline->to->nextcp;
|
||||
spline->to->nextcp = spline->to->prevcp;
|
||||
spline->to->prevcp = tp;
|
||||
- bool = spline->to->nonextcp;
|
||||
+ bool1 = spline->to->nonextcp;
|
||||
spline->to->nonextcp = spline->to->noprevcp;
|
||||
- spline->to->noprevcp = bool;
|
||||
- bool = spline->to->nextcpdef;
|
||||
+ spline->to->noprevcp = bool1;
|
||||
+ bool1 = spline->to->nextcpdef;
|
||||
spline->to->nextcpdef = spline->to->prevcpdef;
|
||||
- spline->to->prevcpdef = bool;
|
||||
+ spline->to->prevcpdef = bool1;
|
||||
}
|
||||
|
||||
temp = spline->to;
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/output.h.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/output.h
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/output.h.me 2025-01-23 17:53:11.940292061 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/libs/woff2/include/woff2/output.h 2025-01-23 18:00:25.679229974 +0100
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace woff2 {
|
||||
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp.me 2025-01-23 18:00:29.791326309 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp 2025-01-23 18:01:29.795726026 +0100
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef CHARACTER_HPP
|
||||
#define CHARACTER_HPP
|
||||
|
||||
+#include <cstdint>
|
||||
|
||||
class Character {
|
||||
public:
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp.me 2025-01-23 18:01:42.194015062 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp 2025-01-23 18:02:08.019619304 +0100
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef EPSFILE_HPP
|
||||
#define EPSFILE_HPP
|
||||
|
||||
+#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <istream>
|
||||
#include <string>
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp.me 2025-01-23 18:02:39.822363424 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp 2025-01-23 18:02:46.917529433 +0100
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef FONTMETRICS_HPP
|
||||
#define FONTMETRICS_HPP
|
||||
|
||||
+#include <cstdint>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp.me 2025-01-23 18:03:21.502336489 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp 2025-01-23 18:03:28.253494025 +0100
|
||||
@@ -18,6 +18,7 @@
|
||||
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
|
||||
*************************************************************************/
|
||||
|
||||
+#include <cstdint>
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp.me 2025-01-23 18:04:33.647023179 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp 2025-01-23 18:04:40.919193442 +0100
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef HASHFUNCTION_HPP
|
||||
#define HASHFUNCTION_HPP
|
||||
|
||||
+#include <cstdint>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
diff -up texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp.me texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp
|
||||
--- texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp.me 2025-01-23 17:54:42.338405708 +0100
|
||||
+++ texlive-base-20230311/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp 2025-01-23 17:58:32.140551634 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace math {
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
Name: %{shortname}-base
|
||||
Version: %{source_date}
|
||||
Release: 86%{?dist}
|
||||
Release: 94%{?dist}
|
||||
Epoch: 11
|
||||
Summary: TeX formatting system
|
||||
# The only files in the base package are directories, cache, and license texts
|
||||
|
|
@ -523,9 +523,18 @@ Patch45: texlive-fedora-texmfcnf.lua.patch
|
|||
# Fix interpreter on perl scripts (thanks again to Debian)
|
||||
Patch46: texlive-base-20230311-fix-scripts.patch
|
||||
|
||||
# Fix bundling option with perl-5.40.x
|
||||
Patch47: texdef-perl-option-5.40.x.patch
|
||||
|
||||
# fix build error with gcc-14
|
||||
Patch48: texlive-base-20230311-typefixes.patch
|
||||
|
||||
# fix buid error with gcc-15
|
||||
Patch49: texlive-2023-gcc15-ftbfs.patch
|
||||
|
||||
# fix errors with python-3.1x
|
||||
Patch50: texlive-pythontex3-python-3.1x.patch
|
||||
|
||||
# Can't do this because it causes everything else to be noarch
|
||||
# BuildArch: noarch
|
||||
BuildRequires: make
|
||||
|
|
@ -8294,6 +8303,7 @@ done
|
|||
|
||||
%patch -P44 -p1 -b .pdf-header-order-fix
|
||||
%patch -P48 -p1 -b .gcc-14-typefixes
|
||||
%patch -P49 -p1 -b .gcc-15-ftbfs
|
||||
|
||||
# Disable broken tests
|
||||
# updmap-cmdline-test.pl is not useful and it will fail because it finds the system perl bits instead of the local copy
|
||||
|
|
@ -8352,7 +8362,8 @@ latex dummy.tex
|
|||
rm -f dummy.*
|
||||
%endif
|
||||
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Werror=format-security"
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118112
|
||||
export CFLAGS="$RPM_OPT_FLAGS -std=gnu17 -fno-strict-aliasing -Werror=format-security"
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Werror=format-security"
|
||||
%else
|
||||
|
|
@ -8513,6 +8524,12 @@ patch -p1 < %{_sourcedir}/texlive-fedora-texmfcnf.lua.patch
|
|||
# Fix interpreter on perl scripts
|
||||
patch -p1 < %{_sourcedir}/texlive-base-20230311-fix-scripts.patch
|
||||
|
||||
# Fix bundling option with perl-5.40.x
|
||||
patch -p1 < %{_sourcedir}/texdef-perl-option-5.40.x.patch
|
||||
|
||||
# Fix errors with python3.13
|
||||
patch -p1 < %{_sourcedir}/texlive-pythontex3-python-3.1x.patch
|
||||
|
||||
popd
|
||||
|
||||
# config files in /etc symlinked
|
||||
|
|
@ -11105,6 +11122,30 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || :
|
|||
%doc %{_texdir}/texmf-dist/doc/latex/yplan/
|
||||
|
||||
%changelog
|
||||
* Wed Nov 26 2025 Björn Esser <besser82@fedoraproject.org> - 11:20230311-94
|
||||
- Rebuild(xpdf)
|
||||
|
||||
* Wed Aug 06 2025 František Zatloukal <fzatlouk@redhat.com> - 11:20230311-93
|
||||
- Rebuilt for icu 77.1
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 11:20230311-92
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jul 19 2025 Than Ngo <than@redhat.com> - 11:20230311-91
|
||||
- Fix rhbz#2379729 - texlive-pythontex is not compatible with python3.13
|
||||
|
||||
* Fri Jul 18 2025 Than Ngo <than@redhat.com> - 11:20230311-90
|
||||
- Fix rhbz#2354991 - bundling option for perl-5.40.x
|
||||
|
||||
* Thu Jan 23 2025 Than Ngo <than@redhat.com> - 11:20230311-89
|
||||
- Fix rhbz#2341430, FTBFS with gcc15
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 11:20230311-88
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sun Dec 08 2024 Pete Walter <pwalter@fedoraproject.org> - 11:20230311-87
|
||||
- Rebuild for ICU 76
|
||||
|
||||
* Thu Aug 01 2024 Than Ngo <than@redhat.com> - 20230311-86
|
||||
- fix license tag
|
||||
|
||||
|
|
|
|||
255
texlive-pythontex3-python-3.1x.patch
Normal file
255
texlive-pythontex3-python-3.1x.patch
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
diff -up texmf-dist/scripts/pythontex/depythontex3.py.orig texmf-dist/scripts/pythontex/depythontex3.py
|
||||
--- texmf-dist/scripts/pythontex/depythontex3.py.orig 2025-07-15 15:33:41.682593752 +0200
|
||||
+++ texmf-dist/scripts/pythontex/depythontex3.py 2025-07-15 15:41:16.346789065 +0200
|
||||
@@ -121,7 +121,7 @@ def replace_code_cmd(name, arglist, line
|
||||
|
||||
Usually, code from a command is also typeset with a command. This
|
||||
function primarily deals with that case. In cases where code from a
|
||||
- command is typeset with an environment (for example, `\inputpygments`),
|
||||
+ command is typeset with an environment (for example, `\\inputpygments`),
|
||||
this function performs some preprocessing and then uses
|
||||
replace_code_env() to do the real work. This approach prevents the two
|
||||
functions from unnecessarily duplicating each other, while still giving
|
||||
@@ -161,7 +161,7 @@ def replace_code_cmd(name, arglist, line
|
||||
# Make sure the introduction of an environment where a command was
|
||||
# previously won't produce errors with following content; make sure
|
||||
# that any following content is on a separate line
|
||||
- if bool(match('[ \t]*\S', after)):
|
||||
+ if bool(match(r'[ \t]*\S', after)):
|
||||
after = '\n' + after
|
||||
# Rather than duplicating much of replace_code_env(), just use it
|
||||
return replace_code_env(name, arglist, linenum, code_replacement,
|
||||
@@ -333,7 +333,7 @@ def replace_print_cmd(name, arglist, lin
|
||||
break
|
||||
print_replacement = r'\verb' + delim + print_replacement + delim
|
||||
elif print_replacement_mode == 'verbatim':
|
||||
- if bool(match('\s*?\n', after)):
|
||||
+ if bool(match(r'\s*?\n', after)):
|
||||
# Usually, we would end the verbatim environment with a newline.
|
||||
# This is fine if there is content in `after` before the next
|
||||
# newline---in fact, it's desirable, because the verbatim package
|
||||
@@ -405,11 +405,11 @@ def replace_print_cmd(name, arglist, lin
|
||||
# the `\input` content.
|
||||
print_replacement = print_replacement.rstrip(' \t\n')
|
||||
after = sub(r'^\\unskip\s+', '', after)
|
||||
- elif bool(match('\S', after)):
|
||||
+ elif bool(match(r'\S', after)):
|
||||
# If the next character is not whitespace, we can just leave
|
||||
# the `\n`, and it will yield a space.
|
||||
pass
|
||||
- elif bool(match('\s*$', after)):
|
||||
+ elif bool(match(r'\s*$', after)):
|
||||
# If the rest of the current line, and the next line, are
|
||||
# whitespace, we will get the correct spacing without needing
|
||||
# `\space{}`. We could leave `\n`, but it would be
|
||||
@@ -421,14 +421,14 @@ def replace_print_cmd(name, arglist, lin
|
||||
# it's at the end of an environment, and thus is needed to
|
||||
# protect the following content
|
||||
print_replacement += '\\space{}'
|
||||
- after = sub('^\s+', '', after)
|
||||
+ after = sub(r'^\s+', '', after)
|
||||
forced_double_space_list.append((name, linenum))
|
||||
else:
|
||||
- if bool(match('\s+\S', after)):
|
||||
+ if bool(match(r'\s+\S', after)):
|
||||
# If the following line starts with whitespace, replace it
|
||||
# with a newline, to protect in the event that the printed
|
||||
# content ended with an end-of-environment command
|
||||
- after = sub('^\s+', '\n', after)
|
||||
+ after = sub(r'^\s+', '\n', after)
|
||||
# Issue warnings, if warranted
|
||||
# Warn about `\endinput`
|
||||
if (r'\endinput' in print_replacement and
|
||||
@@ -505,7 +505,7 @@ def replace_print_env(name, arglist, lin
|
||||
|
||||
#### The inlineverb and verb modes should work, but haven't been tested
|
||||
since there are currently no environments that use them; they are only
|
||||
- used by `\printpythontex`, which is a command.
|
||||
+ used by `\\printpythontex`, which is a command.
|
||||
'''
|
||||
if print_replacement_mode == 'verb':
|
||||
if print_replacement.count('\n') > 1:
|
||||
@@ -519,17 +519,17 @@ def replace_print_env(name, arglist, lin
|
||||
if delim not in print_replacement:
|
||||
break
|
||||
print_replacement = r'\verb' + delim + print_replacement + delim
|
||||
- if not bool(match('[ \t]+\S', after)):
|
||||
+ if not bool(match(r'[ \t]+\S', after)):
|
||||
# If there is text on the same line as the end of the
|
||||
# environment, we're fine (this is unusual). Otherwise,
|
||||
# we need to toss the newline at the end of the environment
|
||||
# and gobble leading spaces. Leading spaces need to be
|
||||
# gobbled because previously they were at the beginning of a
|
||||
# line, where they would have been discarded.
|
||||
- if not bool(match('\s*$', after)):
|
||||
- after = sub('^\s*?\n\s*', '', after)
|
||||
+ if not bool(match(r'\s*$', after)):
|
||||
+ after = sub(r'^\s*?\n\s*', '', after)
|
||||
elif print_replacement_mode == 'verbatim':
|
||||
- if bool(match('\s*?\n', after)):
|
||||
+ if bool(match(r'\s*?\n', after)):
|
||||
# Usually, we would end the verbatim environment with a newline.
|
||||
# This is fine if there is content in `after` before the next
|
||||
# newline---in fact, it's desirable, because the verbatim package
|
||||
@@ -570,15 +570,15 @@ def replace_print_env(name, arglist, lin
|
||||
# printed content. Later, we issue a warning in case it appears
|
||||
# anywhere else.
|
||||
print_replacement = print_replacement.rsplit(r'\endinput', 1)[0]
|
||||
- if not bool(match('[ \t]+\S', after)):
|
||||
+ if not bool(match(r'[ \t]+\S', after)):
|
||||
# If there is text on the same line as the end of the
|
||||
# environment, we're fine (this is unusual). Otherwise,
|
||||
# we need to toss the newline at the end of the environment
|
||||
# and gobble leading spaces. Leading spaces need to be
|
||||
# gobbled because previously they were at the beginning of a
|
||||
# line, where they would have been discarded.
|
||||
- if not bool(match('\s*$', after)):
|
||||
- after = sub('^\s*?\n\s*', '', after)
|
||||
+ if not bool(match(r'\s*$', after)):
|
||||
+ after = sub(r'^\s*?\n\s*', '', after)
|
||||
elif (print_replacement.endswith('%\n') and
|
||||
not print_replacement.endswith('\\%\n') and
|
||||
not print_replacement.endswith('\\string%\n')):
|
||||
@@ -590,15 +590,15 @@ def replace_print_env(name, arglist, lin
|
||||
# warning if there is reason to think that a percent character
|
||||
# was active in the last line.
|
||||
print_replacement = print_replacement.rsplit(r'%', 1)[0]
|
||||
- if not bool(match('[ \t]+\S', after)):
|
||||
+ if not bool(match(r'[ \t]+\S', after)):
|
||||
# If there is text on the same line as the end of the
|
||||
# environment, we're fine (this is unusual). Otherwise,
|
||||
# we need to toss the newline at the end of the environment
|
||||
# and gobble leading spaces. Leading spaces need to be
|
||||
# gobbled because previously they were at the beginning of a
|
||||
# line, where they would have been discarded.
|
||||
- if not bool(match('\s*$', after)):
|
||||
- after = sub('^\s*?\n\s*', '', after)
|
||||
+ if not bool(match(r'\s*$', after)):
|
||||
+ after = sub(r'^\s*?\n\s*', '', after)
|
||||
else:
|
||||
# By default, LaTeX strips newlines and adds a space at the end
|
||||
# of each line of content that is brought in by `\input`. This
|
||||
@@ -611,13 +611,13 @@ def replace_print_env(name, arglist, lin
|
||||
# `\unskip`
|
||||
print_replacement = print_replacement.rstrip(' \t\n')
|
||||
after = sub(r'^\s*\\unskip\s+', '', after)
|
||||
- elif bool(match('[ \t]+\S', after)):
|
||||
+ elif bool(match(r'[ \t]+\S', after)):
|
||||
# If the next character after the end of the environment is
|
||||
# not whitespace (usually not allowed), we can just leave
|
||||
# the `\n` in printed content, and it will yield a space.
|
||||
# So we need do nothing. But if there is text on that line
|
||||
# we need `\space{}`.
|
||||
- after = sub('^\s+', '\\space', after)
|
||||
+ after = sub(r'^\s+', '\\space', after)
|
||||
forced_double_space_list.append((name, linenum))
|
||||
else:
|
||||
# If the line at the end of the environment is blank,
|
||||
@@ -1080,7 +1080,7 @@ for n, depytxline in enumerate(depytx):
|
||||
else:
|
||||
if obeylines:
|
||||
# Take into account possible whitespace before arg
|
||||
- if bool(match('[ \t]*\[', after)):
|
||||
+ if bool(match(r'[ \t]*\[', after)):
|
||||
after = after.split('[', 1)[1]
|
||||
while ']' not in after:
|
||||
texlinenum += 1
|
||||
@@ -1094,11 +1094,11 @@ for n, depytxline in enumerate(depytx):
|
||||
after = sub('^[ \t]*', '', after)
|
||||
else:
|
||||
# Allow peeking ahead a line for the argument
|
||||
- if bool(match('\s*$', after)) and after.count('\n') < 2:
|
||||
+ if bool(match(r'\s*$', after)) and after.count('\n') < 2:
|
||||
texlinenum += 1
|
||||
after += tex[texlinenum]
|
||||
# Take into account possible whitespace before arg
|
||||
- if bool(match('\s*\[', after)):
|
||||
+ if bool(match(r'\s*\[', after)):
|
||||
after = after.split('[', 1)[1]
|
||||
while ']' not in after:
|
||||
texlinenum += 1
|
||||
@@ -1108,11 +1108,11 @@ for n, depytxline in enumerate(depytx):
|
||||
optarg = None
|
||||
# Account for eating whitespace afterward, if arg not found
|
||||
if argindex == len(depy_args) - 1:
|
||||
- if bool(match('\s*$', after)) and after.count('\n') < 2:
|
||||
+ if bool(match(r'\s*$', after)) and after.count('\n') < 2:
|
||||
texlinenum += 1
|
||||
after += tex[texlinenum]
|
||||
- if not bool(match('\s*$', after)):
|
||||
- after = sub('^\s*', '', after)
|
||||
+ if not bool(match(r'\s*$', after)):
|
||||
+ after = sub(r'^\s*', '', after)
|
||||
arglist.append(optarg)
|
||||
elif arg == 'm':
|
||||
# Account for possible line breaks or spaces before arg
|
||||
@@ -1121,7 +1121,7 @@ for n, depytxline in enumerate(depytx):
|
||||
else:
|
||||
if obeylines:
|
||||
# Account for possible leading whitespace
|
||||
- if bool(match('[ \t\f\v]*\{', after)):
|
||||
+ if bool(match(r'[ \t\f\v]*\{', after)):
|
||||
after = after.split('{', 1)[1]
|
||||
else:
|
||||
print('* DePythonTeX error:')
|
||||
@@ -1129,10 +1129,10 @@ for n, depytxline in enumerate(depytx):
|
||||
sys.exit(1)
|
||||
else:
|
||||
# Peek ahead a line if needed
|
||||
- if bool(match('\s*$', after)) and after.count('\n') < 2:
|
||||
+ if bool(match(r'\s*$', after)) and after.count('\n') < 2:
|
||||
texlinenum += 1
|
||||
after += tex[texlinenum]
|
||||
- if bool(match('\s*\{', after)):
|
||||
+ if bool(match(r'\s*\{', after)):
|
||||
after = after.split('{', 1)[1]
|
||||
else:
|
||||
print('* DePythonTeX error:')
|
||||
@@ -1338,7 +1338,7 @@ for n, depytxline in enumerate(depytx):
|
||||
after = tex[texlinenum]
|
||||
break
|
||||
after = after.split(end_environment, 1)[1]
|
||||
- if bool(match('\s*\n', after)):
|
||||
+ if bool(match(r'\s*\n', after)):
|
||||
# If the line following `after` is whitespace, it should
|
||||
# be stripped, since most environments throw away
|
||||
# anything after the end of the environment
|
||||
@@ -1389,7 +1389,7 @@ if preamble_additions:
|
||||
# Take care of graphicspath
|
||||
if args.graphicspath and settings['graphicx']:
|
||||
for n, line in enumerate(texout):
|
||||
- if '\\graphicspath' in line and not bool(match('\s*%', line)):
|
||||
+ if '\\graphicspath' in line and not bool(match(r'\s*%', line)):
|
||||
texout[n] = line.replace('\\graphicspath{', '\\graphicspath{{' + settings['outputdir'] +'/}')
|
||||
break
|
||||
elif line.startswith(r'\begin{document}'):
|
||||
diff -up texmf-dist/scripts/pythontex/pythontex3.py.orig texmf-dist/scripts/pythontex/pythontex3.py
|
||||
--- texmf-dist/scripts/pythontex/pythontex3.py.orig 2025-07-15 15:42:36.840317560 +0200
|
||||
+++ texmf-dist/scripts/pythontex/pythontex3.py 2025-07-15 15:43:51.882856253 +0200
|
||||
@@ -554,7 +554,7 @@ def do_upgrade_compatibility(data, old_d
|
||||
It will continue to use the output directory for now. To keep your
|
||||
current settings long-term and avoid seeing this message in the future,
|
||||
add the following command to the preamble of your document, right after
|
||||
- the "\\usepackage{pythontex}": "\setpythontexworkingdir{<outputdir>}".
|
||||
+ the "\\usepackage{pythontex}": "\\setpythontexworkingdir{<outputdir>}".
|
||||
If you wish to continue with the new settings instead, simply delete
|
||||
the file with extension .pkl in the output directory, and run PythonTeX.
|
||||
**** End PythonTeX upgrade message ****
|
||||
@@ -1807,7 +1807,7 @@ def run_code(encoding, outputdir, workin
|
||||
# Get the gobbleation. This is used to determine if
|
||||
# other lines containing the basename are a continuation,
|
||||
# or separate messages.
|
||||
- errgobble = match('(\s*)', line).groups()[0]
|
||||
+ errgobble = match(r'(\s*)', line).groups()[0]
|
||||
if start_errgobble is None:
|
||||
start_errgobble = errgobble
|
||||
# Only issue a message and track down the line numer if
|
||||
@@ -2072,7 +2072,7 @@ def run_code(encoding, outputdir, workin
|
||||
# Get the gobbleation. This is used to determine if
|
||||
# other lines containing the basename are a continuation,
|
||||
# or separate messages.
|
||||
- errgobble = match('(\s*)', line).groups()[0]
|
||||
+ errgobble = match(r'(\s*)', line).groups()[0]
|
||||
if start_errgobble is None:
|
||||
start_errgobble = errgobble
|
||||
# Only issue a message and track down the line numer if
|
||||
Loading…
Add table
Add a link
Reference in a new issue