summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty27
1 files changed, 14 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty b/Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty
index 60b5c6b8bfe..325ba04506c 100644
--- a/Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty
+++ b/Master/texmf-dist/tex/xelatex/langsci/langsci-cgloss.sty
@@ -1,17 +1,17 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: langsci-cgloss.sty
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2016-01-16 16:47:43 UTC
+%% Date: 2016-01-16 16:47:43 UTC
%% Purpose: This file contains an adpated version of the cgloss
%% package for glossing linguistic examples.
%% Language: LaTeX
-%% Licence:
+%% Licence:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -*- LaTeX -*-
% Modified version of cgloss4e.sty. Hacked and renamed cgloss.sty
-% by Alexis Dimitriadis (alexis@babel.ling.upenn.edu)
+% by Alexis Dimitriadis (alexis@babel.ling.upenn.edu)
% Following borrows from Covington's style files inspired by Midnight by M.
% de Groot, adapted to be used with gb4e.sty: examples beginning with \ex can
@@ -26,13 +26,13 @@
% \\)---hpk
%
-% Changes by Alexis Dimitriadis
+% Changes by Alexis Dimitriadis
%
% Removed flushleft environment and initial vskip to make macros usable
% on the same line with earlier and/or later text, e.g.,
% \item Q: \gll ... \\
% ... \\ \hfill (Greek)
-% \trans Q: `...'
+% \trans Q: `...'
% Note: Text following the gloss will appear on line one of the example;
% To get a line break, insert one manually with \\ or use \trans or \glt.
% (\gln does not end the line, since it was already the
@@ -41,7 +41,7 @@
% Modified \glt to keep translation on the same page as the text.
% BUGS: does not work very gracefully with double spacing (struts are not
-% automatically inserted after the \vboxes used by the macros).
+% automatically inserted after the \vboxes used by the macros).
% In double space mode without \nosinglegloss, when a translation
% is not given, the next line of text is single-spaced from the glossed text.
% With \nosinglegloss, the translation is set too close to the bottom line.
@@ -225,7 +225,8 @@
}
\gdef\getwords(#1,#2)#3 #4\\% #1=linebox, #2=\each, #3=1st word, #4=remainder
- {\setbox#1=\vbox{\hbox{#2\strut#3 }% adds space
+ {\setbox#1=\vbox{\hbox{#2\strut#3{} }% adds space, the {} is needed for CJK otherwise the space
+ % would be ignored
\unvbox#1%
}%
\def\more{#4}%
@@ -278,7 +279,7 @@
\gl@stop}
-
+
\gdef\foursent#1\\ #2\\ #3\\ #4\\{% #1 = first line, #2 = second line, #3 = third
\getwords(\lineone,\eachwordone)#1 \\%
\getwords(\linetwo,\eachwordtwo)#2 \\%
@@ -306,7 +307,7 @@
\gl@stop}
-
+
\gdef\fivesent#1\\ #2\\ #3\\ #4\\ #5\\{% #1 = first line, #2 = second line, #3 = third
\getwords(\lineone,\eachwordone)#1 \\%
\getwords(\linetwo,\eachwordtwo)#2 \\%
@@ -338,7 +339,7 @@
\gl@stop}
-
+
\gdef\sixsent#1\\ #2\\ #3\\ #4\\ #5\\ #6\\{% #1 = first line, #2 = second line, #3 = third
\getwords(\lineone,\eachwordone)#1 \\%
\getwords(\linetwo,\eachwordtwo)#2 \\%
@@ -374,7 +375,7 @@
\gl@stop}
-
+
\gdef\sevensent#1\\ #2\\ #3\\ #4\\ #5\\ #6\\ #7\\{% #1 = first line, #2 = second line, #3 = third
\getwords(\lineone,\eachwordone)#1 \\%
\getwords(\linetwo,\eachwordtwo)#2 \\%
@@ -414,7 +415,7 @@
\gl@stop}
-
+
\gdef\eightsent#1\\ #2\\ #3\\ #4\\ #5\\ #6\\ #7\\ #8\\{% #1 = first line, #2 = second line, #3 = third
\getwords(\lineone,\eachwordone)#1 \\%
\getwords(\linetwo,\eachwordtwo)#2 \\%
@@ -462,4 +463,4 @@
% \leavevmode puts us back in horizontal mode, so that a \\ will work
\def\gl@stop{{\hskip -\glossglue}\unhbox\gline\leavevmode \egroup}
-\endinput \ No newline at end of file
+\endinput