Bonjour
Voilà le fichier maitre.tex :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{standalone}
\usepackage{iftex}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\ifluatex
\usepackage{fontspec}
\fontspec{CMU Serif Roman}
\else
\usepackage{lmodern}
\frenchsetup{og=«,fg=»}
\fi
\begin{document}
\input{test.tex}
\newpage
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
et voilà le fichier test.tex :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{iftex}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\ifluatex
\usepackage{fontspec}
\fontspec{CMU Serif Roman}
\else
\usepackage{lmodern}
\frenchsetup{og=«,fg=»}
\fi
\begin{document}
«Test»
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Si je compile avec luaLaTeX, pas de problème.
Si compile avec pdfLaTeX, j’obtiens deux fois l’erreur :
! LaTeX Error: Can be used only in preamble.
See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
…
l.12 \begin{document}
avec le File list :
File List
article.cls 2025/01/22 v1.4n Standard LaTeX document class
size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option)
standalone.sty 2025/02/22 v1.5a Package to include TeX sub-files with
preamb
les
shellesc.sty 2023/07/08 v1.0d unified shell escape interface for LaTeX
ifluatex.sty 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
iftex.sty 2024/12/12 v1.0g TeX engine tests
xkeyval.sty 2022/06/16 v2.9 package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
currfile.sty 2024/03/14 v1.0 Provides the file path elements of the
current
input file
kvoptions.sty 2022-06-15 v3.15 Key value format for package options (HO)
ltxcmds.sty 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO)
filehook.sty 2022/10/25 v0.8b Hooks for input files
filehook-2020.sty 2022/10/25 v0.8b Hooks for input files
gincltex.sty 2011/09/04 v0.3 Include external LaTeX files like graphics
svn-prov.sty 2010/04/24 v3.1862 Package Date/Version from SVN Keywords
adjustbox.sty 2025/02/26 v1.3c Adjusting TeX boxes (trim, clip, …)
adjcalc.sty 2012/05/16 v1.1 Provides advanced setlength with
multiple back-
ends (calc, etex, pgfmath)
trimclip.sty 2025/02/21 v1.2a Trim and clip general TeX material
graphicx.sty 2024/12/31 v1.2e Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2023/12/02 v1.11 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
pdftex.def 2024/04/13 v1.2c Graphics/color driver for pdftex
collectbox.sty 2022/10/17 v0.4c Collect macro arguments as boxes
tc-pdftex.def 2025/02/26 v2.3 Clipping driver for pdftex
ifoddpage.sty 2022/10/18 v1.2 Conditionals for odd/even page detection
varwidth.sty 2009/03/30 ver 0.92; Variable-width minipages
filemod-expmin.sty 2011/09/19 v1.2 Get and compare file modification
times (
expandable; minimal)
fontenc.sty 2024/12/21 v2.1c Standard LaTeX package
babel.sty 2025/08/03 v25.12 The multilingual framework for
LuaLaTeX, pdfL
aTeX and XeLaTeX
bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to “declared”
options of b
abel
french.ldf 2025-07-25 v3.7d French support from the babel system
babel-french.tex
scalefnt.sty
lmodern.sty 2015/05/01 v1.6.1 Latin Modern Fonts
t1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
l3backend-pdftex.def 2025-06-09 L3 backend support: PDF output (pdfTeX)
supp-pdf.mkii
epstopdf-base.sty 2020-01-24 v2.11 Base part for package epstopdf
epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
test.tex
Si je commente la ligne \frenchsetup{og=«,fg=»}, alors la compilation
avec pdfLaTeX se passe bien.
Il y a trois mois, il me semble que tout se passait sans problème.
Serait-ce un bug introduit dans la version 3.7d de frenchb ?
Cordialement,
François