diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/embrac/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/embrac/embrac_en.pdf | bin | 461053 -> 461856 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/embrac/embrac_en.tex | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/embrac/embrac.sty | 42 |
4 files changed, 58 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/embrac/README b/Master/texmf-dist/doc/latex/embrac/README index d0ef05194b8..3b41b11c9a1 100644 --- a/Master/texmf-dist/doc/latex/embrac/README +++ b/Master/texmf-dist/doc/latex/embrac/README @@ -3,7 +3,7 @@ the EMBRAC package Upright Brackets in Emphasized Text -2014/05/07 v0.5 +2014/06/24 v0.6 -------------------------------------------------------------------------- Clemens Niederberger Web: https://bitbucket.org/cgnieder/embrac/ 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 64a819a7708..343482478f7 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 5749f376376..4094b856111 100644 --- a/Master/texmf-dist/doc/latex/embrac/embrac_en.tex +++ b/Master/texmf-dist/doc/latex/embrac/embrac_en.tex @@ -82,6 +82,8 @@ \RenewEmph{[}[-0.045em,.02em]{]}[.055em,-.09em] \ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em] +\newnote*\added[2]{Version~#1: added #2} + \begin{document} \section{License and Requirements} @@ -102,6 +104,7 @@ package probably wouldn't exist. \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}. \end{description} \section{About}\label{sec:about} @@ -126,15 +129,16 @@ package probably wouldn't exist. \noindent Both this quote from~\citetitle{bringhurst04} by Robert Bringhurst and the article \citetitle{dtk12-dw} by Dominik Waßenhoven~\cite{dtk12-dw} inspired -this package. Indeed, \embrac heavily borrows from the code +this package. Indeed, \embrac\ heavily borrows from the code \citeauthor{dtk12-dw} provided in his article\manythanks. The code was originally provided by Bruno Le~Floch\manythanks\ answering a question on \href{http://tex.stackexchange.com}{TeX.sx}~\cite{lefloch11}. -\embrac\ tries to redefine \cs{emph} and \cs{textit} in a way that neither -parentheses nor square brackets are sloped. In an ideal world you of course -wouldn't need this package because the italic font you're using would have -vertical parentheses and brackets by itself. +\embrac\ tries to redefine \cs{emph}, \cs{textit} and +\cs{textsl}\added{0.6}{\cs{textsl}} in a way that neither parentheses nor +square brackets are sloped. In an ideal world you of course wouldn't need +this package because the italic font you're using would have vertical +parentheses and brackets by itself. \begin{example} \emph{This is emphasized [sic] text.} \par @@ -142,12 +146,14 @@ vertical parentheses and brackets by itself. \end{example} \section{How it Works} -Both the commands \cs{emph} and \cs{textit} are redefined: +The commands \cs{emph}, \cs{textit} and \cs{textsl} are redefined: \begin{commands} \command{emph}[\sarg\marg{emphasized text}] Emphasizing text. \command{textit}[\sarg\marg{text in italics}] Italicizing text, + \command{textsl}[\sarg\marg{slanted text}] + Slanting text, \command{textsi}[\sarg\marg{text in italic small caps}] This command is only defined and thus redefined if you loaded \pkg{fontspec}, \ie, if you're compiling your document with \XeLaTeX{} or @@ -316,10 +322,10 @@ This is \embrac's only package option: \end{example} \section{Turn \embrac Temporarily Off} -Redefining \cs{emph} and \cs{textit} 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 functions are -obvious, I guess: +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 +functions are obvious, I guess: \begin{commands} \command{EmbracOff} Turn \embrac's treatment off. @@ -329,7 +335,7 @@ obvious, I guess: Both commands are local. \section{Watch out!} -Please be aware that \embrac does not affect \cs{itshape} nor \cs{em} (nor +Please be aware that \embrac\ does not affect \cs{itshape} nor \cs{em} (nor \cs{it} which you shouldn't use in a \LaTeX{} document, anyway). \begin{example} \itshape This is italic [sic] text. diff --git a/Master/texmf-dist/tex/latex/embrac/embrac.sty b/Master/texmf-dist/tex/latex/embrac/embrac.sty index 8e3e70deae2..e2afba6398d 100644 --- a/Master/texmf-dist/tex/latex/embrac/embrac.sty +++ b/Master/texmf-dist/tex/latex/embrac/embrac.sty @@ -34,8 +34,8 @@ \RequirePackage { expl3 , xparse , l3keys2e } \ProvidesExplPackage {embrac} - {2014/05/07} - {0.5} + {2014/06/24} + {0.6} {Upright Brackets in Emphasized Text} % -------------------------------------------------------------------------- @@ -89,6 +89,8 @@ \cs_generate_variant:Nn \embrac_orig_emph:n { V } \cs_new_eq:Nc \embrac_orig_textit:n { textit~ } \cs_generate_variant:Nn \embrac_orig_textit:n { V } + \cs_new_eq:Nc \embrac_orig_textsl:n { textsl~ } + \cs_generate_variant:Nn \embrac_orig_textsl:n { V } \embrac_if_fontspec:T { \cs_new_eq:Nc \embrac_orig_textsi:n { textsi~ } @@ -167,6 +169,14 @@ \embrac_orig_textit:V \l__embrac_tmpa_tl } +% internal \textsl command: +\cs_new_protected:Npn \__embrac_textsl:n #1 + { + \tl_set:Nn \l__embrac_tmpa_tl { #1 } + \embrac_replace_brackets:N \l__embrac_tmpa_tl + \embrac_orig_textsl:V \l__embrac_tmpa_tl + } + % internal \textsi command: \AtBeginDocument{ \embrac_if_fontspec:T @@ -224,6 +234,17 @@ \group_end: } +% internal \textsl command, second layer: +\cs_new_protected:Npn \embrac_textsl:nn #1#2 + { + \group_begin: + \embrac_treat_bibparens: + \tl_if_eq:nnTF { #1 } { * } + { \embrac_orig_textsl:n { #2 } } + { \__embrac_textsl:n { #2 } } + \group_end: + } + % internal \textsi command, second layer: \AtBeginDocument{ \embrac_if_fontspec:T @@ -256,6 +277,14 @@ { \embrac_textit:nn { } { #2 } } } +% user command \textsl: +\RenewDocumentCommand \textsl { sm } + { + \IfBooleanTF { #1 } + { \embrac_textsl:nn { * } { #2 } } + { \embrac_textsl:nn { } { #2 } } + } + % user command \textsi: \AtBeginDocument{ \embrac_if_fontspec:T @@ -278,6 +307,8 @@ { \embrac_orig_emph:n { ##2 } } \RenewDocumentCommand \textit { sm } { \embrac_orig_textit:n { ##2 } } + \RenewDocumentCommand \textsl { sm } + { \embrac_orig_textsl:n { ##2 } } \cs_if_exist:NT \textsi { \RenewDocumentCommand \textsi { sm } @@ -300,6 +331,12 @@ { \embrac_textit:nn { * } { ##2 } } { \embrac_textit:nn { } { ##2 } } } + \RenewDocumentCommand \textsl { sm } + { + \IfBooleanTF { ##1 } + { \embrac_textsl:nn { * } { ##2 } } + { \embrac_textsl:nn { } { ##2 } } + } \cs_if_exist:NT \textsi { \RenewDocumentCommand \textsi { sm } @@ -533,3 +570,4 @@ separately 2014/05/07 - v0.5 - renaming of some internal commands - leave brackets unchanged if in math mode +2014/06/24 - v0.6 - add support for \textsl |