![如何在 TexMaker 中编写波斯语文本](https://linux22.com/image/408181/%E5%A6%82%E4%BD%95%E5%9C%A8%20TexMaker%20%E4%B8%AD%E7%BC%96%E5%86%99%E6%B3%A2%E6%96%AF%E8%AF%AD%E6%96%87%E6%9C%AC.png)
我正在尝试在 Fedora 上的 TexMaker 中编写波斯语文本。我已经安装了 xepersian,但这个基本示例无法构建和运行。
\documentclass{minimal}
\usepackage{xepersian}
\usepackage{enumerate}
\settextfont{XB Niloofar}
\begin{document}
این فقط یک آزمایش است
\end{document}
错误是:
(fontspec) 您必须将排版引擎更改为 (fontspec) 例如“xelatex”或“lualatex”,而不是 (fontspec)“latex”或“pdflatex”。
根据提示,我尝试了选项->配置 TexMaker,然后在快速构建命令下选择 XeLatex + 查看 PDF,但仍然失败。此外,我无法从命令行使用 xelatex 构建此文件,在那里我得到了类似的错误和更多错误。
以下是完整输出:
LOG FILE :
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.11.3) 16 FEB 2020 07:09
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**fa.tex
(./fa.tex
LaTeX2e <2018-12-01>
(/usr/share/texlive/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texlive/texmf-dist/tex/xelatex/xepersian/xepersian.sty
Package: xepersian 2019/05/01 v22.7 Persian typesetting in XeLaTeX
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2019-07-25 L3 programming layer (loader)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2019-07-25 L3 programming layer (code)
\c_max_int=\count80
\l_tmpa_int=\count81
\l_tmpb_int=\count82
\g_tmpa_int=\count83
\g_tmpb_int=\count84
\g__kernel_prg_map_int=\count85
\c__ior_term_ior=\count86
\c_log_iow=\count87
\l_iow_line_count_int=\count88
\l__iow_line_target_int=\count89
\l__iow_one_indent_int=\count90
\l__iow_indent_int=\count91
\c_zero_dim=\dimen102
\c_max_dim=\dimen103
\l_tmpa_dim=\dimen104
\l_tmpb_dim=\dimen105
\g_tmpa_dim=\dimen106
\g_tmpb_dim=\dimen107
\c_zero_skip=\skip41
\c_max_skip=\skip42
\l_tmpa_skip=\skip43
\l_tmpb_skip=\skip44
\g_tmpa_skip=\skip45
\g_tmpb_skip=\skip46
\c_zero_muskip=\muskip10
\c_max_muskip=\muskip11
\l_tmpa_muskip=\muskip12
\l_tmpb_muskip=\muskip13
\g_tmpa_muskip=\muskip14
\g_tmpb_muskip=\muskip15
\l_keys_choice_int=\count92
\l__intarray_loop_int=\count93
\c__intarray_sp_dim=\dimen108
\g__intarray_font_int=\count94
\c__fp_leading_shift_int=\count95
\c__fp_middle_shift_int=\count96
\c__fp_trailing_shift_int=\count97
\c__fp_big_leading_shift_int=\count98
\c__fp_big_middle_shift_int=\count99
\c__fp_big_trailing_shift_int=\count100
\c__fp_Bigg_leading_shift_int=\count101
\c__fp_Bigg_middle_shift_int=\count102
\c__fp_Bigg_trailing_shift_int=\count103
\c__kernel_randint_max_int=\count104
\g__fp_array_int=\count105
\l__fp_array_loop_int=\count106
\l__sort_length_int=\count107
\l__sort_min_int=\count108
\l__sort_top_int=\count109
\l__sort_max_int=\count110
\l__sort_true_max_int=\count111
\l__sort_block_int=\count112
\l__sort_begin_int=\count113
\l__sort_end_int=\count114
\l__sort_A_int=\count115
\l__sort_B_int=\count116
\l__sort_C_int=\count117
\l__str_internal_int=\count118
\c__str_replacement_char_int=\count119
\l__tl_analysis_normal_int=\count120
\l__tl_analysis_index_int=\count121
\l__tl_analysis_nesting_int=\count122
\l__tl_analysis_type_int=\count123
\l__regex_internal_a_int=\count124
\l__regex_internal_b_int=\count125
\l__regex_internal_c_int=\count126
\l__regex_balance_int=\count127
\l__regex_group_level_int=\count128
\l__regex_mode_int=\count129
\c__regex_cs_in_class_mode_int=\count130
\c__regex_cs_mode_int=\count131
\l__regex_catcodes_int=\count132
\l__regex_default_catcodes_int=\count133
\c__regex_catcode_D_int=\count134
\c__regex_catcode_S_int=\count135
\c__regex_catcode_L_int=\count136
\c__regex_catcode_O_int=\count137
\c__regex_catcode_A_int=\count138
\c__regex_all_catcodes_int=\count139
\l__regex_show_lines_int=\count140
\l__regex_min_state_int=\count141
\l__regex_max_state_int=\count142
\l__regex_left_state_int=\count143
\l__regex_right_state_int=\count144
\l__regex_capturing_group_int=\count145
\l__regex_min_pos_int=\count146
\l__regex_max_pos_int=\count147
\l__regex_curr_pos_int=\count148
\l__regex_start_pos_int=\count149
\l__regex_success_pos_int=\count150
\l__regex_curr_char_int=\count151
\l__regex_curr_catcode_int=\count152
\l__regex_last_char_int=\count153
\l__regex_case_changed_char_int=\count154
\l__regex_curr_state_int=\count155
\l__regex_step_int=\count156
\l__regex_min_active_int=\count157
\l__regex_max_active_int=\count158
\l__regex_replacement_csnames_int=\count159
\l__regex_match_count_int=\count160
\l__regex_min_submatch_int=\count161
\l__regex_submatch_int=\count162
\l__regex_zeroth_submatch_int=\count163
\g__regex_trace_regex_int=\count164
\c_empty_box=\box27
\l_tmpa_box=\box28
\l_tmpb_box=\box29
\g_tmpa_box=\box30
\g_tmpb_box=\box31
\l__box_top_dim=\dimen109
\l__box_bottom_dim=\dimen110
\l__box_left_dim=\dimen111
\l__box_right_dim=\dimen112
\l__box_top_new_dim=\dimen113
\l__box_bottom_new_dim=\dimen114
\l__box_left_new_dim=\dimen115
\l__box_right_new_dim=\dimen116
\l__box_internal_box=\box32
\l__coffin_internal_box=\box33
\l__coffin_internal_dim=\dimen117
\l__coffin_offset_x_dim=\dimen118
\l__coffin_offset_y_dim=\dimen119
\l__coffin_x_dim=\dimen120
\l__coffin_y_dim=\dimen121
\l__coffin_x_prime_dim=\dimen122
\l__coffin_y_prime_dim=\dimen123
\c_empty_coffin=\box34
\l__coffin_aligned_coffin=\box35
\l__coffin_aligned_internal_coffin=\box36
\l_tmpa_coffin=\box37
\l_tmpb_coffin=\box38
\g_tmpa_coffin=\box39
\g_tmpb_coffin=\box40
\l__coffin_bounding_shift_dim=\dimen124
\l__coffin_left_corner_dim=\dimen125
\l__coffin_right_corner_dim=\dimen126
\l__coffin_bottom_corner_dim=\dimen127
\l__coffin_top_corner_dim=\dimen128
\l__coffin_scaled_total_height_dim=\dimen129
\l__coffin_scaled_width_dim=\dimen130
\c__coffin_empty_coffin=\box41
\l__coffin_display_coffin=\box42
\l__coffin_display_coord_coffin=\box43
\l__coffin_display_pole_coffin=\box44
\l__coffin_display_offset_dim=\dimen131
\l__coffin_display_x_dim=\dimen132
\l__coffin_display_y_dim=\dimen133
\g__file_internal_ior=\read1
\l__seq_internal_a_int=\count165
\l__seq_internal_b_int=\count166
)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2019-04-06 v L3 backend support: PDF mode
\l__kernel_color_stack_int=\count167
\l__pdf_internal_box=\box45
))
Package: xparse 2019-05-28 L3 Experimental document command parser
\l__xparse_current_arg_int=\count168
\g__xparse_grabber_int=\count169
\l__xparse_m_args_int=\count170
\l__xparse_v_nesting_int=\count171
)
Package: fontspec 2019/03/15 v2.7c Font selection for XeLaTeX and LuaLaTeX
! Fatal Package fontspec Error: The fontspec package requires either XeTeX or
(fontspec) LuaTeX.
(fontspec)
(fontspec) You must change your typesetting engine to,
(fontspec) e.g., "xelatex" or "lualatex"instead of
(fontspec) "latex" or "pdflatex".
Type <return> to continue.
...
l.45 \msg_fatal:nn {fontspec} {cannot-use-pdftex}
LaTeX does not know anything more about this error, sorry.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
This is a fatal error: LaTeX will abort.
! Emergency stop.
<read *>
l.45 \msg_fatal:nn {fontspec} {cannot-use-pdftex}
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
10051 strings out of 494562
200563 string characters out of 6177417
216248 words of memory out of 5000000
13780 multiletter control sequences out of 15000+600000
532338 words of font info for 24 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
54i,0n,67p,288b,317s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!