summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-20 22:14:42 +0000
committerKarl Berry <karl@freefriends.org>2021-02-20 22:14:42 +0000
commit3e44606bc65487ba8ac562b224fa1960bc3b2c0a (patch)
tree76856d747e99887b5eb02acff1b1e1cef1a3e4f5 /Master/texmf-dist/tex/latex
parent15c5ddf3315f167a546a5be47558e571e33a8fb5 (diff)
embrac (20feb21)
git-svn-id: svn://tug.org/texlive/trunk@57814 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/embrac/embrac.sty75
1 files changed, 44 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/embrac/embrac.sty b/Master/texmf-dist/tex/latex/embrac/embrac.sty
index 55786b982af..7065a8709d7 100644
--- a/Master/texmf-dist/tex/latex/embrac/embrac.sty
+++ b/Master/texmf-dist/tex/latex/embrac/embrac.sty
@@ -5,18 +5,18 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: https://bitbucket.org/cgnieder/embrac/
+% Web: https://github.com/cgnieder/embrac/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2012--2019 Clemens Niederberger
+% Copyright 2012--2021 Clemens Niederberger
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% 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.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -34,11 +34,18 @@
\RequirePackage { expl3 , xparse , l3keys2e }
\ProvidesExplPackage
{embrac}
- {2019/12/31}
- {0.9}
+ {2021/02/20}
+ {0.9a}
{Upright Brackets in Emphasized Text}
% --------------------------------------------------------------------------
+\msg_new:nnn {embrac} {patching}
+ { Patching~ \token_to_str:c {#1} ... }
+
+\msg_new:nnn {embrac} {not-patching}
+ { \token_to_str:c {#1} ~ not~ defined.~ Not~ patching~ it ... }
+
+% --------------------------------------------------------------------------
\bool_new:N \l__embrac_treat_biblatex_bool
\tl_new:N \l__embrac_tmpa_tl
@@ -116,7 +123,7 @@
\tl_replace_all:Nnn #1 {#3}
{
\mode_if_math:TF
- {#4}
+ {#3}
{
\embrac_nobreak:
\embrac_kern:n {#2}
@@ -215,30 +222,35 @@
% #1: name of macro to be treated
\cs_new_protected:Npn \embrac_new_replacement_macro:n #1
{
- \seq_put_right:Nn \l__embrac_changed_macros_seq {#1}
- \cs_new_eq:cc {embrac_orig_#1:n} {#1~}
- \cs_generate_variant:cn {embrac_orig_#1:n} {V}
- \cs_new_protected:cpn {__embrac_#1:n} ##1
- {
- \tl_set:Nn \l__embrac_tmpa_tl {##1}
- \embrac_replace_brackets:N \l__embrac_tmpa_tl
- \use:c {embrac_orig_#1:V} \l__embrac_tmpa_tl
- }
- \cs_new_protected:cpn {embrac_#1:nn} ##1##2
- {
- \group_begin:
- \embrac_treat_bibparens:
- \tl_if_eq:nnTF {##1} {*}
- { \use:c {embrac_orig_#1:n} {##2} }
- { \use:c {__embrac_#1:n} {##2} }
- \group_end:
- }
- \exp_args:Nc \RenewDocumentCommand {#1} {sm}
+ \cs_if_exist:cTF {#1}
{
- \IfBooleanTF {##1}
- { \use:c {embrac_#1:nn} {*} {##2} }
- { \use:c {embrac_#1:nn} { } {##2} }
+ \msg_info:nnn {embrac} {patching} {#1}
+ \seq_put_right:Nn \l__embrac_changed_macros_seq {#1}
+ \cs_new_eq:cc {embrac_orig_#1:n} {#1~}
+ \cs_generate_variant:cn {embrac_orig_#1:n} {V}
+ \cs_new_protected:cpn {__embrac_#1:n} ##1
+ {
+ \tl_set:Nn \l__embrac_tmpa_tl {##1}
+ \embrac_replace_brackets:N \l__embrac_tmpa_tl
+ \use:c {embrac_orig_#1:V} \l__embrac_tmpa_tl
+ }
+ \cs_new_protected:cpn {embrac_#1:nn} ##1##2
+ {
+ \group_begin:
+ \embrac_treat_bibparens:
+ \tl_if_eq:nnTF {##1} {*}
+ { \use:c {embrac_orig_#1:n} {##2} }
+ { \use:c {__embrac_#1:n} {##2} }
+ \group_end:
+ }
+ \exp_args:Nc \RenewDocumentCommand {#1} {sm}
+ {
+ \IfBooleanTF {##1}
+ { \use:c {embrac_#1:nn} {*} {##2} }
+ { \use:c {embrac_#1:nn} { } {##2} }
+ }
}
+ { \msg_info:nnn {embrac} {not-patching} {#1} }
}
\NewDocumentCommand \EmbracMakeKnown {m}
@@ -512,7 +524,7 @@
2014/06/24 - v0.6 - add support for \textsl
2014/07/03 - v0.6a - bugfix: remove unwanted (and unnecessary) expansion in
\__embrac_emph:n
-2015/09/06 - v0.6b - fix https://bitbucket.org/cgnieder/embrac/issues/5
+2015/09/06 - v0.6b - fix https://github.com/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
@@ -521,3 +533,4 @@
- new macros \embparen, \embbracket and \emb
2019/12/31 - v0.9 - new: \EmbracMakeKnown
- change penalties
+2021/02/20 - v0.9a - fix issue #13