texlive[41978] Master: semantic-markup (2sep16)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 3 03:23:52 CEST 2016


Revision: 41978
          http://tug.org/svn/texlive?view=revision&revision=41978
Author:   karl
Date:     2016-09-03 03:23:52 +0200 (Sat, 03 Sep 2016)
Log Message:
-----------
semantic-markup (2sep16)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/semantic-markup/
    trunk/Master/texmf-dist/doc/latex/semantic-markup/README
    trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
    trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex
    trunk/Master/texmf-dist/tex/latex/semantic-markup/
    trunk/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty
    trunk/Master/tlpkg/tlpsrc/semantic-markup.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/semantic-markup/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/semantic-markup/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/semantic-markup/README	2016-09-03 01:23:52 UTC (rev 41978)
@@ -0,0 +1,13 @@
+The semantic-markup package provides a set of simple commands to allow for semantic markup.
+The commands are inspired by the XML elements of the Text Encoding Initiative (http://www.tei-c.org).
+They are intended especially for scholarly writing in the humanities, including about music.
+The goal is simply to allow scholars to write with attention to meaning and content rather than to formatting.
+
+The package provides several semantic replacements for \emph and quoting commands, such as \term, \foreign, \mentioned, \soCalled, and \quoted.
+It also provides a Footnote environment so that long footnotes can be more cleanly separated from the main text.
+Because the author is a music scholar, the package also includes some macros for musical symbols and other basic notations for musical analysis.
+All the commands can be easily redefined as needed.
+
+This material is subject to the current version of the LaTeX Project Public License.
+The author and maintainer is Andrew A. Cashner, cashner at usc.edu.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/semantic-markup/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf	2016-09-03 01:23:21 UTC (rev 41977)
+++ trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf	2016-09-03 01:23:52 UTC (rev 41978)

Property changes on: trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex	2016-09-03 01:23:52 UTC (rev 41978)
@@ -0,0 +1,145 @@
+\documentclass{article}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage{tabularx}
+\usepackage{fancyvrb}
+\usepackage{booktabs}
+\usepackage{semantic-markup}
+\frenchspacing
+\usepackage
+  [pdftitle={The semantics Package for Meaningful Markup},
+   pdfauthor={Andrew A. Cashner},
+   pdfsubject={LaTeX package},
+   pdfkeywords={LaTeX, semantic markup, TEI, humanities}]{hyperref}
+
+
+\title{The \texttt{semantic-markup} Package for Meaningful Markup}
+\author{Andrew A. Cashner%
+  \thanks{Assistant professor of musicology, University of Southern California, \href{mailto:cashner at usc.edu}{\nolinkurl{cashner at usc.edu}}}%
+}
+
+\begin{document}
+\maketitle
+
+The \texttt{semantic-markup} package provides a set of simple commands to allow for semantic markup.
+The commands are inspired by the XML elements of the Text Encoding Initiative (\url{http://www.tei-c.org}).
+They are intended especially for scholarly writing in the humanities, including about music.
+The goal is simply to allow scholars to write with attention to meaning and content rather than to formatting.
+
+\tableofcontents
+
+\section{Package Options}
+
+The package configures \texttt{csquotes} to place end punctuation inside quotation marks, according to United States usage. 
+Use the \texttt{defaultquotes} package option to restore the default behavior of \texttt{csquotes}.
+
+\section{Semantic Commands Defined Without Arguments}
+
+The following commands are defined (using \texttt{xparse}) as aliases to standard \LaTeX{} commands or \verb|\textquote| from the \texttt{csquotes} package.
+In other words, they are not defined with an argument.
+For example, the command for a technical term, typically set in italics is defined this way: 
+\begin{verbatim}
+\NewDocumentCommand{\term}{}{\emph}
+\end{verbatim}
+To redefine it to be set in bold, for example, you can use the basic \LaTeX{} command \verb|\renewcommand{\term}{\textbf}|.
+
+\begin{center}
+\begin{tabularx}{\linewidth}{llX}
+\toprule
+Command & Alias & Use\\
+\midrule
+\verb|\quoted| & \verb|\textquote| & Quoted material, taking care of end punctuation: instead of \verb|``word,''| write \verb|\quoted{word},|\\
+\verb|\soCalled| & \verb|\textquote| & Scare quotes\\
+\verb|\strong| & \verb|\textbf| & Highlight emphasis just as in HTML\\
+\verb|\code| & \verb|\texttt| & Computer code in teletype font (not verbatim)\\
+\verb|\term| & \verb|\emph| & Technical terms, set in italics\\
+\verb|\mentioned| & \verb|\emph| & Referring to a word as a word rather than to its meaning, as in philological discussion\\
+\verb|\foreign| & \verb|\emph| & Foreign term\\
+\verb|\worktitle| & \verb|\emph| & Title of a complete work (of literature, art, music), set in italics; use for books, journal titles\\
+\verb|\parttitle| & \verb|\textquote| & Title of a portion of a work, set in quotation marks, such as a journal article, song on an album\\
+\bottomrule
+\end{tabularx}
+\end{center}
+
+\section{Semantic Commands With Arguments}
+
+These commands have slightly more complex definitions, but can still be easily redefined.
+See the \texttt{xparse} documentation on the syntax of these commands.
+
+\begin{center}
+\begin{tabularx}{\linewidth}{lXX}
+\toprule
+Command & Definition & Usage\\
+\midrule
+\verb|\add| & One argument: Put square brackets around argument & For editorial additions\\
+\verb|\Dots| & Put ellipsis in square brackets & For editorial omissions from quotations\\
+\verb|\gloss| & Two arguments: Put first in italics and second in parentheses & Use a technical or foreign term and give its definition\\
+\verb|\quotedgloss| & Two arguments: Put first in quotation marks and second in parentheses & Same as \verb|\gloss| but using \verb|\quoted| for the first argument instead of \verb|\mentioned|\\
+\verb|\XXX| & One optional argument with default value of \verb|\add{FIX}| & Identify problem spot in draft\\
+\verb|\citXXX| & One optional argument & Make footnote indicating a missing citation; optional argument may be used for reminder of the citation name or description\\
+\bottomrule
+\end{tabularx}
+\end{center}
+
+\section{Footnote Environment}
+
+When writing many long footnotes it can be useful to have an environment for footnotes.
+Here one is defined using the \texttt{environ} package.
+You still have to escape the end of the line before the footnote begins.
+Use like so:
+
+\begin{verbatim}
+Body text.%
+  \begin{Footnote}
+  Footnote text.
+  More footnote text.
+  \end{Footnote}
+Continuation of body text.
+\end{verbatim}
+
+\section{Musical Symbols}
+
+Shorthands are defined for musical accidentals, using \LaTeX{} math-mode symbols. 
+These could be redefined to use Unicode symbols if the font contains them, or with commands from the \texttt{lilyglyphs} package.
+Remember that like all commands without arguments, \LaTeX{} will ignore the space after the command-name, so you will need to write \verb|\fl{}| or \verb|\fl\ |.
+There is also a command for octave numbers, for the system in which middle C begins the fourth octave.
+
+\begin{center}
+\begin{tabular}{ll}
+\toprule
+Command & Alias\\
+\midrule
+\verb|\fl| & \verb|$\flat$|\\
+\verb|\na| & \verb|$\natural$|\\
+\verb|\sh| & \verb|$\sharp$|\\
+\verb|\octave| & \verb|\textsubscript|\\
+\bottomrule
+\end{tabular}
+\end{center}
+
+For stacked numerals, as in meter signatures or figured bass, we provide two simple options, \verb|\musfig| using \verb|\genfrac| from \texttt{amsmath}, and \verb|\meter|, which uses \verb|\Takt| from the \texttt{harmony} package, which spaces the numerals more closely.
+Both commands take two arguments, one for the top numeral and the second for the bottom numeral.
+You could write, for example: 
+
+\begin{verbatim}
+There is a \musfig{6--5}{4--3} cadential pattern
+before the shift to \meter{3}{4} time.
+The melody begins on F\sh\octave{4}.
+\end{verbatim}
+
+\begin{center}
+\fbox{\parbox{\textwidth}{%
+There is a \musfig{6--5}{4--3} cadential pattern
+before the shift to \meter{3}{4} time.
+The melody begins on F\sh\octave{4}.
+}}
+\end{center}
+
+For more complex notation, such as three-level numerals, or stacked figured-bass symbols with accidentals or slashes, you will have to devise your own solution.
+
+\section{Code}
+
+\VerbatimInput{semantic-markup.sty}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty	2016-09-03 01:23:52 UTC (rev 41978)
@@ -0,0 +1,106 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{semantic-markup}[2016/09/01
+  Macros for TEI-like semantic markup]
+% Copyright 2016 Andrew A. Cashner, cashner at usc.edu
+
+% This work may be distributed and/or modified under the 
+% conditions of the LaTeX Project Public License, either
+% version 1.3 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.
+%
+% This work has the LPPL maintenance status `maintained'.
+% The Current Maintainer of this work is Andrew A. Cashner.
+% This work consists of the package file semantic-markup.sty 
+% and the documentation file semantic-markup.tex.
+
+\newif\ifdefaultquotes
+% Use custom configuration instead of csquotes default
+\defaultquotesfalse 
+\DeclareOption{defaultquotes}{\defaultquotestrue}
+\ProcessOptions\relax
+
+\RequirePackage{xparse}
+
+\RequirePackage{csquotes}
+\ifdefaultquotes\else
+  % Put end punctuation inside quotation marks 
+  % for the specified marks
+  \renewcommand{\mktextquote}[6]{#1#2#4#5#3#6}
+  \DeclareAutoPunct{.,!?}
+\fi
+
+\NewDocumentCommand{\quoted}{}	
+{\textquote}
+\NewDocumentCommand{\soCalled}{}
+{\textquote}
+\NewDocumentCommand{\strong}{}	
+{\textbf}
+\NewDocumentCommand{\code}{}	
+{\texttt}
+\NewDocumentCommand{\term}{}	
+{\emph}
+\NewDocumentCommand{\mentioned}{}	
+{\emph}
+\NewDocumentCommand{\foreign}{}
+{\emph}
+\NewDocumentCommand{\worktitle}{}
+{\emph}
+\NewDocumentCommand{\parttitle}{}
+{\textquote}
+
+% editorial addition
+\NewDocumentCommand{\add}{ m }
+{[#1]}
+% editorial ellipsis
+\NewDocumentCommand{\Dots}{}{\add{\dots}}
+% explanatory gloss of technical or foreign term
+\NewDocumentCommand{\gloss}{ m m }{%
+  \mentioned{#1} (#2)%
+}
+% explanatory gloss of word in quotation marks
+\NewDocumentCommand{\quotedgloss}{ m m }{%
+  \quoted{#1} (#2)%
+}
+
+%*******************
+% Identify problem spot in draft
+\NewDocumentCommand{\XXX}{ O{\add{FIX}} }{%
+  \textbf{#1}%
+}
+% Indicate citation to be filled in later
+% Optional argument for indicating the source
+\NewDocumentCommand{\citXXX}{ o }{%
+  \footnote{\textbf{[Citation needed]\IfValueTF{#1}{#1}{}}}%
+}
+
+%*******************
+% Footnote as environment
+\RequirePackage{environ}
+\NewEnviron{Footnote}{\footnote{\BODY}}[]
+
+%****************************************
+% MUSIC SYMBOLS
+
+% Accidentals using LaTeX symbols
+\NewDocumentCommand{\fl}{}{$\flat$}
+\NewDocumentCommand{\na}{}{$\natural$}
+\NewDocumentCommand{\sh}{}{$\sharp$}
+
+% Octave subscripts 
+\NewDocumentCommand{\octave}{ }{\textsubscript}
+
+% Music figures
+\RequirePackage{amsmath}
+\NewDocumentCommand{\musfig}{ m m }{%
+  $\genfrac{}{}{0pt}{1}{\text{#1}}{\text{#2}}$%
+} 
+
+% Meter signatures
+\RequirePackage[rm]{harmony}
+\NewDocumentCommand{\meter}{ m m }{\Takt{#1}{#2}}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-09-03 01:23:21 UTC (rev 41977)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-09-03 01:23:52 UTC (rev 41978)
@@ -522,7 +522,7 @@
     sciposter screenplay screenplay-pkg scrjrnl scrlttr2copy
     sdrt sduthesis
     secdot section sectionbox sectsty seealso
-    selectp selnolig semantic semaphor
+    selectp selnolig semantic semantic-markup semaphor
     seminar semioneside semproc sepfootnotes sepnum seqsplit
     serbian-apostrophe serbian-date-lat serbian-def-cyr serbian-lig
     sesamanuel setdeck setspace seuthesis seuthesix

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2016-09-03 01:23:21 UTC (rev 41977)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2016-09-03 01:23:52 UTC (rev 41978)
@@ -875,6 +875,7 @@
 depend seealso
 depend selectp
 depend semantic
+depend semantic-markup
 depend semioneside
 depend semproc
 depend sepfootnotes

Added: trunk/Master/tlpkg/tlpsrc/semantic-markup.tlpsrc
===================================================================


More information about the tex-live-commits mailing list