diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-06 21:26:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-06 21:26:45 +0000 |
commit | 34144b78db92736c00a10650d04b947c56429504 (patch) | |
tree | 348fc66d723c1f47edb25a67deb2bd35cc3e850d /Master/texmf-dist | |
parent | f691078fbf5a14c2afb87e0a2598f0654c4bf8e1 (diff) |
embrac (6jul17)
git-svn-id: svn://tug.org/texlive/trunk@44757 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/embrac/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/embrac/embrac_en.pdf | bin | 461932 -> 462479 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/embrac/embrac_en.tex | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/embrac/embrac.sty | 65 |
4 files changed, 46 insertions, 40 deletions
diff --git a/Master/texmf-dist/doc/latex/embrac/README b/Master/texmf-dist/doc/latex/embrac/README index d3385b0565f..477c644cbe8 100644 --- a/Master/texmf-dist/doc/latex/embrac/README +++ b/Master/texmf-dist/doc/latex/embrac/README @@ -3,13 +3,13 @@ the EMBRAC package Upright Brackets in Emphasized Text -2016/01/06 v0.6d +2017/07/04 v0.7 -------------------------------------------------------------------------- Clemens Niederberger Web: https://bitbucket.org/cgnieder/embrac/ E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2012--2016 Clemens Niederberger +Copyright 2012--2017 Clemens Niederberger This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/doc/latex/embrac/embrac_en.pdf b/Master/texmf-dist/doc/latex/embrac/embrac_en.pdf Binary files differindex 384b2257013..457f76889fc 100644 --- a/Master/texmf-dist/doc/latex/embrac/embrac_en.pdf +++ b/Master/texmf-dist/doc/latex/embrac/embrac_en.pdf diff --git a/Master/texmf-dist/doc/latex/embrac/embrac_en.tex b/Master/texmf-dist/doc/latex/embrac/embrac_en.tex index 9f6db677dd7..ec1bfb379e5 100644 --- a/Master/texmf-dist/doc/latex/embrac/embrac_en.tex +++ b/Master/texmf-dist/doc/latex/embrac/embrac_en.tex @@ -12,7 +12,7 @@ % Web: https://bitbucket.org/cgnieder/embrac/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- -% Copyright 2012--2016 Clemens Niederberger +% Copyright 2012--2017 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -99,12 +99,13 @@ package probably wouldn't exist. \section{New} \begin{description} - \item[v0.1a] The command \cs{RenewEmph} has been renamed into - \cs{ChangeEmph} and a new slightly different \cs{RenewEmph} has been added. - \item[v0.2] Improved interaction with \pkg{biblatex}. - \item[v0.3] Added support for \pkg*{fontspec}'s \cs{textsi}. - \item[v0.5] Don't replace brackets in math mode. - \item[v0.6] Added support for \cs{textsl}. + \item[v0.1a] The command \cs{RenewEmph} has been renamed into + \cs{ChangeEmph} and a new slightly different \cs{RenewEmph} has been added. + \item[v0.2] Improved interaction with \pkg{biblatex}. + \item[v0.3] Added support for \pkg*{fontspec}'s \cs{textsi}. + \item[v0.5] Don't replace brackets in math mode. + \item[v0.6] Added support for \cs{textsl}. + \item[v0.7] Added support for symbols with a catcode other than~12. \end{description} \section{About}\label{sec:about} @@ -321,7 +322,7 @@ This is \embrac's only package option: \emph{Let's cite Bringhurst again:~\cite{bringhurst04}}. \end{example} -\section{Turn \embrac Temporarily Off} +\section{Turn \embrac\ Temporarily Off} Redefining \cs{emph}, \cs{textit} and \cs{textsl} is not without danger. Sometimes you might find that you'd want to keep the original definition for a small portion of your document. You can use the following commands whose diff --git a/Master/texmf-dist/tex/latex/embrac/embrac.sty b/Master/texmf-dist/tex/latex/embrac/embrac.sty index 220f5a938f8..2a5d12675bd 100644 --- a/Master/texmf-dist/tex/latex/embrac/embrac.sty +++ b/Master/texmf-dist/tex/latex/embrac/embrac.sty @@ -8,7 +8,7 @@ % Web: https://bitbucket.org/cgnieder/embrac/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- -% Copyright 2012--2016 Clemens Niederberger +% Copyright 2012--2017 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -34,8 +34,8 @@ \RequirePackage { expl3 , xparse , l3keys2e } \ProvidesExplPackage {embrac} - {2016/01/07} - {0.6d} + {2017/07/04} + {0.7} {Upright Brackets in Emphasized Text} % -------------------------------------------------------------------------- @@ -91,46 +91,47 @@ % -------------------------------------------------------------------------- % THE MAIN PART: % storage of the tokens to be replaced: +\prop_new:N \l__embrac_emph_obrackets_symp_prop \prop_new:N \l__embrac_emph_obrackets_prop \prop_new:N \l__embrac_emph_obrackets_before_prop +\prop_new:N \l__embrac_emph_cbrackets_symp_prop \prop_new:N \l__embrac_emph_cbrackets_prop \prop_new:N \l__embrac_emph_cbrackets_after_prop +\cs_new_protected:Npn \__embrac_replace:Nnnn #1#2#3#4 + { + \tl_replace_all:Nnn #1 {#3} + { + \mode_if_math:TF + {#3} + { + \embrac_kern:n {#2} + \embrac_nobreak: + \embrac_braces_format:n {#3} + \embrac_nobreak: + \embrac_kern:n {#4} + \embrac_nobreak: + } + } + } +\cs_generate_variant:Nn \__embrac_replace:Nnnn {Nxx,Nnxx} + % do the replacing: \cs_new_protected:Npn \embrac_replace_brackets:N #1 { \prop_map_inline:Nn \l__embrac_emph_obrackets_prop { - \tl_replace_all:Nnn #1 {##1} - { - \mode_if_math:TF - {##1} - { - \embrac_kern:n - { \prop_item:Nn \l__embrac_emph_obrackets_before_prop {##1} } - \embrac_nobreak: - \embrac_braces_format:n {##1} - \embrac_nobreak: - \embrac_kern:n {##2} - \embrac_nobreak: - } - } + \__embrac_replace:Nxxn #1 + { \prop_item:Nn \l__embrac_emph_obrackets_before_prop {##1} } + { \prop_item:Nn \l__embrac_emph_obrackets_symp_prop {##1} } + {##2} } \prop_map_inline:Nn \l__embrac_emph_cbrackets_prop { - \tl_replace_all:Nnn #1 {##1} - { - \mode_if_math:TF - {##1} - { - \embrac_nobreak: - \embrac_kern:n {##2} - \embrac_nobreak: - \embrac_braces_format:n {##1} - \embrac_kern:n - { \prop_item:Nn \l__embrac_emph_cbrackets_after_prop {##1} } - } - } + \__embrac_replace:Nnxx #1 + {##2} + { \prop_item:Nn \l__embrac_emph_cbrackets_symp_prop {##1} } + { \prop_item:Nn \l__embrac_emph_cbrackets_after_prop {##1} } } } @@ -229,6 +230,7 @@ % internal add commands: \cs_new_protected:Npn \embrac_add_op_to_emph:nnn #1#2#3 { + \prop_put:Nnn \l__embrac_emph_obrackets_symp_prop {#1} {#1} \embrac_empty_or_no_value:nTF {#2} { \prop_put_if_new:Nnn \l__embrac_emph_obrackets_prop {#1} {0pt} } { \prop_put_if_new:Nnn \l__embrac_emph_obrackets_prop {#1} {#2} } @@ -239,6 +241,7 @@ \cs_new_protected:Npn \embrac_add_cl_to_emph:nnn #1#2#3 { + \prop_put:Nnn \l__embrac_emph_cbrackets_symp_prop {#1} {#1} \embrac_empty_or_no_value:nTF {#2} { \prop_put_if_new:Nnn \l__embrac_emph_cbrackets_prop {#1} {0pt} } { \prop_put_if_new:Nnn \l__embrac_emph_cbrackets_prop {#1} {#2} } @@ -452,3 +455,5 @@ 2015/09/06 - v0.6b - fix https://bitbucket.org/cgnieder/embrac/issues/5 2015/11/13 - v0.6c - avoid code duplication 2016/01/07 - v0.6d - \prop_get:Nn => \prop_item:Nn +2017/07/04 - v0.7 - implement issue #8 (now treatment of symbols with catcode + other than 12 is possible) |