在我的例子中,键似乎没有被处理...这是文件测试.cls:
\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\RequirePackage{l3keys2e}
\ProvidesExplClass
{test}
{2013/12/23}
{1.0}
{Ceci est ma classe pour les cours}
\ExplSyntaxOn
\bool_new:N \mik_test_video
\keys_define:nn {montest} {
video .bool_set:N = \mik_test_video,
}
\ProcessKeysOptions{montest}
\bool_log:N \mik_test_video
\LoadClass{article}
\bool_log:N \mik_test_video
\bool_if:NTF
{\mik_test_video}
{\msg_term:n {Le~mode~vidéo~projecteur~est~ACTIVÉ}}
{\msg_term:n {Le~mode~vidéo~projecteur~est~DÉSACTIVÉ}}
\ExplSyntaxOff
\endinput
这是文件测试.tex:
\documentclass[video]{test}
\begin{document}
test2015
\end{document}
正常情况下,我应该在日志文件中看到:“Le~mode~vidéo~projecteur~est~ACTIVÉ”,但布尔值 \mik_test_video 似乎总是假的……
\bool_log:N \mik_test_video在日志中每次都得到错误。
我究竟做错了什么 ?
-----------8<---------- 日志文件
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2015.7.4) 4 JUL 2015 18:09
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2015/01/01> patch level 1
Babel <3.9l> and hyphenation patterns for 18 languages loaded.
(./test.cls
(/home/relou/texlive/2015/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.st
y (/home/relou/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2015/06/15 v5630 L3 programming layer (loader)
(/home/relou/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2015/06/15 v5630 L3 programming layer (code)
L3 Module: l3bootstrap 2015/05/20 v5608 L3 Bootstrap code
L3 Module: l3names 2015/02/24 v5535 L3 Namespace for primitives
L3 Module: l3basics 2015/01/27 v5500 L3 Basic definitions
L3 Module: l3expan 2014/11/27 v5472 L3 Argument expansion
L3 Module: l3tl 2015/01/27 v5500 L3 Token lists
L3 Module: l3str 2015/03/01 v5545 L3 Strings
L3 Module: l3seq 2014/08/23 v5354 L3 Sequences and stacks
L3 Module: l3int 2015/02/21 v5529 L3 Integers
\c_max_int=\count79
\l_tmpa_int=\count80
\l_tmpb_int=\count81
\g_tmpa_int=\count82
\g_tmpb_int=\count83
L3 Module: l3quark 2014/08/23 v5354 L3 Quarks
L3 Module: l3prg 2015/04/13 v5566 L3 Control structures
\g__prg_map_int=\count84
L3 Module: l3clist 2014/08/23 v5354 L3 Comma separated lists
L3 Module: l3token 2014/09/15 v5422 L3 Experimental token manipulation
L3 Module: l3prop 2014/08/23 v5354 L3 Property lists
L3 Module: l3msg 2015/02/26 v5537 L3 Messages
L3 Module: l3file 2015/06/07 v5627 L3 File and I/O operations
\l_iow_line_count_int=\count85
\l__iow_target_count_int=\count86
\l__iow_current_line_int=\count87
\l__iow_current_word_int=\count88
\l__iow_current_indentation_int=\count89
L3 Module: l3skip 2015/05/18 v5607 L3 Dimensions and skips
\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
L3 Module: l3keys 2015/06/14 v5629 L3 Key-value interfaces
\g__keyval_level_int=\count90
\l_keys_choice_int=\count91
L3 Module: l3fp 2014/08/22 v5336 L3 Floating points
\c__fp_leading_shift_int=\count92
\c__fp_middle_shift_int=\count93
\c__fp_trailing_shift_int=\count94
\c__fp_big_leading_shift_int=\count95
\c__fp_big_middle_shift_int=\count96
\c__fp_big_trailing_shift_int=\count97
\c__fp_Bigg_leading_shift_int=\count98
\c__fp_Bigg_middle_shift_int=\count99
\c__fp_Bigg_trailing_shift_int=\count100
L3 Module: l3box 2014/08/23 v5354 L3 Experimental boxes
\c_empty_box=\box26
\l_tmpa_box=\box27
\l_tmpb_box=\box28
\g_tmpa_box=\box29
\g_tmpb_box=\box30
L3 Module: l3coffins 2014/08/23 v5354 L3 Coffin code layer
\l__coffin_internal_box=\box31
\l__coffin_internal_dim=\dimen108
\l__coffin_offset_x_dim=\dimen109
\l__coffin_offset_y_dim=\dimen110
\l__coffin_x_dim=\dimen111
\l__coffin_y_dim=\dimen112
\l__coffin_x_prime_dim=\dimen113
\l__coffin_y_prime_dim=\dimen114
\c_empty_coffin=\box32
\l__coffin_aligned_coffin=\box33
\l__coffin_aligned_internal_coffin=\box34
\l_tmpa_coffin=\box35
\l_tmpb_coffin=\box36
\l__coffin_display_coffin=\box37
\l__coffin_display_coord_coffin=\box38
\l__coffin_display_pole_coffin=\box39
\l__coffin_display_offset_dim=\dimen115
\l__coffin_display_x_dim=\dimen116
\l__coffin_display_y_dim=\dimen117
L3 Module: l3color 2014/08/23 v5354 L3 Experimental color support
L3 Module: l3candidates 2015/05/21 v5613 L3 Experimental additions to l3kernel
\l__box_top_dim=\dimen118
\l__box_bottom_dim=\dimen119
\l__box_left_dim=\dimen120
\l__box_right_dim=\dimen121
\l__box_top_new_dim=\dimen122
\l__box_bottom_new_dim=\dimen123
\l__box_left_new_dim=\dimen124
\l__box_right_new_dim=\dimen125
\l__box_internal_box=\box40
\l__coffin_bounding_shift_dim=\dimen126
\l__coffin_left_corner_dim=\dimen127
\l__coffin_right_corner_dim=\dimen128
\l__coffin_bottom_corner_dim=\dimen129
\l__coffin_top_corner_dim=\dimen130
\l__coffin_scaled_total_height_dim=\dimen131
\l__coffin_scaled_width_dim=\dimen132
)
(/home/relou/texlive/2015/texmf-dist/tex/latex/l3kernel/l3unicode-data.def
File: l3unicode-data.def 2015/03/01 v5544 L3 Unicode data
)
(/home/relou/texlive/2015/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
File: l3pdfmode.def 2015/05/21 v5613 L3 Experimental driver: PDF mode
\l__driver_color_stack_int=\count101
))
Package: l3keys2e 2015/06/15 v5630 LaTeX2e option processing using LaTeX3 keys
)
Document Class: test 2013/12/23 v1.0 Ceci est ma classe pour les cours
> \mik_test_video=false.
(/home/relou/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/home/relou/texlive/2015/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count102
\c@section=\count103
\c@subsection=\count104
\c@subsubsection=\count105
\c@paragraph=\count106
\c@subparagraph=\count107
\c@figure=\count108
\c@table=\count109
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen133
)
> \mik_test_video=false.
*************************************************
* Le mode vidéo projecteur est DÉSACTIVÉ
*************************************************
)
LaTeX Warning: Unused global option(s):
[video].
(./test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
[1
{/home/relou/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./te
st.aux) )
Here is how much of TeX's memory you used:
5956 strings out of 494763
118718 string characters out of 6172797
135862 words of memory out of 5000000
9299 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
107 hyphenation exceptions out of 8191
45i,4n,39p,10390b,107s stack positions out of 5000i,500n,10000p,200000b,80000s
</home/relou/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/cm/c
mr10.pfb>
Output written on test.pdf (1 page, 11235 bytes).
PDF statistics:
12 PDF objects out of 1000 (max. 8388607)
7 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)