diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/exsheets')
4 files changed, 133 insertions, 74 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/cntformats.sty b/Master/texmf-dist/tex/latex/exsheets/cntformats.sty index 84f599f41dc..dcf99e3b027 100644 --- a/Master/texmf-dist/tex/latex/exsheets/cntformats.sty +++ b/Master/texmf-dist/tex/latex/exsheets/cntformats.sty @@ -29,10 +29,10 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- -\def\cntfmts@date{2012/11/08} -\def\cntfmts@version{v0.4} +\def\@cntfmts@date{2012/11/08} +\def\@cntfmts@version{v0.4} -\ProvidesPackage{cntformats}[\cntfmts@date\space \cntfmts@version\space A different way to read counters.] +\ProvidesPackage{cntformats}[\@cntfmts@date\space \@cntfmts@version\space A different way to read counters.] \RequirePackage{etoolbox} % -------------------------------------------------------------------------- % message handling diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index 0aac0c3bf6f..d6dc571d378 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty @@ -31,8 +31,8 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % ---------------------------------------------------------------------------- -\def\exsheets@date{2012/12/18} -\def\exsheets@version{0.6} +\def\exsheets@date{2012/12/23} +\def\exsheets@version{0.6a} \RequirePackage { expl3 , xparse } \ProvidesExplPackage @@ -2210,6 +2210,7 @@ { \RequirePackage { translations } % translation for the exercises + \DeclareTranslationFallback { exsheets-exercise-name } { Exercise } \DeclareTranslation { English } { exsheets-exercise-name } { Exercise } \DeclareTranslation { British } { exsheets-exercise-name } { Exercise } \DeclareTranslation { American } { exsheets-exercise-name } { Exercise } @@ -2223,6 +2224,7 @@ \DeclareTranslation { Hungarian } { exsheets-exercise-name } { Gyakorol } \DeclareTranslation { Danish } { exsheets-exercise-name } { \O{}velse } % translation for the question + \DeclareTranslationFallback { exsheets-question-name } { Question } \DeclareTranslation { English } { exsheets-question-name } { Question } \DeclareTranslation { British } { exsheets-question-name } { Question } \DeclareTranslation { American } { exsheets-question-name } { Question } @@ -2236,6 +2238,7 @@ \DeclareTranslation { Hungarian } { exsheets-question-name } { Feladat } \DeclareTranslation { Danish } { exsheets-question-name } { Opgave } % translation for the solutions + \DeclareTranslationFallback { exsheets-solution-name } { Solution } \DeclareTranslation { English } { exsheets-solution-name } { Solution } \DeclareTranslation { British } { exsheets-solution-name } { Solution } \DeclareTranslation { American } { exsheets-solution-name } { Solution } @@ -2354,7 +2357,9 @@ HISTORY: counter-format=se.qu and [print] option 2012/12/18 v0.6 - variations, Hungarian translations, corrected Catalanian translations - +2012/12/23 v0.6a - bug fix: labels and items of {tasks} weren't joined at + their baselines + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_tasks.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_tasks.def index 3d36f2a435c..e5f9faf8311 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets_tasks.def +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_tasks.def @@ -117,13 +117,13 @@ { \l__exsheets_tasks_item_width_dim } { \__exsheets_tasks_setup: #2 } \coffin_typeset:Nnnnn \l__exsheets_tmpc_coffin - { l } { b } { 0pt } { 0pt } + { l } { T } { 0pt } { 0pt } } % the label: \hcoffin_set:Nn \l__exsheets_tmpb_coffin { \strut #1 } \coffin_attach:NnnNnnnn - \l__exsheets_tmpa_coffin { l } { t } - \l__exsheets_tmpb_coffin { l } { t } { -\l__exsheets_tasks_label_width_dim } { 0pt } + \l__exsheets_tmpa_coffin { l } { T } + \l__exsheets_tmpb_coffin { l } { T } { -\l__exsheets_tasks_label_width_dim } { 0pt } % typeset label & item: % need this when a new row starts: \int_compare:nT { \l__exsheets_tmpa_int = 1 } diff --git a/Master/texmf-dist/tex/latex/exsheets/translations.sty b/Master/texmf-dist/tex/latex/exsheets/translations.sty index 5164acaf08c..09338cc1452 100644 --- a/Master/texmf-dist/tex/latex/exsheets/translations.sty +++ b/Master/texmf-dist/tex/latex/exsheets/translations.sty @@ -29,8 +29,8 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- -\def\@trnslt@date{2012/11/08} -\def\@trnslt@version{v0.4} +\def\@trnslt@date{2012/12/23} +\def\@trnslt@version{v0.6} \ProvidesPackage{translations}[\@trnslt@date\space \@trnslt@version\space a simple translator] \RequirePackage{etoolbox} @@ -103,11 +103,43 @@ \@trnslt@warn@unknown@lang{#2}% \@trnslt@declare@language{#2}% }% + \lowercase{\@trnslt@if@dialect{#2}}{#2} + {% + \csletcs + {@trnslt@language@\@trnslt@language{#2}@dialect@#1} + {@trnslt@language@\@trnslt@language{#2}@dialect@#2}% + } + {}% + \csletcs{@trnslt@language@#1}{@trnslt@language@#2}} + +% TODO: nur eine Notlösung bis es eine echte gibt: +% #1: dialect +% #2: language +\newrobustcmd*\DeclareLanguageDialect[2]{% + \@trnslt@declare@languagedialect{#1}{#2}} +\@onlypreamble\DeclareLanguageDialect + +\def\@trnslt@declare@languagedialect#1#2{% + \ifcsdef{@trnslt@language@#2} + {}{% + \@trnslt@warn@unknown@lang{#2}% + \@trnslt@declare@language{#2}% + }% + \csdef{@trnslt@language@\@trnslt@language{#2}@dialect@#1}{}% \csletcs{@trnslt@language@#1}{@trnslt@language@#2}} +\def\@trnslt@if@dialect#1#2{% + \ifcsdef{@trnslt@language@\@trnslt@language{#2}@dialect@#1} + {\expandafter\@firstoftwo} + {\expandafter\@secondoftwo}} + \def\@trnslt@language#1{% \csuse{@trnslt@language@#1}} +% dummy language: `fallback': +\DeclareLanguage{fallback} +\DeclareLanguageAlias{Fallback}{fallback} + % -------------------------------------------------------------------------- % \DeclareTranslation, \NewTranslation and \RenewTranslation % #1: language @@ -117,11 +149,20 @@ \@trnslt@declare@translation{#2}{#1}{#3}} \@onlypreamble\DeclareTranslation +\newrobustcmd*\DeclareTranslationFallback[2]{% + \@trnslt@declare@translation{#1}{fallback}{#2}} +\@onlypreamble\DeclareTranslationFallback + \def\@trnslt@declare@translation#1#2#3{% \ifcsdef{@trnslt@language@#2} {% - \csdef{@trnslt@word@#1@\@trnslt@language{#2}}{#3}% \csdef{@trnslt@word@#1@literal}{#1}% + \lowercase{\@trnslt@if@dialect{#2}}{#2} + {\csdef{@trnslt@word@#1@#2}{#3}} + {}% + \ifcsdef{@trnslt@word@#1@\@trnslt@language{#2}} + {} + {\csdef{@trnslt@word@#1@\@trnslt@language{#2}}{#3}}% } {\@trnslt@err@unknown@lang{#2}}} @@ -162,10 +203,23 @@ % #1: word #2: language \def\@trnslt@get@translation@for#1#2{% \@trnslt@if@translation{#1}{#2} - {\csuse{@trnslt@word@#1@\@trnslt@language{#2}}} + {% + \@trnslt@if@dialect{#2}{#2} + {% + \ifcsdef{@trnslt@word@#1@#2} + {\csuse{@trnslt@word@#1@#2}} + {\csuse{@trnslt@word@#1@\@trnslt@language{#2}}}% + } + {\csuse{@trnslt@word@#1@\@trnslt@language{#2}}}% + } {% \@trnslt@warning{Translation for `#1' in #2 unknown.}% - \csuse{@trnslt@word@#1@literal}% + \@trnslt@if@translation{#1}{fallback} + {% + \@trnslt@warningnoline{Using fallback translation for `#1'}% + \csuse{@trnslt@word@#1@fallback} + }% + {\csuse{@trnslt@word@#1@literal}}% }} % -------------------------------------------------------------------------- @@ -247,65 +301,65 @@ \DeclareLanguage{turkish} \DeclareLanguage{ukrainian} -\DeclareLanguageAlias{Albanian}{albanian} -\DeclareLanguageAlias{Bulgarian}{bulgarian} -\DeclareLanguageAlias{Catalan}{catalan} -\DeclareLanguageAlias{Croatian}{croatian} -\DeclareLanguageAlias{Czech}{czech} -\DeclareLanguageAlias{Danish}{danish} -\DeclareLanguageAlias{Dutch}{dutch} -\DeclareLanguageAlias{Finnish}{finnish} -\DeclareLanguageAlias{francais}{french} -\DeclareLanguageAlias{Francais}{francais} -\DeclareLanguageAlias{canadien}{french} -\DeclareLanguageAlias{Canadien}{canadien} -\DeclareLanguageAlias{French}{french} -\DeclareLanguageAlias{american}{english} -\DeclareLanguageAlias{American}{american} -\DeclareLanguageAlias{australian}{english} -\DeclareLanguageAlias{Australian}{australian} -\DeclareLanguageAlias{british}{english} -\DeclareLanguageAlias{British}{british} -\DeclareLanguageAlias{canadian}{english} -\DeclareLanguageAlias{Canadian}{canadian} -\DeclareLanguageAlias{English}{english} -\DeclareLanguageAlias{UKenglish}{english} -\DeclareLanguageAlias{USenglish}{english} -\DeclareLanguageAlias{austrian}{german} -\DeclareLanguageAlias{Austrian}{austrian} -\DeclareLanguageAlias{German}{german} -\DeclareLanguageAlias{germanb}{german} -\DeclareLanguageAlias{naustrian}{austrian} -\DeclareLanguageAlias{ngerman}{german} -\DeclareLanguageAlias{Greek}{greek} -\DeclareLanguageAlias{polutonikogreek}{greek} -\DeclareLanguageAlias{Hebrew}{hebrew} -\DeclareLanguageAlias{Hungarian}{hungarian} -\DeclareLanguageAlias{magyar}{hungarian} -\DeclareLanguageAlias{Magyar}{magyar} -\DeclareLanguageAlias{Icelandic}{icelandic} -\DeclareLanguageAlias{Italian}{italian} -\DeclareLanguageAlias{norsk}{norwegian} -\DeclareLanguageAlias{Norsk}{norsk} -\DeclareLanguageAlias{Norwegian}{norwegian} -\DeclareLanguageAlias{nynorsk}{norwegian} -\DeclareLanguageAlias{Nynorsk}{nynorsk} -\DeclareLanguageAlias{Polish}{polish} -\DeclareLanguageAlias{brazil}{portuges} -\DeclareLanguageAlias{Brazil}{brazil} -\DeclareLanguageAlias{brazilian}{portuges} -\DeclareLanguageAlias{Brazilian}{brazilian} -\DeclareLanguageAlias{Portuges}{portuges} -\DeclareLanguageAlias{portuguese}{portuges} -\DeclareLanguageAlias{Portuguese}{portuguese} -\DeclareLanguageAlias{Romanian}{romanian} -\DeclareLanguageAlias{Russian}{russian} -\DeclareLanguageAlias{Serbocroatian}{serbocroatian} -\DeclareLanguageAlias{Slovak}{slovak} -\DeclareLanguageAlias{Slovenian}{slovenian} -\DeclareLanguageAlias{Spanish}{spanish} -\DeclareLanguageAlias{Swedish}{swedish} -\DeclareLanguageAlias{Turkish}{turkish} -\DeclareLanguageAlias{Ukrainian}{ukrainian} +\DeclareLanguageAlias {Albanian}{albanian} +\DeclareLanguageAlias {Bulgarian}{bulgarian} +\DeclareLanguageAlias {Catalan}{catalan} +\DeclareLanguageAlias {Croatian}{croatian} +\DeclareLanguageAlias {Czech}{czech} +\DeclareLanguageAlias {Danish}{danish} +\DeclareLanguageAlias {Dutch}{dutch} +\DeclareLanguageAlias {Finnish}{finnish} +\DeclareLanguageAlias {francais}{french} +\DeclareLanguageAlias {Francais}{francais} +\DeclareLanguageDialect{canadien}{french} +\DeclareLanguageAlias {Canadien}{canadien} +\DeclareLanguageAlias {French}{french} +\DeclareLanguageDialect{american}{english} +\DeclareLanguageAlias {American}{american} +\DeclareLanguageDialect{australian}{english} +\DeclareLanguageAlias {Australian}{australian} +\DeclareLanguageDialect{british}{english} +\DeclareLanguageAlias {British}{british} +\DeclareLanguageDialect{canadian}{english} +\DeclareLanguageAlias {Canadian}{canadian} +\DeclareLanguageAlias {English}{english} +\DeclareLanguageDialect{UKenglish}{english} +\DeclareLanguageDialect{USenglish}{english} +\DeclareLanguageDialect{austrian}{german} +\DeclareLanguageAlias {Austrian}{austrian} +\DeclareLanguageAlias {German}{german} +\DeclareLanguageAlias {germanb}{german} +\DeclareLanguageDialect{naustrian}{austrian} +\DeclareLanguageAlias {ngerman}{german} +\DeclareLanguageAlias {Greek}{greek} +\DeclareLanguageAlias {polutonikogreek}{greek} +\DeclareLanguageAlias {Hebrew}{hebrew} +\DeclareLanguageAlias {Hungarian}{hungarian} +\DeclareLanguageDialect{magyar}{hungarian} +\DeclareLanguageAlias {Magyar}{magyar} +\DeclareLanguageAlias {Icelandic}{icelandic} +\DeclareLanguageAlias {Italian}{italian} +\DeclareLanguageAlias {norsk}{norwegian} +\DeclareLanguageAlias {Norsk}{norsk} +\DeclareLanguageAlias {Norwegian}{norwegian} +\DeclareLanguageAlias {nynorsk}{norwegian} +\DeclareLanguageAlias {Nynorsk}{nynorsk} +\DeclareLanguageAlias {Polish}{polish} +\DeclareLanguageDialect{brazil}{portuges} +\DeclareLanguageAlias {Brazil}{brazil} +\DeclareLanguageAlias {brazilian}{brazil} +\DeclareLanguageAlias {Brazilian}{brazilian} +\DeclareLanguageAlias {Portuges}{portuges} +\DeclareLanguageAlias {portuguese}{portuges} +\DeclareLanguageAlias {Portuguese}{portuguese} +\DeclareLanguageAlias {Romanian}{romanian} +\DeclareLanguageAlias {Russian}{russian} +\DeclareLanguageAlias {Serbocroatian}{serbocroatian} +\DeclareLanguageAlias {Slovak}{slovak} +\DeclareLanguageAlias {Slovenian}{slovenian} +\DeclareLanguageAlias {Spanish}{spanish} +\DeclareLanguageAlias {Swedish}{swedish} +\DeclareLanguageAlias {Turkish}{turkish} +\DeclareLanguageAlias {Ukrainian}{ukrainian} \endinput
\ No newline at end of file |