![无连字符模式(西班牙语)](https://linux22.com/image/470772/%E6%97%A0%E8%BF%9E%E5%AD%97%E7%AC%A6%E6%A8%A1%E5%BC%8F%EF%BC%88%E8%A5%BF%E7%8F%AD%E7%89%99%E8%AF%AD%EF%BC%89.png)
我的西班牙语 Latex 文档中的连字符不符合语言规则。在我创建的日志中搜索:
ackage babel Warning: No hyphenation patterns were preloaded for
(babel) the language 'Spanish' into the format.
(babel) Please, configure your TeX system to add them and
(babel) rebuild the format. Now I will use the patterns
(babel) preloaded for \language=0 instead on input line 51.
我尝试重新安装 babel-spanish 和 hyphen-spanish ( sudo tlmgr install --reinstall hyphen-spanish babel-spanish
),但没有成功。输出结果如下:
[1/3, ??:??/??:??] reinstall: babel-spanish [217k]
[2/3, 00:01/00:03] reinstall: hyph-utf8 [312k]
[3/3, 00:02/00:02] reinstall: hyphen-spanish [150k]
running mktexlsr ...
done running mktexlsr.
regenerating language.dat
regenerating language.def
regenerating language.dat.lua
running fmtutil-sys --byhyphen "/var/lib/texmf/tex/generic/config/language.dat" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/v7tnXUUqEh/029NhNE0MO ...
running fmtutil-sys --byhyphen "/var/lib/texmf/tex/generic/config/language.def" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/v7tnXUUqEh/029NhNE0MO ...
running fmtutil-sys --byhyphen "/var/lib/texmf/tex/generic/config/language.dat.lua" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/v7tnXUUqEh/029NhNE0MO ...
tlmgr: package log updated: /var/lib/texmf/web2c/tlmgr.log
tlmgr: command log updated: /var/lib/texmf/web2c/tlmgr-commands.log
检查了文件 language.dat,发现其中的西班牙语连字符没有注释。还尝试了其他方法sudo fmtutil-sys --all
,但返回了以下内容:
fmtutil [INFO]: disabled formats: 3
fmtutil [INFO]: successfully rebuilt formats: 27
fmtutil [INFO]: failed to build: 25 (euptex/euptex eptex/eptex eptex/ptex pdftex/utf8mex pdftex/mltex euptex/uptex luatex/luacsplain pdftex/xmltex euptex/uplatex pdftex/jadetex pdftex/pdfmex pdftex/pdfjadetex euptex/platex pdftex/pdfxmltex euptex/platex-dev xetex/xelatex pdftex/eplain hitex/hilatex euptex/uplatex-dev pdftex/mex pdftex/csplain pdftex/pdflatex xetex/pdfcsplain pdftex/pdfcsplain luatex/pdfcsplain)
fmtutil [INFO]: total formats: 55
fmtutil [INFO]: exiting with status 25
完成所有步骤后,错误仍然存在。我该如何解决这个问题并允许正确连字符?
编辑:MWE(文本是从维基百科文章复制而来的):
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish, es-tabla]{babel} % pone el idioma en español
\begin{document}
El artículo, en morfología lingüística, es un tipo de determinante actualizador, una categoría morfológica que emplean algunas lenguas para actualizar o precisar la referencia de un sustantivo, transformándolo de desconocido y abstracto («un libro») a conocido y concreto («el libro»). Es un indicador que sitúa lo que se dice en el contexto común al que lo dice y al que lo oye, o sea, en el mutuo acuerdo de los interlocutores.
\end{document}
日志:
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=pdflatex 2023.11.8) 8 NOV 2023 13:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**texstudio_SIMMDH.tex
(./texstudio_SIMMDH.tex
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-08-29>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(/usr/share/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2021/02/14 v1.3d Input encoding file
\inpenc@prehook=\toks17
\inpenc@posthook=\toks18
)
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2023/08/29 v3.93 The Babel package
\babel@savecnt=\count193
\U@D=\dimen141
\l@unhyphenated=\language3
(/usr/share/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@readstream=\read2
\bbl@dirlevel=\count194
(/usr/share/texmf-dist/tex/generic/babel-spanish/spanish.ldf
Language: spanish.ldf 2021/05/27 v5.0q Spanish support from the babel system
Package babel Warning: No hyphenation patterns were preloaded for
(babel) the language 'Spanish' into the format.
(babel) Please, configure your TeX system to add them and
(babel) rebuild the format. Now I will use the patterns
(babel) preloaded for \language=0 instead on input line 51.
Package babel Info: Hyphen rules for 'spanish' set to \l@english
(babel) (\language0). Reported on input line 52.
\es@quottoks=\toks19
\es@quotdepth=\count195
Package babel Info: Making " an active character on input line 570.
Package babel Info: Making . an active character on input line 675.
Package babel Info: Making < an active character on input line 722.
Package babel Info: Making > an active character on input line 722.
)) (/usr/share/texmf-dist/tex/generic/babel/locale/es/babel-spanish.tex
Package babel Info: Importing font and identification data for spanish
(babel) from babel-es.ini. Reported on input line 11.
)
(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2023-04-19 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count196
\l__pdf_internal_box=\box51
)
(/home/jose-tomas/.cache/texstudio/archivos-temporales/texstudio_SIMMDH.aux
LaTeX Info: Redefining \. on input line 8.
LaTeX Info: Redefining \% on input line 8.
)
\openout1 = `texstudio_SIMMDH.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info: ... okay on input line 6.
LaTeX Info: Redefining \. on input line 6.
LaTeX Info: Redefining \% on input line 6.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 8.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 8.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 8.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(/home/jose-tomas/.cache/texstudio/archivos-temporales/texstudio_SIMMDH.aux
LaTeX Info: Redefining \. on input line 8.
LaTeX Info: Redefining \% on input line 8.
)
***********
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-08-29>
***********
)
Here is how much of TeX's memory you used:
1909 strings out of 476894
33574 string characters out of 5809852
1920807 words of memory out of 5000000
23255 multiletter control sequences out of 15000+600000
560805 words of font info for 45 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
45i,5n,52p,484b,365s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/t
exmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb>
Output written on /home/jose-tomas/.cache/texstudio/archivos-temporales/texstud
io_SIMMDH.pdf (1 page, 24054 bytes).
PDF statistics:
18 PDF objects out of 1000 (max. 8388607)
10 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
答案1
在完成 TeX Live 的全新安装并通过 Arch Linux 软件包而非 tlmgr 安装所有必需软件包之后(包括https://archlinux.org/packages/extra/any/texlive-langspanish/,正如@DavidCarlisle 建议的那样)现在连字符可以按预期工作。