diff options
author | Karl Berry <karl@freefriends.org> | 2014-07-15 22:48:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-07-15 22:48:43 +0000 |
commit | 0c2cd6670307af5a6efc0b04eec1bbaec7d9688e (patch) | |
tree | 7a8a68d62a593d1f78ee46c0e2c717937db7ea29 /Master/texmf-dist/source/latex/exsol | |
parent | e4042723eabd6f9efb9b68034395b7d0ea999b82 (diff) |
exsol (15jul14)
git-svn-id: svn://tug.org/texlive/trunk@34620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/exsol')
-rw-r--r-- | Master/texmf-dist/source/latex/exsol/exsol.dtx | 63 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/exsol/exsol.ins | 4 |
2 files changed, 55 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/exsol/exsol.dtx b/Master/texmf-dist/source/latex/exsol/exsol.dtx index cd111e49251..d7b1527ee49 100644 --- a/Master/texmf-dist/source/latex/exsol/exsol.dtx +++ b/Master/texmf-dist/source/latex/exsol/exsol.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2012 by Walter Daems <walter.daems@ua.ac.be> +% Copyright (C) 2014 by Walter Daems <walter.daems@ua.ac.be> % % This work may be distributed and/or modified under the conditions of % the LaTeX Project Public License, either version 1.3 of this license @@ -30,12 +30,11 @@ %<driver>\ProvidesFile{exsol.dtx} %<package>\ProvidesPackage{exsol} %<package|driver> [2013/05/12 v0.6 ExSol - Exercises and Solutions package (DMW)] -\def\fileversion{0.6} -\def\filedate{2013/05/12} %<*driver> \documentclass[11pt]{ltxdoc} \usepackage[english]{babel} \usepackage[exercisesfontsize=small]{exsol} +\usepackage{metalogo} \EnableCrossrefs \CodelineIndex \RecordChanges @@ -48,6 +47,8 @@ \RecordChanges \newcommand{\exsol}{\textsf{ExSol}} \StopEventually{\PrintChanges\PrintIndex} +\def\fileversion{0.7} +\def\filedate{2014/07/14} \begin{document} \DocInput{exsol.dtx} \end{document} @@ -83,6 +84,7 @@ % \changes{v0.5}{2012/01/15}{. Added option to also send exercises to % solutions file} % \changes{v0.6}{2013/05/12}{. Prepared for CTAN publication} +% \changes{v0.7}{2014/07/14}{. Fixed UTF8 compatibility issues} % % \DoNotIndex{\newcommand,\newenvironment} % \setlength{\parindent}{0em} @@ -132,6 +134,9 @@ % from \textsf{fancyvrb} \cite{fancyvrb}. Therefore, all credits go to the % authors/maintainers of \textsf{fancyvrb}. % +% Thanks to Pieter Pareit and Pekka Pere for signaling problems and +% making suggestions for the documentation. +% % \section{Installation} % %%%%%%%%%%%%%%%%%%%%%% % Either you are a package manager and then you'll know how to @@ -144,7 +149,7 @@ % own TDS tree, regenerate your filename database and off you go. % In any case, make sure that \LaTeX{} finds the \texttt{exsol.sty} file. % -% The \exsol{} package uses some auxiliary packages: \textsf{fancyverb}, +% The \exsol{} package uses some auxiliary packages: \textsf{fancyvrb}, % \textsf{ifthen}, \textsf{kvoptions} and, optionally, % \textsf{babel}. Fetch them from CTAN \cite{CTAN} if your \TeX{} % distributor does not provide them. @@ -327,6 +332,15 @@ % % \rule{\linewidth}{.7pt} % +% \subsection{Tips and tricks} +% +% Just one for now: if you want to include the solutions all at the +% end of the current document, you need to explicitly close the +% solution stream before including it: +% \begin{verbatim} +% \closeout\solutionstream\input{\jobname.sol.tex} +% \end{verbatim} +% % \clearpage % % \section{Implementation} @@ -433,6 +447,26 @@ } % \end{macrocode} % +% +% +% \subsection{Detokenization in order to cope with utf8} +% +% Combining old-school \LaTeX{} (before \XeTeX{} and \LuaTeX{}) and +% UTF-8 is a pain. +% Detokenization has been suggested by Geoffrey Poore to solve issues +% with UTF-8 characters messing up the |fancyvrb| internals. +% \changes{v0.7}{2014/07/14}{Added detokenized writing} +% \begin{macrocode} +\newcommand{\GPES@write@detok}[1]{% + \immediate\write\exercisestream{\detokenize{#1}}}% +\newcommand{\GPSS@write@detok}[1]{% + \immediate\write\solutionstream{\detokenize{#1}}}% +\newcommand{\GPESS@write@detok}[1]{% + \GPES@write@detok{#1}% + \GPSS@write@detok{#1}}% +% \end{macrocode} +% +% % \section{The user environments} % % \begin{macro}{exercise} @@ -442,7 +476,7 @@ % \texttt{copyexercisesinsolution}) is set. The label can be % set by redefining the \cs{exercisename} macro, or by relying on % the \textsf{Babel} provisions. The code is almost litteraly -% taken from the \textsf{FancyVerb} package. +% taken from the \textsf{fancyvrb} package. % \begin{macrocode} \def\exercise{\FV@Environment{}{exercise}} \def\FVB@exercise{% @@ -464,10 +498,9 @@ \def\FV@Space{\space}% \FV@DefineTabOut \ifexsol@copyexercisesinsolutions - \def\FV@ProcessLine{\immediate\write\solutionstream{\FV@Line}% - \immediate\write\exercisestream}% + \let\FV@ProcessLine\GPESS@write@detok % \else - \def\FV@ProcessLine{\immediate\write\exercisestream}% + \let\FV@ProcessLine\GPES@write@detok % \fi \relax \let\FV@FontScanPrep\relax @@ -537,7 +570,7 @@ % the exercise that preceeded this solution. Theno label can be % set by redefining the \cs{solutionname} macro, or by relying on % the \textsf{Babel} provisions. The code is almost litteraly -% taken from the \textsf{FancyVerb} package. +% taken from the \textsf{fancyvrb} package. % \begin{macrocode} \def\solution{\FV@Environment{}{solution}} \def\FVB@solution{% @@ -555,7 +588,7 @@ \FV@DefineWhiteSpace \def\FV@Space{\space}% \FV@DefineTabOut - \def\FV@ProcessLine{\immediate\write\solutionstream}% + \let\FV@ProcessLine\GPSS@write@detok % \relax \let\FV@FontScanPrep\relax \let\@noligs\relax @@ -613,21 +646,31 @@ % and are willing to help me out by providing translations for other % languages, I'm very willing to incorporate them into the code. % +% \changes{v0.7}{2014/07/14}{Added Finnish language support} % \begin{macrocode} \addto\captionsdutch{% \renewcommand{\exercisename}{Oefening}% \renewcommand{\exercisesname}{Oefeningen}% \renewcommand{\solutionname}{Oplossing}% + \renewcommand{\solutionsname}{Oplossingen}% } \addto\captionsgerman{% \renewcommand{\exercisename}{Aufgabe}% \renewcommand{\exercisesname}{Aufgaben}% \renewcommand{\solutionname}{L\"osung}% + \renewcommand{\solutionsname}{L\"osungen}% } \addto\captionsfrench{% \renewcommand{\exercisename}{Exercice}% \renewcommand{\exercisesname}{Exercices}% \renewcommand{\solutionname}{Solution}% + \renewcommand{\solutionsname}{Solutions}% +} +\addto\captionsfinnish{ + \renewcommand{\exercisename}{Teht\"av\"a}% + \renewcommand{\exercisesname}{Teht\"avi\"a}% + \renewcommand{\solutionname}{Ratkaisu}% + \renewcommand{\solutionsname}{Ratkaisut}% } % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/exsol/exsol.ins b/Master/texmf-dist/source/latex/exsol/exsol.ins index b0b2608abb2..212df7f3583 100644 --- a/Master/texmf-dist/source/latex/exsol/exsol.ins +++ b/Master/texmf-dist/source/latex/exsol/exsol.ins @@ -1,4 +1,4 @@ -%% Copyright (C) 2012 by Walter Daems <walter.daems@ieee.org> +%% Copyright (C) 2014 by Walter Daems <walter.daems@ieee.org> %% %% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license @@ -27,7 +27,7 @@ This is a generated file. -Copyright (C) 2012 by Walter Daems <walter.daems@ieee.org> +Copyright (C) 2014 by Walter Daems <walter.daems@ieee.org> This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license |