From 9ee96a90c9e908f7beee3d1cd421c6caa55368be Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 11 Aug 2022 03:00:48 +0000 Subject: CTAN sync 202208110300 --- macros/latex/contrib/bhcexam/BHCexam.dtx | 859 --------------------- macros/latex/contrib/bhcexam/BHCexam.ins | 107 --- macros/latex/contrib/bhcexam/Makefile | 88 --- macros/latex/contrib/bhcexam/README | 21 - macros/latex/contrib/bhcexam/test1.tex | 143 ---- macros/latex/contrib/bhcexam/test2.tex | 144 ---- macros/latex/contrib/bhcexam/test3.tex | 144 ---- macros/latex/contrib/bhcexam/test4.tex | 144 ---- .../latex/contrib/proflycee/doc/ProfLycee-doc.pdf | Bin 678803 -> 732702 bytes .../latex/contrib/proflycee/doc/ProfLycee-doc.tex | 343 +++++++- macros/latex/contrib/proflycee/doc/basique.csv | 4 + macros/latex/contrib/proflycee/doc/cap.csv | 22 + macros/latex/contrib/proflycee/doc/perroquet.csv | 23 + macros/latex/contrib/proflycee/tex/ProfLycee.sty | 79 +- macros/latex/contrib/simplebnf/LICENSE | 2 +- macros/latex/contrib/simplebnf/simplebnf-doc.tex | 23 +- macros/latex/contrib/simplebnf/simplebnf.sty | 56 +- 17 files changed, 514 insertions(+), 1688 deletions(-) delete mode 100644 macros/latex/contrib/bhcexam/BHCexam.dtx delete mode 100644 macros/latex/contrib/bhcexam/BHCexam.ins delete mode 100644 macros/latex/contrib/bhcexam/Makefile delete mode 100644 macros/latex/contrib/bhcexam/README delete mode 100644 macros/latex/contrib/bhcexam/test1.tex delete mode 100644 macros/latex/contrib/bhcexam/test2.tex delete mode 100644 macros/latex/contrib/bhcexam/test3.tex delete mode 100644 macros/latex/contrib/bhcexam/test4.tex create mode 100644 macros/latex/contrib/proflycee/doc/basique.csv create mode 100644 macros/latex/contrib/proflycee/doc/cap.csv create mode 100644 macros/latex/contrib/proflycee/doc/perroquet.csv (limited to 'macros/latex') diff --git a/macros/latex/contrib/bhcexam/BHCexam.dtx b/macros/latex/contrib/bhcexam/BHCexam.dtx deleted file mode 100644 index 019d74cba0..0000000000 --- a/macros/latex/contrib/bhcexam/BHCexam.dtx +++ /dev/null @@ -1,859 +0,0 @@ -% \iffalse meta-comment -% -% Copyright (C) 2014 by Charles Bao -% -% This file is part of the BHCexam package project. -% --------------------------------------------------- -% -% It may be distributed under the conditions of the LaTeX Project Public -% License, either version 1.2 of this license or (at your option) any -% later version. The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.2 or later is part of all distributions of LaTeX -% version 1999/12/01 or later. -% -%<*!(cfg|fd)> -% \fi -% -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -%% -% -% \CheckSum{0} -% -% \iffalse meta-comment -% -% -%<*driver> -\ProvidesFile{BHCexam.dtx} -% -% -%\NeedsTeXFormat{LaTeX2e}[1995/12/01] -%\ProvidesClass{BHCexam} -%\ProvidesFile{BHCexam.cfg} - [2015/10/10 v0.4 BHCexam -% document class] -% configuration file] -% -%<*driver> - bundle source file] -% -% -%<*driver> -\documentclass[a4paper]{ltxdoc} -\usepackage{ctex} -\usepackage{hyperref} -\usepackage{amsmath,amssymb} - \topmargin 0.5 true cm - \oddsidemargin 1 true cm - \evensidemargin 1 true cm - \textheight 21 true cm - \textwidth 14 true cm -\EnableCrossrefs - %\DisableCrossrefs % Say \DisableCrossrefs if index is ready -\CodelineIndex -\RecordChanges % Gather update information - %\OnlyDescription % comment out for implementation details - %\OldMakeindex % use if your MakeIndex is pre-v2.9 -\hypersetup{colorlinks,linkcolor=blue,citecolor=blue} -\begin{document} - \DocInput{BHCexam.dtx} -\end{document} -% -% -% \fi -% -% -% \changes{v0.0}{2011/07/22}{Initial version} -% \changes{v0.1}{2011/07/23}{version 0.1} -% \changes{v0.2}{2011/07/27}{version 0.2} -% \changes{v0.3}{2014/02/18}{version 0.3} -% \changes{v0.3}{2015/10/10}{version 0.4} -% -% -% \DoNotIndex{\begin,\end,\begingroup,\endgroup} -% \DoNotIndex{\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi} -% \DoNotIndex{\let,\def,\xdef,\newcommand,\renewcommand} -% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect} -% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize} -% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny} -% \DoNotIndex{\normalfont,\bfseries,\slshape,\interlinepenalty} -% \DoNotIndex{\hfil,\par,\vskip,\vspace,\quad} -% \DoNotIndex{\centering,\raggedright} -% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize} -% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne} -% \DoNotIndex{\@@par} -% -% -% \GetFileInfo{BHCexam.dtx} -% -% -% \MakeShortVerb{\|} -% \setcounter{StandardModuleDepth}{1} -% -% -% \newcommand{\ctex}{\texttt{ctex}} -% \newcommand{\BHCexam}{\texttt{BHCexam}} -% \newcommand{\exam}{\texttt{exam}} -% \newcommand{\colin}{\texttt{colinexam}} -% -% -% \setlength{\parskip}{0.75ex plus .2ex minus .5ex} -% \renewcommand{\baselinestretch}{1.2} -% -% \makeatletter -% \def\parg#1{\mbox{$\langle${\it #1\/}$\rangle$}} -% \def\@smarg#1{{\tt\string{}\parg{#1}{\tt\string}}} -% \def\@marg#1{{\tt\string{}{\rm #1}{\tt\string}}} -% \def\marg{\@ifstar\@smarg\@marg} -% \def\@soarg#1{{\tt[}\parg{#1}{\tt]}} -% \def\@oarg#1{{\tt[}{\rm #1}{\tt]}} -% \def\oarg{\@ifstar\@soarg\@oarg} -% \makeatother -% -% -% \title{\bf \BHCexam~宏包说明\thanks -% {这是鲍宏昌发布的第一个~\LaTeX~宏包。本文件版本号为~\fileversion{},最后修改日期~\filedate{}。}} -% \author{\it 鲍宏昌\thanks{charley792@gmail.com}} -% \date{\small 打印日期:~\today} -% \maketitle -% -% \begin{abstract} -% \BHCexam~宏包提供了一个中学试卷排版的~\LaTeX{}~文档类。 -% -% \BHCexam~主要文件包括~\texttt{BHCexam.cls}~文档类和配置文件 -% ~\texttt{BHCexam.cfg}。 -% -% \BHCexam~宏包由鲍宏昌制作并负责维护。 -% \end{abstract} -% -% \tableofcontents -% \newpage -% -% \section{简介} -% -% 本宏包以~\exam~为底层文档类,部分源代码来自于盖鹤麟开发的 -% ~\colin。不知道什么原因盖鹤麟自2004年就一直没有发布更新, -% ~\colin~仍然使用CCT实现中文支持,而缺乏对~XeTeX~的支持。2011年7月, -% 鲍宏昌在~\colin~的基础上改用~\ctex~实现中文支持,采用UTF8编码同时 -% 支持~XeLaTeX~和~pdfTeX~进行编译,并使用~\texttt{doc}~和 -% ~\texttt{docstrip}~工具编写了这个文档,增加了一些新的功能, -% 并把新的宏包命名为~\BHCexam。 -% -% 本宏包延续了~\colin~和~\exam~的特点,能让一个刚刚接触 -% ~\LaTeX~的初学者,也能轻松用它来排版试卷。希望~\BHCexam~能提高中学 -% 教师的工作效率,并把注意力放在试卷的内容上。 -% -% \BHCexam~由两个主要文件构成:文档类~\texttt{BHCexam.cls}~和配置文件 -% ~\texttt{BHCexam.cfg}~。后者定义了一些常用的参数。 -% -% {\kaishu -% 这两个文件可以通过用~XeLaTeX~编译~\texttt{BHCexam.ins}~文件来得到, -% 而这份说明文档可以通过用~XeLaTeX~编译~\texttt{BHCexam.dtx}~文件来得到。 -% 编译说明文档需要~\ctex{}~宏包,为了生成正确的索引和版本记录, -% 需要使用如下命令} -% \begin{verbatim} -% makeindex -s gind.ist -o BHCexam.ind BHCexam.idx -% makeindex -s gglo.ist -o BHCexam.gls BHCexam.glo -% \end{verbatim} -% -% \section{一个简单的例子} -% -% 用~\BHCexam~要排版一张基本的试卷其实很简单。如果你准备对试卷的排版进行 -% 更细致的设置,那么请参考~\exam~的文档。 -% -% \subsection{\texttt{documentclass} 命令} -% \label{sec:BasicDocumentclass} -% -% 要使用~\BHCexam~文档类,你的\verb"\documentclass" 命令应该是 -% \begin{verbatim} -% \documentclass{BHCexam} -% \end{verbatim} -% 如果,你想使用小四字体作为缺省字体大小,那么添加选项\verb"cs4size" -% \begin{verbatim} -% \documentclass[cs4size]{BHCexam} -% \end{verbatim} -% 更多的选项,请参考\ref{sec:Options}。 -% -% \subsection{打印标题和考试须知} -% \DescribeMacro{\maketitle} -% \DescribeMacro{\notice} -% 在试卷上打印标题和考试须知 -% \begin{verbatim} -% \maketitle -% \notice -% \end{verbatim} -% 关于标题和考试须知中变量的设置,请参考\ref{sec:Variable}。 -% -% \subsection{题目} -% \label{sec:Example} -% \DescribeMacro{\question} -% \DescribeMacro{\stk} -% \DescribeMacro{\onech} -% \DescribeMacro{\part} -% 在\verb"questions"环境中用\verb"\question"输入题目。 -% 在\verb"parts"环境中用\verb"\part"输入大题的小问。 -% 用\verb"\stk"、\verb"\mtk" -% 和\verb"\ltk"输入填空题的答案。 -% 用\verb"\onech"、\verb"\twoch" -% 和\verb"\fourch"输入选择题的选项。 -% 在\verb"questions"环境中用\verb"\tiankong"、\verb"\xuanze" -% 和\verb"\jianda"分别显示填空题、选择题、简答题的提示语。 -% \begin{verbatim} -% \begin{questions} -% \tiankong -% \question 这是第1道填空题\stk{答案,不显示答案时显示段横线} -% \question 这是第2道填空题\mtk{答案,不显示答案时显示段横线} -% \question 这是第2道填空题\ltk{答案,不显示答案时显示段横线} -% \xuanze -% \question 问题3是一道选择题,四个选项显示在一行 -% \onech{选项1}{选项2}{选项3}{选项4} -% \question 问题3是一道选择题,四个选项显示在两行 -% \twoch{选项1}{选项2}{选项3}{选项4} -% \question 问题3是一道选择题,四个选项显示在四行 -% \fourch{选项1}{选项2}{选项3}{选项4} -% \jianda -% \question 问题4是一道简答题 -% \begin{parts} -% \part 第1小问 -% \part 第2小问 -% \end{parts} -% \end{questions} -% \end{verbatim} -% 关于填空题、选择题、简答题的提示语中几个变量的设置,请参考\ref{sec:Variable}。 -% 关于题目的更多内容,请参考\ref{sec:Environment}。 -% -% \section{使用帮助} -% -% \subsection{选项} -% \label{sec:Options} -% -% \changes{v0.2}{2011/07/27}{增加UTF8选项以支持pdflatex} -% \changes{v0.4}{2015/10/10}{取消UTF8选项放弃支持pdflatex} - -% 宏包的选项用于改变一些缺省的设置。虽然缺省的设置基本能过满足一般用户的 -% 使用需要,但用户也可以根据自己的情况,使用这些选项。 -% -% \begin{description} -% \item[cs4size] 使用小四字号为缺省字体大小。 -% \item[c5size] 使用五号字为缺省字体大小(缺省选项)。 -% \item[answers] 在每一个问题后附上答案。 -% \item[marginline] 放置装订线。 -% \item[16kpaper] 使用16开纸张(缺省使用A4纸张)。 -% \item[noindent] 没有缩进。 -% \item[printbox] 显示评分框。 -% \end{description} -% -% \subsection{变量} -% \label{sec:Variable} -% \changes{v0.2}{2011/07/27}{试卷中改用英文标点符号} -% 本宏包在题量和分值等方面均以高考试卷为模板, -% 默认的变量值可以在\texttt{BHCexam.cfg}中设置,当然 -% 你也可以在使用相关命令之前使用以下命令进行更改。\\\\ -% \DescribeMacro{\biaoti} -% 设置标题信息。 -% \begin{quote} -% |\biaoti|\marg*{TEXT} -% \end{quote} -% \DescribeMacro{\fubiaoti} -% 设置副标题,他会显示在标题下方。 -% \begin{quote} -% |\kemu|\marg*{TEXT} -% \end{quote} -% \DescribeMacro{\xinxi} -% 设置总分和考试时间信息,\parg{num1}为总分,\parg{num2}为考试时间。 -% \begin{quote} -% |\xinxi|\marg*{num1}\marg*{num2} -% \end{quote} -% \DescribeMacro{\settk} -% 设置填空题的总分、题量和小分信息,\parg{num1}为总分,\parg{num2}为题量, -% \parg{num3}为小分。 -% \begin{quote} -% |\settk|\marg*{num1}\marg*{num2}\marg*{num3} -% \end{quote} -% \DescribeMacro{\setxz} -% 设置选择题的总分、题量和小分信息,\parg{num1}为总分,\parg{num2}为题量, -% \parg{num3}为小分。 -% \begin{quote} -% |\setxz|\marg*{num1}\marg*{num2}\marg*{num3} -% \end{quote} -% \DescribeMacro{\setjd} -% 设置简答题的总分、题量和小分信息,\parg{num1}为总分,\parg{num2}为题量。 -% \begin{quote} -% |\setjd|\marg*{num1}\marg*{num2}\marg*{num3} -% \end{quote} - -% \subsection{环境} -% \label{sec:Environment} -% 经常使用的环境有\verb"questions"环境、\verb"parts"环境, -% 关于它们的简单介绍,请参考\ref{sec:Example},这里做一点补充说明, -% 更详细的介绍,请参考~\exam~文档。\\\\ -% 在排版简答题时需要用\verb"\part"命令输入各小问的分值,宏包会自动算出总分并显示在该简答题的第一行。 -% 当该道简答题没有小问时,则要用\verb"\question"命令输入该问题的分值。 -% -% \begin{verbatim} -% ... -% \jianda -% \question 这是一道简答题 -% \begin{parts}[ -% \part[3] 第1小问3分。 -% \part[3] 第2小问3分。 -% \part[3] 第3小问4分。 -% \end{parts} -% \question[12] 这是一道没有小问的简答题,这道题有12分 -% ... -% \end{verbatim} -% 在\verb"\question"后新建\verb"solution"环境,在其中输入该问题的解答, -% 在不显示答案的情况下,该问题后会预留答题空间。 -% \begin{verbatim} -% ... -% \jianda -% \question 这是一道简答题 -% \begin{solution} -% 这是解答,不显示答案的情况下则这个问题后预留答题空间。 -% \end{solution} -% ... -% \end{verbatim} -% -% \subsection{常用命令} -% -% \DescribeMacro{\newpage} -% 每道问题的间距是弹性设置的,你只要在想换页的地方输入\verb"\newpage"命令, -% 则上一页的各问题间距会自动调整到最美观的效果。\\ -% \DescribeMacro{\mininotice} -% 在一行内输出精简的考试注意事项。\\ -% \DescribeMacro{\printmalol} -% 在当前页为正面时,在左边插入装订线(仅在使用marginline选项时有效)。\\ -% \DescribeMacro{\printmalol} -% 在当前页为反面时,在左边插入装订线(仅在使用marginline选项时有效)。\\ -% -% \StopEventually{} -% -% \section{源代码说明} -% -% \subsection{选项} -% -% -% 处理~\BHCexam~文档类的选项 -% -% \begin{macro}{\@sixteenkpaper} -% 16k纸张大小设置,缺省选项为a4paper -% \begin{macrocode} -%<*cls> -\newif\if@sixteenkpaper \@sixteenkpaperfalse -\DeclareOption{16kpaper}{\@sixteenkpapertrue} -% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@marginline} -% 是否有装订线 -% \begin{macrocode} -%<*cls> -\newif\if@marginline \@marginlinefalse -\DeclareOption{marginline}{\@marginlinetrue} -% -% \end{macrocode} -% \end{macro} -% -% 不缩进,缺省为缩进 -% \begin{macrocode} -%<*cls> -\newif\if@noindent \@noindentfalse -\DeclareOption{noindent}{\@noindenttrue} -% -% \end{macrocode} -% -% 显示答案的方式,缺省不显示答案 -% \begin{macrocode} -%\DeclareOption{answers}{\PassOptionsToClass{\CurrentOption}{exam}} -% \end{macrocode} - -% \begin{macro}{\@printbox} -% 显示计分框,缺省为不显示。 -% \begin{macrocode} -%<*cls> -\newif\if@printbox \@printboxfalse -\DeclareOption{printbox}{\@printboxtrue} -% -% \end{macrocode} -% \end{macro} -% -% 把没有定义的选项传递给缺省的文档类 -% \begin{macrocode} -%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{exam}} -% \end{macrocode} -% -% 处理选项 -% \begin{macrocode} -%\ProcessOptions -% \end{macrocode} -% -% 装入缺省的文档类 -% \begin{macrocode} -%\LoadClass[addpoints]{exam} -% \end{macrocode} -% -% 导入ctex类的实现 -% \changes{v0.4}{2015/10/10}{修正ctex宏包实现} -% \begin{macrocode} -%<*cls> -\RequirePackage{ctex} -% -% \end{macrocode} -% \subsection{宏包} -% -% \begin{macro}{\RequirePackage} -% 我们需要使用的一些宏包 -% \begin{macrocode} -%<*cls> -\RequirePackage{ifpdf,ifxetex} -\RequirePackage{amsmath,amssymb,amsthm,bm,bbding,pifont,dsfont} -\RequirePackage{mathtools} -\RequirePackage{paralist,cases,tabularx} -\RequirePackage{pstricks,pst-plot,xcolor,graphicx} -% -% \end{macrocode} -% -% 用geometry宏包进行页面设置 -% \changes{v0.2}{2011/07/27}{改用geometry宏包实现纸张设置} -% \changes{v0.3}{2014/02/18}{修正了纸张的尺寸} -% \begin{macrocode} -%<*cls> -\if@marginline -\marginparwidth = 2cm -\if@sixteenkpaper -\RequirePackage[papersize={184mm,260mm},hmargin={3cm,2cm}, -vmargin={2cm,2cm},marginparsep=0.5cm,hoffset=0cm,voffset=0cm, -footnotesep=0.5cm,headsep=0.5cm,twoside]{geometry} -\else -\RequirePackage[paper=a4paper,hmargin={3cm,2cm},vmargin={2cm,2cm}, -marginparsep=0.5cm,hoffset=0cm,voffset=0cm,footnotesep=0.5cm, -headsep=0.5cm,twoside]{geometry} -\fi -\else -\if@sixteenkpaper -\RequirePackage[papersize={184mm,260mm},hmargin={2cm,2cm}, -vmargin={2cm,2cm},marginparsep=0.5cm,hoffset=0cm,voffset=0cm, -footnotesep=0.5cm,headsep=0.5cm]{geometry} -\else -\RequirePackage[papersize={210mm,297mm},hmargin={2cm,2cm},vmargin={2cm,2cm}, -marginparsep=0.5cm,hoffset=0cm,voffset=0cm,footnotesep=0.5cm, -headsep=0.5cm]{geometry} -\fi -\fi -% -% \end{macrocode} -%\end{macro} -% -% \subsection{自定义设置} -%行距、页眉、页脚 -% \begin{macrocode} -%<*cls> -\renewcommand{\baselinestretch}{1.5} -\pagestyle{headandfoot} -\header{}{}{} -\footer{}{\small \quad 第~\thepage~页(共~\numpages~页)}{} -% -% \end{macrocode} -% -% 分值显示 -% \begin{macrocode} -%<*cls> -\pointname{分} -\pointformat{\kaishu (\thepoints)} -% -% \end{macrocode} -% -% 问题的显示 -% \begin{macrocode} -%<*cls> -\renewcommand{\questionshook}{ - \settowidth{\leftmargin}{22.\hskip\labelsep} - \if@noindent \setlength\leftmargin{0pt} \fi -} -\renewcommand{\thepartno}{\arabic{partno}} -\renewcommand{\partlabel}{(\thepartno)} -\renewcommand{\partshook}{ - \settowidth{\leftmargin}{(3).\hskip\labelsep} - \if@noindent \setlength\leftmargin{0pt} \fi -} -% -% \end{macrocode} -% -% 解答的显示 -% \begin{macrocode} -%<*cls> -\newif\if@cancelspace \@cancelspacetrue -\renewcommand{\solutiontitle}{\noindent 解:\noindent} -\renewenvironment{solution}% - {% - \ifprintanswers - %\unskip - \begingroup - \Solution@Emphasis - \begin{TheSolution}% - \else - \if@cancelspace - %\unskip - \else - \par - \penalty 0 - \vfill% - \if@printbox \if@houpinfen \houpinfen \fi \fi - \fi - \setbox\z@\vbox\bgroup - \fi - }{% - \ifprintanswers - \end{TheSolution}% - \endgroup - \else - \egroup - \fi - }% -% -% \end{macrocode} -% -% \subsection{新的命令和环境} -% -% \begin{macro}{\printmlor} -% \begin{macro}{\printmlol} -% \changes{v0.1}{2011/07/23}{支持在首页插入装订线} -% \changes{v0.2}{2011/07/27}{手动在指定页插入左(右)装订线} -% 装订线 -% \begin{macrocode} -%<*cls> -\if@marginline -\newsavebox{\zdxl} -\sbox{\zdxl}{ -\begin{minipage}{0.7\paperheight} -\begin{center} -\heiti 班级\underline{\hspace{15ex}} \quad -姓名 \underline{\hspace{15ex}} \quad -学号 \underline{\hspace{15ex}} \quad \\ -\vspace{3ex} -\dotfill 装 \dotfill 订 \dotfill 线 \dotfill -\end{center} -\end{minipage} -} -\newsavebox{\zdxr} -\sbox{\zdxr}{ -\begin{minipage}{0.7\paperheight} -\begin{center} -\heiti \hfill 请 \hfill 不 \hfill 要 \hfill 在 \hfill - 装 \hfill 订 \hfill 线 \hfill 内 \hfill 答 \hfill 题 \hfill \\ -\vspace{3ex} -\dotfill 装 \dotfill 订 \dotfill 线 \dotfill -\end{center} -\end{minipage} -} -\newcommand{\printmlol}{ -\marginpar{\rotatebox{90}{\usebox{\zdxl}}} -} -\newcommand{\printmlor}{ -\marginpar{\rotatebox{-90}{\usebox{\zdxr}}} -} -\reversemarginpar -\fi -% -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\biaoti} -% \begin{macro}{\fubiaoti} -% 标题 -% \begin{macrocode} -%<*cls> -\newcommand\biaoti[1]{\def\@biaoti{#1}} -\newcommand\fubiaoti[1]{\def\@fubiaoti{#1}} -\renewcommand\maketitle{ - \begin{center}{\heiti \Large{\@biaoti}}\end{center} - \begin{center}{\heiti \Large{\@fubiaoti}}\end{center} -} -% -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\mininotice} -% \begin{macro}{\xinxi} -% 一行内显示考试时间和考试总分 -% \begin{macrocode} -%<*cls> -\newcommand\xinxi[2]{ - \def\@zongfen{#1} - \def\@shijian{#2} -} -\newcommand\mininotice{ - \begin{center}{ - \kaishu (本试卷满分~\@zongfen~分, 考试时间~\@shijian~分钟)} - \end{center} -} -% -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\notice} -% 注意事项 -% \begin{macrocode} -%<*cls> -\newcommand{\notice}{ - \heiti 注意事项: \songti - \begin{enumerate} - \item 答卷前, 考生务必将姓名、高考准考证号、校验码等填写清楚. - \item 本试卷共~\numquestions{}~道试题, 满分~\@zongfen~分,考试时间~\@shijian~分钟. - \end{enumerate} -} -% -% \end{macrocode} -%\end{macro} -% -% \begin{macro}{\pingfen} -% 前评分框 -% \begin{macrocode} -%<*cls> -\newlength\@boxwidth -\setlength\@boxwidth{0ex} -\if@printbox \setlength\@boxwidth{18ex} \fi -\newcommand\pinfen{ - \heiti - \begin{minipage}{\@boxwidth} - \begin{tabular}{|c|c|} - \hline - 得分 & 评卷人\\ - \hline - & \\ - \hline - \end{tabular} - \end{minipage} -} -% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\houpinfen} -% 后评分框 -% \begin{macrocode} -%<*cls> -\newcommand{\houpinfen}{ - \hfill - \begin{tabular}{|l|l|} - \hline - 得分 & \hspace*{1.5cm}\\ - \hline - \end{tabular} - \bigskip -} -% -% \end{macrocode} -% \end{macro} -% -% -% 一些参数及变量 -% \begin{macrocode} -%<*cfg> -\def\@biaoti{2011年全国普通高等学校招生统一考试(上海卷)} -\def\@fubiaoti{数学(理科)} -\def\@zongfen{150} -\def\@shijian{120} -\def\@tiankong@zongfen{56} -\def\@tiankong@tishu{14} -\def\@tiankong@fen{4} -\def\@xuanze@zongfen{16} -\def\@xuanze@tishu{4} -\def\@xuanze@fen{4} -\def\@jianda@zongfen{78} -\def\@jianda@tishu{5} -% -%<*cls> -\newcounter{@dati} -\newif\if@houpinfen \@houpinfenfalse -% -% \end{macrocode} -% -% 填空题提示语 -% \begin{macro}{\tiankong} -% \begin{macrocode} -%<*cls> -\newcommand\settk[3]{ - \def\@tiankong@zongfen{#1} - \def\@tiankong@tishu{#2} - \def\@tiankong@fen{#3} -} -\newcommand\tiankong{ - \@houpinfenfalse - \stepcounter{@dati} - \fullwidth{ - \if@printbox \pinfen \fi - \begin{minipage}{\textwidth-\@boxwidth} - \heiti \chinese{@dati}. 填空题:本大题共~\@tiankong@tishu~题,满分~\@tiankong@zongfen~分. 请在横线上方填写最终的、最准确的、最完整的结果. 每题填写正确得~\@tiankong@fen~分,否则一律得0分. - \end{minipage} - } -} -% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\stk} -% \begin{macro}{\mtk} -% \begin{macro}{\ltk} -% \changes{v0.3}{2014/02/18}{设置三种长度的横线,并支持在横线上输出答案} -% 填空题横线 -% \begin{macrocode} -%<*cls> -\newcommand{\stk}[1]{ - \ifprintanswers - \underline{~#1~} - \else - \underline{~\hspace{1cm}~} - \fi} -\newcommand{\mtk}[1]{ - \ifprintanswers - \underline{~#1~} - \else - \underline{~\hspace{2cm}~} - \fi} -\newcommand{\ltk}[1]{ - \ifprintanswers - \underline{~#1~} - \else - \underline{~\hspace{3cm}~} - \fi} -% -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% 选择题提示语 -% \begin{macro}{\xuanze} -% \begin{macrocode} -%<*cls> -\newcommand\setxz[3]{ - \def\@xuanze@zongfen{#1} - \def\@xuanze@tishu{#2} - \def\@xuanze@fen{#3} -} -\newcommand\xuanze{ - \@houpinfenfalse - \stepcounter{@dati} - \fullwidth{ - \if@printbox \pinfen \fi - \begin{minipage}{\textwidth-\@boxwidth} - \heiti \chinese{@dati}. 选择题:本大题共~\@xuanze@tishu~题,满分~\@xuanze@zongfen~分. 请选择你认为最正确的答案(每小题有且只有一个)写在括号内. 每题填写正确得~\@xuanze@fen~分,否则得0分. - \end{minipage} - } -} -% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\onech} -% \begin{macro}{\twoch} -% \begin{macro}{\fourch} -% \changes{v0.3}{2014/02/18}{分一行、两行、四行显示选项} -% 选择题的选项 -% \begin{macrocode} -%<*cls> -\newcommand{\onech}[4]{ -\renewcommand\arraystretch{1.4} -\begin{tabularx}{\linewidth}{XXXX} -\setlength\tabcolsep{0pt} -(A) #1 & (B) #2 & (C) #3 & (D) #4 \\ -\end{tabularx} -\unskip \unskip} -\newcommand{\twoch}[4]{ -\renewcommand\arraystretch{1.4} -\begin{tabularx}{\linewidth}{XX} -\setlength\tabcolsep{0pt} -(A) #1 & (B) #2 \\ -(C) #3 & (D) #4 -\end{tabularx} -\unskip \unskip} -\newcommand{\fourch}[4]{ -\renewcommand\arraystretch{1.4} -\begin{tabularx}{\linewidth}{X} -\setlength\tabcolsep{0pt} -(A) #1 \\ -(B) #2 \\ -(C) #3 \\ -(D) #4 \\ -\end{tabularx} -\unskip \unskip} -% -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% 简答题提示语 -% \begin{macro}{\jianda} -% \begin{macrocode} -%<*cls> -\newcommand\setjd[2]{ - \def\@jianda@zongfen{#1} - \def\@jianda@tishu{#2} -} -\newcommand\jianda{ - \@cancelspacefalse - \@houpinfentrue - \stepcounter{@dati} - \fullwidth{ - \if@printbox \pinfen \fi - \begin{minipage}{\textwidth-\@boxwidth} - \heiti \chinese{@dati}. 简答题:本大题共~\@jianda@tishu~题,满分~\@jianda@zongfen~分. 请在题后空处写出必要的推理计算过程. - \end{minipage} - } -} -% -% \end{macrocode} -% \end{macro} -% -% 数学运算符号、单位 -% \begin{macrocode} -%<*cls> -\delimitershortfall-1sp -\newcommand\abs[1]{\left|#1\right|} -\renewcommand{\geq}{\geqslant} -\renewcommand{\ge}{\geqslant} -\renewcommand{\leq}{\leqslant} -\renewcommand{\le}{\leqslant} -%<\cls> -% \end{macrocode} -% -% 读取配置文件 -% \begin{macrocode} -%<*cls> -\AtEndOfPackage{\makeatletter\input{BHCexam.cfg}\makeatother} -% -% \end{macrocode} -% -% - -% \Finale -% -% \setcounter{IndexColumns}{2} -% \IndexPrologue{\section*{索引}} -% -% \GlossaryPrologue{\section*{版本更新}} -% -% \PrintIndex \PrintChanges -\endinput - -\EnableCrossrefs diff --git a/macros/latex/contrib/bhcexam/BHCexam.ins b/macros/latex/contrib/bhcexam/BHCexam.ins deleted file mode 100644 index 16f9828539..0000000000 --- a/macros/latex/contrib/bhcexam/BHCexam.ins +++ /dev/null @@ -1,107 +0,0 @@ -%% -%% This file will generate fast loadable files and documentation -%% driver files from the doc files in this package when run through -%% LaTeX or TeX. It works with Docstrip versions after April 1998. -%% -%% Copyright (C) 2011 by Charles Bao -%% -%% This file is part of the BHCexam package project. -%% --------------------------------------------------- -%% -%% It may be distributed under the conditions of the LaTeX Project Public -%% License, either version 1.2 of this license or (at your option) any -%% later version. The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.2 or later is part of all distributions of LaTeX -%% version 1999/12/01 or later. -%% -%% In particular, NO PERMISSION is granted to modify the contents of this -%% file since it contains the legal notices that are placed in the files -%% it generates. -%% -%% -%% -%% -%% --------------- start of docstrip commands ------------------ -%% - -\input docstrip - -\preamble - -This is a generated file. - -Copyright (C) 2011 by Charles Bao - -This file was generated from file(s) of the BHCexam package project. ----------------------------------------------------------------------- - -It may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.2 -of this license or (at your option) any later version. -The latest version of this license is in - http://www.latex-project.org/lppl.txt -and version 1.2 or later is part of all distributions of LaTeX -version 1999/12/01 or later. - -This file may only be distributed together with a copy of original -source files. You may however distribute original source files -without such generated files. Copying of this file is authorized -only if either: -(1) you make absolutely no changes to your copy, including name; OR -(2) if you do make changes, you first rename it to some other name. - -To produce the documentation run the original source files ending -with `.dtx' through LaTeX. - -\endpreamble - -\declarepreamble\cfgpreamble - -This is a generated file. - -Copyright (C) 2014 by Charles Bao - -This file was generated from file(s) of the BHCexam package project. ----------------------------------------------------------------------- - -It may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.2 -of this license or (at your option) any later version. -The latest version of this license is in - http://www.latex-project.org/lppl.txt -and version 1.2 or later is part of all distributions of LaTeX -version 1999/12/01 or later. - -This is the configuration file of the BHCexam package with LaTeX2e. - -\endpreamble - -\askonceonly -\keepsilent -\usedir{tex/latex/BHCexam} - -\generate{\file{BHCexam.cls}{\from{BHCexam.dtx}{cls}} - \usepreamble\cfgpreamble - \file{BHCexam.cfg}{\from{BHCexam.dtx}{cfg}} - } - -\ifToplevel{ -\Msg{***********************************************************} -\Msg{*} -\Msg{* To finish the installation you have to move the following} -\Msg{* files into a directory searched by TeX:} -\Msg{*} -\Msg{* The recommended directory is TEXMF/tex/latex/BHCexam} -\Msg{*} -\Msg{* \space\space BHCexam.cls} -\Msg{* \space\space BHCexam.cfg} -\Msg{*} -\Msg{* To produce the documentation run the files ending with} -\Msg{* `.dtx' through LaTeX.} -\Msg{*} -\Msg{* Happy TeXing} -\Msg{***********************************************************} -} - -\endbatchfile diff --git a/macros/latex/contrib/bhcexam/Makefile b/macros/latex/contrib/bhcexam/Makefile deleted file mode 100644 index 667c242491..0000000000 --- a/macros/latex/contrib/bhcexam/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -PACKAGE = BHCexam -######################################################################## -## LaTeX2e Makefile -## -## Update the following defines for your local configuration, -## -TEXMFDIR = ~/texmf/tex/latex/BHCexam -GZIP = gzip -XELATEX = xelatex -PDFLATEX = pdflatex -MAKEINDEX = makeindex -######################################################################## -## make [all] Generates the class(.cls) file, the configuration(.cfg) -## file and the documentation (.pdf). If you don't have -## the required MAKEINDEX (along with `gglo.ist' and -## `gind.ist'), then change the first dependency -## of "all" from "fullpdf" to "pdf" below. -## make [un]install Install or uninstall the class(.cls) file and -## the configuration(.cfg) file. -## make [very]clean Clean out various auxillary files. "veryclean" -## cleans out more stuff. -######################################################################## -## make [full]doc Generate the documentation. The "fulldoc" version -## adds the change log and the cross-references. -## make idx Generate the change log and the cross-references -## (for fulldoc -- requires MAKEINDEX). -## make cls Generate the class(.cls) file and the -## configuration(.cfg) file. - -######################################################################## -## make test Run test file(s) -## make src Builds a src distribution (.tar.gz) file. -## make distribtion Builds a distribution (.tar.gz) file. -######################################################################## - -all: veryclean cls fulldoc test clean - -install: cls - cp $(PACKAGE).{cls,cfg} $(TEXMFDIR) -uninstall: ; rm $(TEXMFDIR)/$(PACKAGE).{cls,cfg} -clean: ; -rm -f *.dvi *.log *.aux *.lof *.lot *.toc - -rm -f *.idx *.ind *.glo *.gls *.ilg *.out *~ -veryclean: ; -rm -f *.dvi *.log *.aux *.lof *.lot *.toc - -rm -f *.idx *.ind *.glo *.gls *.ilg *.out - -rm -f *.idx *.ind *.glo *.gls *.ilg *.out - -rm -f *.sty *.cls *.pdf *pk *.cfg *.tar *~ - - -doc: ; $(XELATEX) $(PACKAGE).dtx - -cls: ; $(XELATEX) $(PACKAGE).ins - -fulldoc: doc $(PACKAGE).gls $(PACKAGE).ind - $(XELATEX) $(PACKAGE).dtx - -src: ; mkdir $(PACKAGE) - cp -p README Makefile $(PACKAGE) - cp -p $(PACKAGE).dtx $(PACKAGE).ins $(PACKAGE) - cp -p test*.tex $(PACKAGE) - tar -cvf $(PACKAGE)-src.tar ./$(PACKAGE) - rm -rf $(PACKAGE) - $(GZIP) -9 $(PACKAGE)-src.tar - -distribution: veryclean cls fulldoc test clean - mkdir $(PACKAGE) - cp -p $(PACKAGE).cls $(PACKAGE).cfg $(PACKAGE) - cp -p *.tex $(PACKAGE) - cp -p *.pdf $(PACKAGE) - tar -cvf $(PACKAGE).tar ./$(PACKAGE) - rm -rf $(PACKAGE) - $(GZIP) -9 $(PACKAGE).tar - -$(PACKAGE).gls: doc - $(MAKEINDEX) -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo - -$(PACKAGE).ind: doc - $(MAKEINDEX) -s gind.ist -o $(PACKAGE).ind $(PACKAGE).idx - -test: cls - $(XELATEX) test1.tex - $(XELATEX) test1.tex - $(XELATEX) test2.tex - $(XELATEX) test2.tex - $(XELATEX) test3.tex - $(XELATEX) test3.tex - $(XELATEX) test4.tex - $(XELATEX) test4.tex - diff --git a/macros/latex/contrib/bhcexam/README b/macros/latex/contrib/bhcexam/README deleted file mode 100644 index 73804a8a61..0000000000 --- a/macros/latex/contrib/bhcexam/README +++ /dev/null @@ -1,21 +0,0 @@ -This is version 0.4 of the BHCexam document class, dated Oct 10, 2015. - -The BHCexam document class attempts to make it easy for even a LaTeX novice to prepare exams. - -To generate the document class files from .dtx file: -make cls; - -To install the document class files to ~/texmf -make install; - -To generate the user's guide document (with index) -make [full]doc; - -To generate test page -make test - --------------------------------------------------------------------- - -This work may be distributed and/or modified under the conditions of -the LaTeX Project Public License, either version 1.3 of this license -or (at your option) any later version. diff --git a/macros/latex/contrib/bhcexam/test1.tex b/macros/latex/contrib/bhcexam/test1.tex deleted file mode 100644 index 01fc0b2035..0000000000 --- a/macros/latex/contrib/bhcexam/test1.tex +++ /dev/null @@ -1,143 +0,0 @@ -\documentclass[printbox,marginline,noindent,adobefonts]{BHCexam} -\begin{document} -\printmlol -\maketitle - -\begin{questions} -\tiankong -\question 已知~$\bm{a}=(k,-9)$、$\bm{b}=(-1,k)$, $\bm{a}$~与~$\bm{b}$~为平行向量, - 则~$k=$\stk{$\pm3$}. - -\question 若函数~$f(x)=x^{6m^2-5m-4}\,(m\in\mathbb{Z})$~的图像关于~$y$~轴对称, - 且~$f(2)a>0$), 若再添加~$m\text{g}$~糖~($m>0$), - - -\question 已知~$f(x)=1-\textbf{c}_8^1x+\textbf{c}_8^2x^2-\textbf{c}_8^3x^3+\cdots+\textbf{c}_8^8x^8$, - 则~$f\big(\dfrac{1}{2}+\dfrac{\sqrt{3}}{2}\textbf{i}\big)$~的值是\ltk{$-\dfrac{1}{2}-\dfrac{\sqrt{3}}{2}\textbf{i}$}. - -\question 自然数~$1,2,3,\ldots,10$~的方差记为~$\sigma^2$, - 其中的偶数~$2,4,6,8,10$~的方差记为~$\sigma_1^2$, - 则~$\sigma^2$~与~$\sigma_1^2$~的大小关系为~$\sigma^2$\stk{$>$}$\sigma_1^2$. - -\question 若~$\theta$~为三角形的一个内角, 且~$\sin\theta+\cos\theta=\dfrac{2}{3}$, - 则方程~$x^2\csc\theta-y^2\sec\theta=1$~表示的曲线的焦点坐标是\stk{$\big(\pm\dfrac{\sqrt{6}}{3},0\big)$}. - - -\question 高为~$h$~的棱锥被平行于棱锥底面的截得棱台侧面积是 - 原棱锥的侧面积的~$\dfrac{5}{9}$, - 则截得的棱台的体积与原棱锥的体积之比是\stk{$19:27$}. - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\newpage - -\xuanze -\question 已知集合~$A=\{x\mid \abs{x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\question 已知集合~$A=\{x\mid \abs{x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\newpage -\jianda -\question 已知复数~$z$ 满足:$\abs{z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[7] 求复数~$z$; -\part[7] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~$\abs{z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part $\abs{z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\question[14] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage - -\question[16] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage -\question 已知复数~$z$ 满足:$\abs{z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[8] 求复数~$z$; -\part[8] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~$\abs{z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part $\abs{z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\newpage - -\question[18] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\end{questions} -\end{document} diff --git a/macros/latex/contrib/bhcexam/test2.tex b/macros/latex/contrib/bhcexam/test2.tex deleted file mode 100644 index 8dac567787..0000000000 --- a/macros/latex/contrib/bhcexam/test2.tex +++ /dev/null @@ -1,144 +0,0 @@ -\documentclass[16kpaper]{BHCexam} -\begin{document} - -\maketitle -\mininotice - -\begin{questions} -\tiankong -\question 已知~$\bm{a}=(k,-9)$、$\bm{b}=(-1,k)$, $\bm{a}$~与~$\bm{b}$~为平行向量, - 则~$k=$\stk{$\pm3$}. - -\question 若函数~$f(x)=x^{6m^2-5m-4}\,(m\in\mathbb{Z})$~的图像关于~$y$~轴对称, - 且~$f(2)a>0$), 若再添加~$m\text{g}$~糖~($m>0$), - - -\question 已知~$f(x)=1-\textbf{c}_8^1x+\textbf{c}_8^2x^2-\textbf{c}_8^3x^3+\cdots+\textbf{c}_8^8x^8$, - 则~$f\big(\dfrac{1}{2}+\dfrac{\sqrt{3}}{2}\textbf{i}\big)$~的值是\ltk{$-\dfrac{1}{2}-\dfrac{\sqrt{3}}{2}\textbf{i}$}. - -\question 自然数~$1,2,3,\ldots,10$~的方差记为~$\sigma^2$, - 其中的偶数~$2,4,6,8,10$~的方差记为~$\sigma_1^2$, - 则~$\sigma^2$~与~$\sigma_1^2$~的大小关系为~$\sigma^2$\stk{$>$}$\sigma_1^2$. - -\question 若~$\theta$~为三角形的一个内角, 且~$\sin\theta+\cos\theta=\dfrac{2}{3}$, - 则方程~$x^2\csc\theta-y^2\sec\theta=1$~表示的曲线的焦点坐标是\stk{$\big(\pm\dfrac{\sqrt{6}}{3},0\big)$}. - - -\question 高为~$h$~的棱锥被平行于棱锥底面的截得棱台侧面积是 - 原棱锥的侧面积的~$\dfrac{5}{9}$, - 则截得的棱台的体积与原棱锥的体积之比是\stk{$19:27$}. - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\newpage - -\xuanze -\question 已知集合~$A=\{x\mid \abs{x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\question 已知集合~$A=\{x\mid \abs{x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\newpage -\jianda -\question 已知复数~$z$ 满足:$\abs{z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[7] 求复数~$z$; -\part[7] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~$\abs{z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part $\abs{z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\question[14] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage - -\question[16] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage -\question 已知复数~$z$ 满足:$\abs{z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[8] 求复数~$z$; -\part[8] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~$\abs{z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part $\abs{z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\newpage - -\question[18] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\end{questions} -\end{document} diff --git a/macros/latex/contrib/bhcexam/test3.tex b/macros/latex/contrib/bhcexam/test3.tex deleted file mode 100644 index 0748babf7a..0000000000 --- a/macros/latex/contrib/bhcexam/test3.tex +++ /dev/null @@ -1,144 +0,0 @@ -\documentclass[answers]{BHCexam} -\begin{document} - -\maketitle -\mininotice - -\begin{questions} -\tiankong -\question 已知~$\bm{a}=(k,-9)$、$\bm{b}=(-1,k)$, $\bm{a}$~与~$\bm{b}$~为平行向量, - 则~$k=$\stk{$\pm3$}. - -\question 若函数~$f(x)=x^{6m^2-5m-4}\,(m\in\mathbb{Z})$~的图像关于~$y$~轴对称, - 且~$f(2)a>0$), 若再添加~$m\text{g}$~糖~($m>0$), - - -\question 已知~$f(x)=1-\textbf{c}_8^1x+\textbf{c}_8^2x^2-\textbf{c}_8^3x^3+\cdots+\textbf{c}_8^8x^8$, - 则~$f\big(\dfrac{1}{2}+\dfrac{\sqrt{3}}{2}\textbf{i}\big)$~的值是\ltk{$-\dfrac{1}{2}-\dfrac{\sqrt{3}}{2}\textbf{i}$}. - -\question 自然数~$1,2,3,\ldots,10$~的方差记为~$\sigma^2$, - 其中的偶数~$2,4,6,8,10$~的方差记为~$\sigma_1^2$, - 则~$\sigma^2$~与~$\sigma_1^2$~的大小关系为~$\sigma^2$\stk{$>$}$\sigma_1^2$. - -\question 若~$\theta$~为三角形的一个内角, 且~$\sin\theta+\cos\theta=\dfrac{2}{3}$, - 则方程~$x^2\csc\theta-y^2\sec\theta=1$~表示的曲线的焦点坐标是\stk{$\big(\pm\dfrac{\sqrt{6}}{3},0\big)$}. - - -\question 高为~$h$~的棱锥被平行于棱锥底面的截得棱台侧面积是 - 原棱锥的侧面积的~$\dfrac{5}{9}$, - 则截得的棱台的体积与原棱锥的体积之比是\stk{$19:27$}. - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\newpage - -\xuanze -\question 已知集合~$A=\{x\mid {x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\question 已知集合~$A=\{x\mid {x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\newpage -\jianda -\question 已知复数~$z$ 满足:${z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[7] 求复数~$z$; -\part[7] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~${z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part ${z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\question[14] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage - -\question[16] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage -\question 已知复数~$z$ 满足:${z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[8] 求复数~$z$; -\part[8] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~${z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part ${z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\newpage - -\question[18] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\end{questions} -\end{document} diff --git a/macros/latex/contrib/bhcexam/test4.tex b/macros/latex/contrib/bhcexam/test4.tex deleted file mode 100644 index 17a5ef8f9b..0000000000 --- a/macros/latex/contrib/bhcexam/test4.tex +++ /dev/null @@ -1,144 +0,0 @@ -\documentclass[UTF8,printbox]{BHCexam} -\begin{document} - -\maketitle -\notice - -\begin{questions} -\tiankong -\question 已知~$\bm{a}=(k,-9)$、$\bm{b}=(-1,k)$, $\bm{a}$~与~$\bm{b}$~为平行向量, - 则~$k=$\stk{$\pm3$}. - -\question 若函数~$f(x)=x^{6m^2-5m-4}\,(m\in\mathbb{Z})$~的图像关于~$y$~轴对称, - 且~$f(2)a>0$), 若再添加~$m\text{g}$~糖~($m>0$), - - -\question 已知~$f(x)=1-\textbf{c}_8^1x+\textbf{c}_8^2x^2-\textbf{c}_8^3x^3+\cdots+\textbf{c}_8^8x^8$, - 则~$f\big(\dfrac{1}{2}+\dfrac{\sqrt{3}}{2}\textbf{i}\big)$~的值是\ltk{$-\dfrac{1}{2}-\dfrac{\sqrt{3}}{2}\textbf{i}$}. - -\question 自然数~$1,2,3,\ldots,10$~的方差记为~$\sigma^2$, - 其中的偶数~$2,4,6,8,10$~的方差记为~$\sigma_1^2$, - 则~$\sigma^2$~与~$\sigma_1^2$~的大小关系为~$\sigma^2$\stk{$>$}$\sigma_1^2$. - -\question 若~$\theta$~为三角形的一个内角, 且~$\sin\theta+\cos\theta=\dfrac{2}{3}$, - 则方程~$x^2\csc\theta-y^2\sec\theta=1$~表示的曲线的焦点坐标是\stk{$\big(\pm\dfrac{\sqrt{6}}{3},0\big)$}. - - -\question 高为~$h$~的棱锥被平行于棱锥底面的截得棱台侧面积是 - 原棱锥的侧面积的~$\dfrac{5}{9}$, - 则截得的棱台的体积与原棱锥的体积之比是\stk{$19:27$}. - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\question 若~$\sqrt{\,\sin x}$~是有理数且~$x$~不是~$\dfrac{\pi}{6}$~的整数倍, - 则~$x$~可能取的值是\mtk{$\arcsin\dfrac{1}{4}$ 等}.(只要求写出一个) - -\question 马路上有编号~1~到~10~的~10~盏路灯, 为节约用电又不影响照明, - 可以关掉其中的~3~盏, 但又不能同时关掉相邻的两盏, 也不能关掉两端的路灯, - 满足条件的关灯方法有\stk{$20$}种. - - -\question 以椭圆~$\dfrac{x^2}{169}+\dfrac{y^2}{144}=1$~的右焦点为圆心, - 且与双曲线~$\dfrac{x^2}{9}-\dfrac{y^2}{16}=1$~的渐近线相切的圆方程是\mtk{$(x-5)^2+y^2=16$}. - -\newpage - -\xuanze -\question 已知集合~$A=\{x\mid \abs{x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\question 已知集合~$A=\{x\mid \abs{x-1}<3 \}$, -集合~$B=\{y| y=x^2+2x+1,x\in\mathbb{R}\}$, 则~$A\cap -\complement_U B$~为\stk{C}. -\twoch{$[\,0,4)$}{$(-\infty,-2\,]\cup[4,+\infty)$}{$(-2,0)$}{$(0,4)$} - -\question 若~$a$、$b$~是直线, $\alpha$、$\beta$~是平面, -则以下命题中真命题是\stk{D}.\\ -\fourch{若~$a$、$b$~异面, $a\subset\alpha$,$b\subset\beta$, 且~$a\perp b$, 则~$\alpha\perp\beta$}{若~$a\parallel b$, $a\subset\alpha$, $b\subset\beta$,则~$\alpha\parallel\beta$}{若~$a\parallel \alpha$, -$b\subset\beta$, 则~$a$、$b$ 异面}{若~$a\perp b$, $a\perp\alpha$,$b\perp\beta$, 则~$\alpha\perp\beta$} - -\newpage -\jianda -\question 已知复数~$z$ 满足:$\abs{z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[7] 求复数~$z$; -\part[7] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~$\abs{z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part $\abs{z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\question[14] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage - -\question[16] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\newpage -\question 已知复数~$z$ 满足:$\abs{z}-z^*=\dfrac{10}{1-w\textbf{i}}$(其中~$z^*$ -是~$z$ 的共轭复数). -\begin{parts} -\part[8] 求复数~$z$; -\part[8] 若复数~$w=\cos\theta+\textbf{i}\sin\theta\,(\theta\in\mathbb{R})$, 求~$\abs{z-2}$ 的取值范围. -\end{parts} - -\begin{solution} -\begin{parts} -\part $z=3+4\textbf{i}$ -\part $\abs{z-w}\in[4,6]$ -\end{parts} -\end{solution} - -\newpage - -\question[18] 函数~$f(x)=4\sin\dfrac{\pi}{12}x\cdot\sin - \left(\dfrac{\pi}{2}+\dfrac{\pi}{12}x\right),x\in[a,a+1]$, - 其中常数~$a\in[0,5]$, 求函数~$f(x)$ 的最大值~$g(a)$. - -\begin{solution} -略 -\end{solution} - -\end{questions} -\end{document} diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf index a2dff6588f..950f44259d 100644 Binary files a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf and b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf differ diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index 5f7796fa90..5036e35a4f 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -12,6 +12,7 @@ \usepackage{tkz-euclide} \usetikzlibrary{hobby} \usepackage{siunitx} +\usepackage{fancyvrb} \usepackage{fancyhdr} %fancy \fancyhf{} @@ -54,8 +55,8 @@ \setlength{\parindent}{0pt} \definecolor{LightGray}{gray}{0.9} -\def\PLversion{1.1.8} -\def\PLdate{01 Août 2022} +\def\PLversion{1.2} +\def\PLdate{10 Août 2022} \tcbset{vignettes/.style={% nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,% @@ -225,6 +226,8 @@ Une commande pour déterminer des paramètres ($a$, $b$, $r$ et $r^2$) d'une ré Quelques commandes pour convertir bin/dec/hex avec certains détails. +Une commande pour, en \TikZ, créer un pixelart avec correction éventuelle. + \vspace{1.5cm} \hfill{}\textit{Merci à Anne pour ses retours et sa relecture !} @@ -2494,15 +2497,15 @@ La commande étant \og autonome \fg{}, elle va pouvoir être intégrée dans des \begin{codetex}[listing only] \begin{tikzpicture} - \begin{axis}[ - /pgf/number format/.cd,use comma,xmin = 1992, xmax = 2012,ymin = 1640, ymax = 1730, - width = 0.7\textwidth,height = 0.35\textwidth,xtick distance = 2,ytick distance = 10, - grid = both,minor tick num = 1,major grid style = {lightgray},minor grid style = {lightgray!25}, + \begin{axis}[/pgf/number format/.cd, + use comma,xmin = 1992, xmax = 2012,ymin = 1640, ymax = 1730,width = 0.7\textwidth, + height = 0.35\textwidth,xtick distance = 2,ytick distance = 10,grid = both, + minor tick num = 1,major grid style = {lightgray},minor grid style = {lightgray!25}, xlabel = {\small Année ($x$)},ylabel = {\small Altitude du glacier (en m) ($y$)}, x tick label style={/pgf/number format/.cd, set thousands separator={}}, y tick label style={/pgf/number format/.cd, set thousands separator={}}, legend cell align = {left},legend pos = north east] - \addplot[teal, only marks,forget plot] table{ + \addplot[teal, only marks] table{ X Y 1994 1718 1995 1710 @@ -2927,8 +2930,334 @@ Les valeurs \Cle{mainlevee=5mm et 0.6pt} donnent des résultats -- à mon sens - \newpage +\section{PixelART via un fichier csv, en \TikZ} + +\subsection{Introduction} + +\begin{codeidee} +L'idée est de \textit{proposer}, dans un environnement \TikZ, une commande permettant de générer des grilles PixelART. + +Les données sont \textit{lues} à partir d'un fichier \textsf{csv}, externe au fichier \textsf{tex} ou déclaré en interne grâce à l'environnement \ctex{filecontents}. +\end{codeidee} + +\begin{codeinfo} +Avant toute chose, quelques petites infos sur les données au format \textsf{csv}, surtout dans l'optique de sa lecture et de son traitement par \ctex{ProfLycee} : + +\begin{itemize} + \item le fichier de données \textsf{csv} doit être formaté avec le séparateur décimal \og , \fg ; + \item chaque ligne doit se terminer par \og \texttt{,ZZ} \fg{} (choix arbitraire de l'auteur, sinon il y a un \textsf{bug} non réglé pour le moment\ldots) ; + \item des cases vides seront codées par \og \texttt{-} \fg. +\end{itemize} + +Le fichier \textsf{csv} peut être déclaré directement dans le fichier \textsf{tex}, grâce à l'environnement \ctex{filecontents} (intégré en natif sur les dernières versions de \LaTeX) : + +\begin{Verbatim}[tabsize=2,fontsize=\scriptsize] +\begin{filecontents*}{.csv} +A,B,C,D,ZZ +A,B,D,C,ZZ +B,A,C,D,ZZ +B,A,D,C,ZZ +\end{filecontents*} +\end{Verbatim} + +À la compilation, le fichier \textsf{.csv} sera créé automatiquement, cependant toute modification dans le fichier \textsf{tex} ne sera pas répercutée dans le fichier\ldots +\end{codeinfo} + +\subsection{Package csvsimple et option} + +\begin{codeinfo} +Le package \textit{central} est ici \ctex{csvsimple}, qui permet de lire et traiter le fichier \textsf{csv}. + +Il est \og disponible \fg{} en version \LaTeXe{} ou en version \LaTeXIII. Par défaut, \ctex{ProfLycee} le charge en version \LaTeXIII{}, mais une \Cle{option} est disponible pour une \textit{rétro-compatibilité} avec la version \LaTeXe. + +\smallskip + +L'option \Cle{csvii} permet de passer l'appel au package en version \LaTeXe. +\end{codeinfo} + +\begin{codetex}[listing only] +\usepackage{ProfLycee} %chargement du package version 3 +%qui charge : +%\RequirePackage{expl3} +%\RequirePackage[l3]{csvsimple} + +\usepackage[csvii]{ProfLycee} %chargement du package version 2 +%qui charge : +%\RequirePackage[legacy]{csvsimple} +\end{codetex} + +\subsection{Exemple simple, clés et options} + +\begin{codetex}[listing only] +%déclaration du fichier csv +\begin{filecontents*}{basique.csv} +A,B,C,D,ZZ +A,B,D,C,ZZ +B,A,C,D,ZZ +B,A,D,C,ZZ +C,A,B,D,ZZ +\end{filecontents*} + +\begin{tikzpicture}%avec lettres + \PLpixelart[codes=ABCD,style=\large\sffamily]{basique.csv} +\end{tikzpicture} +\begin{tikzpicture}%avec chiffres + \PLpixelart[codes=ABCD,symboles={45,22,1,7},symb,style=\large\sffamily]{basique.csv} +\end{tikzpicture} +\begin{tikzpicture}%avec correction + \PLpixelart[codes=ABCD,couleurs={Black,Green,Yellow,Red},correction]{basique.csv} +\end{tikzpicture} +\end{codetex} + +\begin{codesortie} +\begin{filecontents*}{basique.csv} +A,B,C,D,ZZ +A,B,D,C,ZZ +B,A,D,C,ZZ +C,A,B,D,ZZ +\end{filecontents*} + +\begin{center} + \renewcommand\arraystretch{1.25} + \begin{tabular}{|c|c|c|c|} + \hline + \multicolumn{4}{|c|}{Notice} \\ \hline + A & B & C & D \\ \hline + 45 & 22 & 1 & 7 \\ \hline + Noir & Vert & Jaune & Rouge \\ \hline + \end{tabular} +\end{center} + +\hfill\begin{tikzpicture} + %avec lettres + \PLpixelart[codes=ABCD,style=\large\sffamily]{basique.csv} +\end{tikzpicture} +\begin{tikzpicture} + %avec chiffres + \PLpixelart[codes=ABCD,symboles={45,22,1,7},symb,style=\large\sffamily]{basique.csv} +\end{tikzpicture} +\begin{tikzpicture} + %avec correction + \PLpixelart[codes=ABCD,couleurs={Black,Green,Yellow,Red},correction]{basique.csv} +\end{tikzpicture}\hfill~ +\end{codesortie} + +\begin{codeinfo} +La commande \ctex{PLpixelart} nécessite de connaître : + +\begin{itemize} + \item le fichier \textsf{csv} à traiter ; + \item la liste (en fait sous forme de chaîne) des codes utilisés dans le fichier \textsf{csv} (comme \ctex{234679} ou \ctex{ABCDJK}\ldots); + \item la liste des symboles (éventuellement !) à afficher dans les cases s'il y a ambiguïté, comme \ctex{25,44,12} ou \ctex{AA,AB,AC}; + \item la liste des couleurs (si la correction est demandée), dans le même ordre que la liste des caractères. +\end{itemize} +\end{codeinfo} + +\begin{codetex}[listing only] +%environnement tikz +\PLpixelart[]{.csv} +\end{codetex} + +\begin{codecles} +Quelques \Cle{Clés} sont nécessaires au bon fonctionnement de la commande : + +\begin{itemize} + \item la clé \Cle{codes} contient la \textsf{chaîne} des codes \textit{simples} du fichier \textsf{csv} ; + \item la clé \Cle{couleurs} qui contient la \textsf{liste} des couleurs associées ; + \item la clé \Cle{symboles} qui contient la \textsf{liste éventuelles} des caractères alternatifs à afficher dans les cases ; + \item la clé booléenne \Cle{correction} qui permet de colorier le PixelART ;\hfill{}défaut \Cle{false} + \item la clé booléenne \Cle{symb} qui permet d'afficher les caractères \textit{alternatifs} ;\hfill{}défaut \Cle{false} + \item la clé \Cle{style} qui permet de spécifier le style des caractères. \hfill{}défaut \Cle{scriptsize} +\end{itemize} +\end{codecles} + +\begin{codetex}[listing only] +%codes simples et sans ambiguïté +%une case vide sera codée par - + +\begin{filecontents*}{perroquet.csv} +-,-,-,-,-,-,4,4,4,4,-,-,-,-,-,-,ZZ +-,-,-,-,4,4,1,1,1,1,4,4,-,-,-,-,ZZ +-,-,-,4,1,1,1,1,1,1,1,1,4,-,-,-,ZZ +-,-,4,1,1,1,1,1,1,1,1,1,1,4,-,-,ZZ +-,-,4,1,1,1,1,1,1,1,1,1,1,4,-,-,ZZ +-,4,1,9,9,1,1,1,1,1,1,9,9,1,4,-,ZZ +-,4,9,9,9,9,4,4,4,4,9,9,9,9,4,-,ZZ +-,4,9,4,9,9,4,4,4,4,9,4,9,9,4,-,ZZ +-,4,1,9,9,9,4,4,4,4,9,9,9,1,4,-,ZZ +-,-,4,1,1,9,4,4,4,4,9,1,1,4,-,-,ZZ +-,-,4,1,1,1,4,4,4,4,1,1,1,4,-,-,ZZ +-,-,-,4,1,1,1,4,4,1,1,1,4,-,-,-,ZZ +-,-,4,3,1,1,1,1,1,1,1,1,3,4,-,-,ZZ +-,4,6,3,1,1,1,1,1,1,1,1,3,6,4,-,ZZ +-,4,6,6,1,1,1,1,1,1,1,1,6,6,4,-,ZZ +-,4,6,6,1,1,1,1,1,1,1,1,6,6,4,-,ZZ +-,4,6,4,1,1,1,4,4,1,1,1,4,6,4,-,ZZ +2,2,4,2,4,4,4,2,2,4,4,4,2,4,2,2,ZZ +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,ZZ +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,ZZ +-,-,-,-,-,4,1,1,1,1,4,-,-,-,-,-,ZZ +-,-,-,-,-,-,4,1,1,4,-,-,-,-,-,-,ZZ +-,-,-,-,-,-,-,4,4,-,-,-,-,-,-,-,ZZ +\end{filecontents*} + +\begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=123469,style=\ttfamily]{perroquet.csv} +\end{tikzpicture} + +\begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=123469,couleurs={Red,Brown,Yellow,Black,Blue,White},correction]{perroquet.csv} +\end{tikzpicture} +\end{codetex} + +\subsection{Exemples complémentaires} + +\begin{codeinfo} +Les symboles affichés dans les cases sont situés aux nœuds de coordonnées $(c\,;\,-l)$ où $l$ et $c$ sont les numéros de ligne et de colonne correspondants à la position de la donnée dans le fichier \textsf{csv}. +\end{codeinfo} + +\begin{codesortie} +\begin{filecontents*}{perroquet.csv} +-,-,-,-,-,-,4,4,4,4,-,-,-,-,-,-,ZZ +-,-,-,-,4,4,1,1,1,1,4,4,-,-,-,-,ZZ +-,-,-,4,1,1,1,1,1,1,1,1,4,-,-,-,ZZ +-,-,4,1,1,1,1,1,1,1,1,1,1,4,-,-,ZZ +-,-,4,1,1,1,1,1,1,1,1,1,1,4,-,-,ZZ +-,4,1,9,9,1,1,1,1,1,1,9,9,1,4,-,ZZ +-,4,9,9,9,9,4,4,4,4,9,9,9,9,4,-,ZZ +-,4,9,4,9,9,4,4,4,4,9,4,9,9,4,-,ZZ +-,4,1,9,9,9,4,4,4,4,9,9,9,1,4,-,ZZ +-,-,4,1,1,9,4,4,4,4,9,1,1,4,-,-,ZZ +-,-,4,1,1,1,4,4,4,4,1,1,1,4,-,-,ZZ +-,-,-,4,1,1,1,4,4,1,1,1,4,-,-,-,ZZ +-,-,4,3,1,1,1,1,1,1,1,1,3,4,-,-,ZZ +-,4,6,3,1,1,1,1,1,1,1,1,3,6,4,-,ZZ +-,4,6,6,1,1,1,1,1,1,1,1,6,6,4,-,ZZ +-,4,6,6,1,1,1,1,1,1,1,1,6,6,4,-,ZZ +-,4,6,4,1,1,1,4,4,1,1,1,4,6,4,-,ZZ +2,2,4,2,4,4,4,2,2,4,4,4,2,4,2,2,ZZ +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,ZZ +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,ZZ +-,-,-,-,-,4,1,1,1,1,4,-,-,-,-,-,ZZ +-,-,-,-,-,-,4,1,1,4,-,-,-,-,-,-,ZZ +-,-,-,-,-,-,-,4,4,-,-,-,-,-,-,-,ZZ +\end{filecontents*} + +\begin{center} + \renewcommand\arraystretch{1.25} + \begin{tabular}{|c|c|c|c|c|c|} + \hline + \multicolumn{6}{|c|}{Notice} \\ \hline + 1 & 2 & 3 & 5 & 6 & 9 \\ \hline + Rouge & Marron & Jaune & Noir & Bleu & Blanc \\ \hline + \end{tabular} +\end{center} + +\begin{center} + \begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=123469,style=\ttfamily]{perroquet.csv} + \end{tikzpicture} + \begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=123469,couleurs={Red,Brown,Yellow,Black,Blue,White},correction]{perroquet.csv} + \end{tikzpicture} +\end{center} + +\begin{center} + \begin{tikzpicture}[x=0.35cm,y=0.35cm] + \draw[very thin,gray,xstep=1,ystep=1] (0,0) grid (17,-24) ; + \foreach \x in {0,1,...,17} \draw[very thin,gray] (\x,-3pt)--(\x,3pt) node[above,font=\scriptsize\sffamily] {\x} ; + \foreach \y in {0,-1,...,-24} \draw[very thin,gray] (3pt,\y)--(-3pt,\y) node[left,font=\scriptsize\sffamily] {\y} ; + \PLpixelart[codes=123469,couleurs={Red,Brown,Yellow,Black,Blue,White},correction]{perroquet.csv} + \filldraw[Blue] (14,-1) circle[radius=1] ; + \filldraw[Yellow] (14,-1) circle[radius=0.8] ; + \end{tikzpicture} +\end{center} +\end{codesortie} + +\pagebreak + +\begin{codetex}[listing only] +%codes avec ambiguïté + +\begin{filecontents*}{cap.csv} +-,-,-,-,-,-,-,-,D,-,D,-,D,-,-,-,-,-,-,-,-,-,ZZ +-,D,D,-,-,-,-,D,D,D,D,D,D,-,-,D,D,D,D,-,-,-,ZZ +D,-,-,D,-,D,D,F,F,F,F,F,F,D,D,-,-,-,-,D,-,-,ZZ +-,D,-,-,D,F,F,F,-,-,F,F,F,F,F,D,-,D,D,-,-,-,ZZ +-,-,D,D,F,F,F,-,F,F,-,F,F,F,F,F,D,D,-,-,-,-,ZZ +-,-,-,D,F,F,F,F,F,F,F,F,F,F,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,F,J,J,J,J,J,J,J,F,F,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,-,-,J,-,-,-,J,J,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,D,-,J,-,D,-,J,J,B,B,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,-,-,J,-,-,-,J,J,B,B,D,-,-,-,-,-,ZZ +-,-,-,D,C,J,J,J,J,J,J,J,J,C,C,C,D,-,-,-,-,-,ZZ +-,-,-,D,C,C,C,C,C,C,C,C,C,C,C,D,D,D,-,-,-,-,ZZ +-,-,-,D,C,C,C,D,D,D,D,D,D,C,D,A,A,A,D,-,-,-,ZZ +-,-,-,D,F,C,C,C,C,C,C,C,C,D,A,-,-,-,A,D,-,-,ZZ +-,-,-,D,F,C,F,C,C,C,C,F,D,A,-,A,A,A,-,A,D,-,ZZ +-,-,D,C,F,F,F,F,C,C,F,D,A,-,A,F,F,F,A,-,A,D,ZZ +-,-,D,C,F,F,F,F,F,F,F,D,A,-,A,F,-,F,A,-,A,D,ZZ +-,-,D,A,D,-,A,-,A,-,A,D,A,-,A,F,F,F,A,-,A,D,ZZ +-,-,-,D,D,-,A,-,A,-,A,-,D,A,-,A,A,A,-,A,D,-,ZZ +-,-,-,-,-,D,D,F,D,D,D,D,F,D,A,-,-,-,A,D,-,-,ZZ +-,-,-,-,-,-,D,A,D,-,-,D,-,-,D,A,A,A,D,-,-,-,ZZ +-,-,-,-,-,-,D,D,D,-,-,D,D,D,D,D,D,D,-,-,-,-,ZZ +\end{filecontents*} + +\begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=ABCDFJ,symboles={1,2,3,4,6,10},symb,style=\tiny\sffamily]{cap.csv} +\end{tikzpicture} + +\begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=ABCDFJ,couleurs={Red,Brown,Yellow,Black,Blue,Gray},correction]{cap.csv} +\end{tikzpicture} +\end{codetex} + +\begin{codesortie} +\begin{filecontents*}{cap.csv} +-,-,-,-,-,-,-,-,D,-,D,-,D,-,-,-,-,-,-,-,-,-,ZZ +-,D,D,-,-,-,-,D,D,D,D,D,D,-,-,D,D,D,D,-,-,-,ZZ +D,-,-,D,-,D,D,F,F,F,F,F,F,D,D,-,-,-,-,D,-,-,ZZ +-,D,-,-,D,F,F,F,-,-,F,F,F,F,F,D,-,D,D,-,-,-,ZZ +-,-,D,D,F,F,F,-,F,F,-,F,F,F,F,F,D,D,-,-,-,-,ZZ +-,-,-,D,F,F,F,F,F,F,F,F,F,F,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,F,J,J,J,J,J,J,J,F,F,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,-,-,J,-,-,-,J,J,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,D,-,J,-,D,-,J,J,B,B,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,-,-,J,-,-,-,J,J,B,B,D,-,-,-,-,-,ZZ +-,-,-,D,C,J,J,J,J,J,J,J,J,C,C,C,D,-,-,-,-,-,ZZ +-,-,-,D,C,C,C,C,C,C,C,C,C,C,C,D,D,D,-,-,-,-,ZZ +-,-,-,D,C,C,C,D,D,D,D,D,D,C,D,A,A,A,D,-,-,-,ZZ +-,-,-,D,F,C,C,C,C,C,C,C,C,D,A,-,-,-,A,D,-,-,ZZ +-,-,-,D,F,C,F,C,C,C,C,F,D,A,-,A,A,A,-,A,D,-,ZZ +-,-,D,C,F,F,F,F,C,C,F,D,A,-,A,F,F,F,A,-,A,D,ZZ +-,-,D,C,F,F,F,F,F,F,F,D,A,-,A,F,-,F,A,-,A,D,ZZ +-,-,D,A,D,-,A,-,A,-,A,D,A,-,A,F,F,F,A,-,A,D,ZZ +-,-,-,D,D,-,A,-,A,-,A,-,D,A,-,A,A,A,-,A,D,-,ZZ +-,-,-,-,-,D,D,F,D,D,D,D,F,D,A,-,-,-,A,D,-,-,ZZ +-,-,-,-,-,-,D,A,D,-,-,D,-,-,D,A,A,A,D,-,-,-,ZZ +-,-,-,-,-,-,D,D,D,-,-,D,D,D,D,D,D,D,-,-,-,-,ZZ +\end{filecontents*} + +\begin{center} + \begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=ABCDFJ,symboles={1,2,3,4,6,10},symb,style=\tiny\sffamily]{cap.csv} + \end{tikzpicture} + ~~ + \begin{tikzpicture}[x=0.35cm,y=0.35cm] + \PLpixelart[codes=ABCDFJ,couleurs={Red,Brown,Yellow,Black,Blue,Gray},correction]{cap.csv} + \end{tikzpicture} +\end{center} +\end{codesortie} + +\newpage + \section{Historique} +{\small \bverb|v1.2 |~:~~~~Correction d'un méchant bug sur Pixelart + +{\small \bverb|v1.1.9|~:~~~~Pixelart en \TikZ + {\small \bverb|v1.1.8|~:~~~~Style "Mainlevée" basique pour \TikZ {\small \bverb|v1.1.7|~:~~~~Conversions bin/hex/dec (basées sur \ctex{xintbinhex}) avec quelques détails diff --git a/macros/latex/contrib/proflycee/doc/basique.csv b/macros/latex/contrib/proflycee/doc/basique.csv new file mode 100644 index 0000000000..b15c24713c --- /dev/null +++ b/macros/latex/contrib/proflycee/doc/basique.csv @@ -0,0 +1,4 @@ +A,B,C,D,ZZ +A,B,D,C,ZZ +B,A,D,C,ZZ +C,A,B,D,ZZ diff --git a/macros/latex/contrib/proflycee/doc/cap.csv b/macros/latex/contrib/proflycee/doc/cap.csv new file mode 100644 index 0000000000..850d0c2152 --- /dev/null +++ b/macros/latex/contrib/proflycee/doc/cap.csv @@ -0,0 +1,22 @@ +-,-,-,-,-,-,-,-,D,-,D,-,D,-,-,-,-,-,-,-,-,-,ZZ +-,D,D,-,-,-,-,D,D,D,D,D,D,-,-,D,D,D,D,-,-,-,ZZ +D,-,-,D,-,D,D,F,F,F,F,F,F,D,D,-,-,-,-,D,-,-,ZZ +-,D,-,-,D,F,F,F,-,-,F,F,F,F,F,D,-,D,D,-,-,-,ZZ +-,-,D,D,F,F,F,-,F,F,-,F,F,F,F,F,D,D,-,-,-,-,ZZ +-,-,-,D,F,F,F,F,F,F,F,F,F,F,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,F,J,J,J,J,J,J,J,F,F,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,-,-,J,-,-,-,J,J,F,F,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,D,-,J,-,D,-,J,J,B,B,D,-,-,-,-,-,ZZ +-,-,-,D,J,-,-,-,J,-,-,-,J,J,B,B,D,-,-,-,-,-,ZZ +-,-,-,D,C,J,J,J,J,J,J,J,J,C,C,C,D,-,-,-,-,-,ZZ +-,-,-,D,C,C,C,C,C,C,C,C,C,C,C,D,D,D,-,-,-,-,ZZ +-,-,-,D,C,C,C,D,D,D,D,D,D,C,D,A,A,A,D,-,-,-,ZZ +-,-,-,D,F,C,C,C,C,C,C,C,C,D,A,-,-,-,A,D,-,-,ZZ +-,-,-,D,F,C,F,C,C,C,C,F,D,A,-,A,A,A,-,A,D,-,ZZ +-,-,D,C,F,F,F,F,C,C,F,D,A,-,A,F,F,F,A,-,A,D,ZZ +-,-,D,C,F,F,F,F,F,F,F,D,A,-,A,F,-,F,A,-,A,D,ZZ +-,-,D,A,D,-,A,-,A,-,A,D,A,-,A,F,F,F,A,-,A,D,ZZ +-,-,-,D,D,-,A,-,A,-,A,-,D,A,-,A,A,A,-,A,D,-,ZZ +-,-,-,-,-,D,D,F,D,D,D,D,F,D,A,-,-,-,A,D,-,-,ZZ +-,-,-,-,-,-,D,A,D,-,-,D,-,-,D,A,A,A,D,-,-,-,ZZ +-,-,-,-,-,-,D,D,D,-,-,D,D,D,D,D,D,D,-,-,-,-,ZZ diff --git a/macros/latex/contrib/proflycee/doc/perroquet.csv b/macros/latex/contrib/proflycee/doc/perroquet.csv new file mode 100644 index 0000000000..4bcbe1d191 --- /dev/null +++ b/macros/latex/contrib/proflycee/doc/perroquet.csv @@ -0,0 +1,23 @@ +-,-,-,-,-,-,4,4,4,4,-,-,-,-,-,-,ZZ +-,-,-,-,4,4,1,1,1,1,4,4,-,-,-,-,ZZ +-,-,-,4,1,1,1,1,1,1,1,1,4,-,-,-,ZZ +-,-,4,1,1,1,1,1,1,1,1,1,1,4,-,-,ZZ +-,-,4,1,1,1,1,1,1,1,1,1,1,4,-,-,ZZ +-,4,1,9,9,1,1,1,1,1,1,9,9,1,4,-,ZZ +-,4,9,9,9,9,4,4,4,4,9,9,9,9,4,-,ZZ +-,4,9,4,9,9,4,4,4,4,9,4,9,9,4,-,ZZ +-,4,1,9,9,9,4,4,4,4,9,9,9,1,4,-,ZZ +-,-,4,1,1,9,4,4,4,4,9,1,1,4,-,-,ZZ +-,-,4,1,1,1,4,4,4,4,1,1,1,4,-,-,ZZ +-,-,-,4,1,1,1,4,4,1,1,1,4,-,-,-,ZZ +-,-,4,3,1,1,1,1,1,1,1,1,3,4,-,-,ZZ +-,4,6,3,1,1,1,1,1,1,1,1,3,6,4,-,ZZ +-,4,6,6,1,1,1,1,1,1,1,1,6,6,4,-,ZZ +-,4,6,6,1,1,1,1,1,1,1,1,6,6,4,-,ZZ +-,4,6,4,1,1,1,4,4,1,1,1,4,6,4,-,ZZ +2,2,4,2,4,4,4,2,2,4,4,4,2,4,2,2,ZZ +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,ZZ +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,ZZ +-,-,-,-,-,4,1,1,1,1,4,-,-,-,-,-,ZZ +-,-,-,-,-,-,4,1,1,4,-,-,-,-,-,-,ZZ +-,-,-,-,-,-,-,4,4,-,-,-,-,-,-,-,ZZ diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index 7e32293bc5..1f3e210420 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,9 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2022/08/01 - v1.1.8 - Aide pour l'utilisation de LaTeX en lycée] +\ProvidesPackage{ProfLycee}[2022/08/10 - v1.2 - Aide pour l'utilisation de LaTeX en lycée] +% 1.2 Correction d'un méchant bug avec pixelart, erf... +% 1.1.9 Commande pour du pixelart en tikz (avec option csvii pour compatibilité) % 1.1.8 Ajout d'un style mainlevee pour tikz % 1.1.7 Ajout de commandes pour des conversions bin/dec/hex % 1.1.6 Ajout d'une commande pour déterminer les paramètres d'un régression linéaire par moindres carrés @@ -29,6 +31,8 @@ \DeclareOption{nominted}{\@nomintedtrue} \newif\if@build \@buildfalse \DeclareOption{build}{\@buildtrue} +\newif\if@csvii \@csviifalse +\DeclareOption{csvii}{\@csviitrue} \DeclareOption*{} \ProcessOptions\relax @@ -49,6 +53,12 @@ \RequirePackage{listofitems} \RequirePackage{tabularray} \RequirePackage{fontawesome5} +\if@csvii + \RequirePackage[legacy]{csvsimple} +\else + \RequirePackage{expl3} + \RequirePackage[l3]{csvsimple} +\fi %librairies tikz \usetikzlibrary{calc} \usetikzlibrary{decorations} @@ -1444,4 +1454,71 @@ mainlevee/.default={5mm et 0.6pt} } +%==============PixelArt TikZ=========== OK !! +\defKV[pixelarttkz]{% + codes=\def\PATlettres{#1},% + couleurs=\def\PATcouleurs{#1},% + symboles=\def\PATchiffres{#1},% + style=\def\PATtaille{#1} +} + +\setKVdefault[pixelarttkz]{% + style=\scriptsize,% + correction=false,% + symb=false +} + +\newcommand\PLpixelart[2][]{% + \useKVdefault[pixelarttkz] + \setKV[pixelarttkz]{#1} + %affichage du corrigé + \ifboolKV[pixelarttkz]{correction} + {% + \csvloop{file=#2,no head,command={% + \foreach \l [count=\n] in \csvline {% + \setsepchar{,} + \readlist\LCPA\PATcouleurs + \StrPosition{\PATlettres}{\l}[\pixcnt]% + \xintifboolexpr{\pixcnt>0}% + {% + \itemtomacro\LCPA[\pixcnt]\pixcol% + \draw[fill=\pixcol] ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) ;% + }% + {} + } + } + } + } + {% + \ifboolKV[pixelarttkz]{symb} + {%affichage du pixelart versions chiffres si besoin + \csvloop{file=#2,no head,command={% + \foreach \l [count=\n] in \csvline {% + \setsepchar{,} + \readlist\LCNA\PATchiffres + \StrPosition{\PATlettres}{\l}[\pixpos]% + \xintifboolexpr{\pixpos>0}% + {% + \itemtomacro\LCNA[\pixpos]\pixchf% + \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;% + } + {}% + } + } + } + } + {%affichage du pixelart versions lettres ou chiffres simples (<=9) + \csvloop{file=#2,no head,command={% + \foreach \l [count=\n] in \csvline {% + \IfSubStr{\PATlettres}{\l}% + {% + \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\l};} + {} + } + } + } + } + } +} + \endinput \ No newline at end of file diff --git a/macros/latex/contrib/simplebnf/LICENSE b/macros/latex/contrib/simplebnf/LICENSE index 3a0de6d06f..720f8374ba 100644 --- a/macros/latex/contrib/simplebnf/LICENSE +++ b/macros/latex/contrib/simplebnf/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright © 2019-2020 Jay Lee +Copyright © 2019-2022 Jay Lee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/macros/latex/contrib/simplebnf/simplebnf-doc.tex b/macros/latex/contrib/simplebnf/simplebnf-doc.tex index 30ea889f18..99ac96780b 100644 --- a/macros/latex/contrib/simplebnf/simplebnf-doc.tex +++ b/macros/latex/contrib/simplebnf/simplebnf-doc.tex @@ -32,10 +32,10 @@ \title{% \textsf{simplebnf} --- A simple package to format Backus-Naur form% - \footnote{This file describes v0.3.0.}} + \footnote{This file describes v0.3.1.}} \author{Jay Lee\footnote{E-mail: % \href{mailto:jaeho.lee@snu.ac.kr}{\texttt{jaeho.lee@snu.ac.kr}}}} -\date{2022/05/07} +\date{2022/05/08} \begin{document} \maketitle @@ -43,9 +43,24 @@ This package provides a simple way to typeset grammars written in Backus-Naur form (BNF). \begin{presentcommand} - \cmd{bnfexpr} \cmd{bnfannot} + \cmd{SimpleBNFDefEq} \end{presentcommand} -These commands are wrappers around \cmd{texttt} and \cmd{textit} respectively. +This command is used to typeset the definition symbol separate a nonterminal from its productions. It defaults to \SimpleBNFDefEq. It can be redefined to customized output using \verb|RenewDocumentCommand|. + +\begin{presentcommand} + \cmd{SimpleBNFDefOr} +\end{presentcommand} +This command is used to typeset the separator symbol between productions. It defaults to \SimpleBNFDefOr. It can be redefined to customized output using \verb|RenewDocumentCommand|. + +\begin{presentcommand} + \cmd{bnfexpr} +\end{presentcommand} +This command is used when typesetting the BNF nonterminal and productions. It defaults to a wrappers around \cmd{texttt}. It can be redefined to customized output using \verb|RenewDocumentCommand|. + +\begin{presentcommand} + \cmd{bnfannot} +\end{presentcommand} +This command is used when typesetting the annotations on nonterminals and productions. It defaults to a wrappers around \cmd{textit}. It can be redefined to customized output using \verb|RenewDocumentCommand|. \begin{presentcommand} \env{bnfgrammar}{text} diff --git a/macros/latex/contrib/simplebnf/simplebnf.sty b/macros/latex/contrib/simplebnf/simplebnf.sty index fd7b707ff7..ae4482c29b 100644 --- a/macros/latex/contrib/simplebnf/simplebnf.sty +++ b/macros/latex/contrib/simplebnf/simplebnf.sty @@ -13,18 +13,16 @@ \RequirePackage{mathtools} \ProvidesExplPackage {simplebnf} - {2022/05/07} - {0.3.0} + {2022/05/08} + {0.3.1} {A simple package to format Backus–Naur form} \cs_generate_variant:Nn \regex_split:nnNTF {nVNTF} \cs_generate_variant:Nn \regex_split:NnN {NVN} -\tl_new:N \g__simplebnf_defeq_tl -\tl_gset:Nn \g__simplebnf_defeq_tl { \ensuremath{\Coloneqq} } +\NewDocumentCommand\SimpleBNFDefEq{}{\ensuremath{\Coloneqq}} -\tl_new:N \g__simplebnf_defor_tl -\tl_gset:Nn \g__simplebnf_defor_tl { \ensuremath{|} } +\NewDocumentCommand\SimpleBNFDefOr{}{\ensuremath{|}} \seq_new:N \l__input_seq \seq_new:N \l__term_seq @@ -48,7 +46,7 @@ \bool_set_false:N \l__first_rhs } { - \tl_put_right:Nn \l__table_tl { \\ && \g__simplebnf_defor_tl & } + \tl_put_right:Nn \l__table_tl { \\ && \SimpleBNFDefOr & } } \tl_set:Nn \l_tmpa_tl { #1 } @@ -58,23 +56,30 @@ { \seq_pop_left:NNT \l_tmpa_seq \l_tmpa_tl { - \regex_replace_all:NnN \g_simplebnf_rhs_nb_r { \c{g__simplebnf_defor_tl} } \l_tmpa_tl - \tl_put_right:Nx \l__table_tl { \bnfexpr { \l_tmpa_tl } } + \regex_replace_all:NnN \g_simplebnf_rhs_nb_r { \c{SimpleBNFDefOr} } \l_tmpa_tl + % Expand only the local temporary variable. + \tl_put_right:No \l__table_tl + { + \exp_after:wN\bnfexpr\exp_after:wN{\l_tmpa_tl} & + } } - \tl_put_right:Nn \l__table_tl { & } - \seq_pop_left:NNT \l_tmpa_seq \l_tmpb_tl { - \tl_set:Nx \l_tmpb_tl { \bnfannot { \l_tmpb_tl } } - \tl_put_right:NV \l__table_tl \l_tmpb_tl + \regex_replace_once:nnN { ^\s+ } {} \l_tmpb_tl + \tl_put_right:No \l__table_tl + { + \exp_after:wN\bnfannot\exp_after:wN{\l_tmpb_tl} + } } } { - \regex_replace_all:NnN \g_simplebnf_rhs_nb_r { \c{g__simplebnf_defor_tl} } \l_tmpa_tl + \regex_replace_all:NnN \g_simplebnf_rhs_nb_r { \c{SimpleBNFDefOr} } \l_tmpa_tl - \tl_put_right:Nx \l__table_tl { \bnfexpr { \l_tmpa_tl } } - \tl_put_right:Nn \l__table_tl { & } + \tl_put_right:No \l__table_tl + { + \exp_after:wN\bnfexpr\exp_after:wN{\l_tmpa_tl} + } } } @@ -89,20 +94,21 @@ \regex_split:nVNTF { : } \l_tmpa_tl \l_tmpa_seq { \seq_pop_right:NN \l_tmpa_seq \l_tmpa_tl - \tl_put_right:Nx \l__table_tl + \regex_replace_once:nnN { ^\s+ } {} \l_tmpa_tl + \tl_put_right:No \l__table_tl { - \bnfannot{\l_tmpa_tl} + \exp_after:wN\bnfannot\exp_after:wN{\l_tmpa_tl} & } \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl - \tl_put_right:Nx \l__table_tl + \tl_put_right:No \l__table_tl { - & \bnfexpr { \l_tmpa_tl } + \exp_after:wN\bnfexpr\exp_after:wN{\l_tmpa_tl} } } { - \tl_put_right:Nx \l__table_tl + \tl_put_right:No \l__table_tl { - & \bnfexpr { \l_tmpa_tl } + \exp_after:wN&\exp_after:wN\bnfexpr\exp_after:wN{\l_tmpa_tl} } } } @@ -150,9 +156,9 @@ \seq_pop_left:NN \l__term_seq \l__keypairs_tl \simplebnf_typeset_lhs:n{\l__term_tl} - \tl_put_right:Nx \l__table_tl + \tl_put_right:Nn \l__table_tl { - & \g__simplebnf_defeq_tl & + & \SimpleBNFDefEq & } %% \l__keypairs_seq - (rhs:annot | rhs)... \regex_split:NVN \g_simplebnf_rhs_newline_r \l__keypairs_tl \l__keypairs_seq @@ -191,7 +197,7 @@ %% The MIT License (MIT) %% -%% Copyright © 2019-2020 Jay Lee +%% Copyright © 2019-2022 Jay Lee %% %% Permission is hereby granted, free of charge, to any person obtaining %% a copy of this software and associated documentation files (the "Software"), -- cgit v1.2.3