Coder Social home page Coder Social logo

covington's People

Contributors

jspitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

covington's Issues

\textfloatsep should not be overwritten OR provide a package options to set or bypass setting it

Not sure if it's relevant, but I am using memoir primarily.

I just ran into an issue where setting all the memoir settings indicated that something was overwriting my \textfloatsep length (\setlength{\textfloatsep}{0pt}). I narrowed this down to covington package after a bit of work.

The space above/below an example , examples, and exercise environments should IMHO either follow the uniformity of the length that the user sets for the entire document or only apply to these covington environments. 0.7in is quite large and shouldn't be forced upon users against their wishes for \textfloatsep in all other floats.

It's also unclear to me why covington needs to overwrite this length. While true that I can set this length again after covington is loaded, it was unexpected and I prefer to keep certain preamble definitions together (in this case, for memoir), some of which require loading very early due to package dependencies.

Seems there are several options to support users like me, or in general:

  1. Add a package option to disable setting \textfloatsep
  2. Add a package option to specify the length for \textfloatsep
  3. Calculate the difference between \textfloatsep and 0.7in - place this vertical white space difference at the top and bottom of any covington environments

These option, I believe, should support backwards compatibility. There may be option options as well?

Thanks in advance for considering this!

"No counter 'subsection' defined." when using non standard documentclass

when using this pecha class I'm getting this error

! LaTeX Error: No counter 'subsection' defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.938 ...heorem{covexercise}{Exercise}[subsection]

How to reproduce

$ cat <<EOF > nocounter.tex
\documentclass[a4pecha2,simple,12pt]{pecha}
\usepackage{covington}
\begin{document}
\end{document}
EOF

$ latexmk -pdv -pvc nocounter.tex

Just added newcounter before covington and now works.

$ cat <<EOF > nocounter.tex
\documentclass[a4pecha2,simple,12pt]{pecha}
\newcounter{subsection}
\usepackage{covington}
\begin{document}
\end{document}
EOF
$ latexmk -pdv -pvc nocounter.tex

Grouping words in the first (example) line

Hello, I am using LyX Version 2.3.6.1 and the included linguistics module. I would like to be able to group words, for which there is no one-to-one correspondence, in the example line (first line) as well.

Right now the following works as intended (in the pdf output):

word1 word2
{gloss1 gloss2} gloss3

But not the following:

{word1 word2} word3
gloss1 gloss2

Code to keep first line of glosss from being interlinearized

For various linguistic documents I've used the following code in the preamble of LyX in order to keep the Covington interlinearized examples from interlinearizing the first line:

{\catcode`\^^M=12 \endlinechar=-1 % 12 = other
\gdef\threesent#1^^M#2^^M#3^^M % #1 = first line, #2 = second line, #3 = third
    {\eachwordone#1\newline%
     \getwords(\linetwo,\eachwordtwo)#2 ^^M%
     \getwords(\linethree,\eachwordthree)#3 ^^M%
     \loop\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
          \lastword{\eachwordthree}{\linethree}{\wordthree}%
          \global\setbox\gline=\hbox{\unhbox\gline
                                     \hskip\glossglue
                                     \vtop{\box\lineone%\wordone   % vtop was vbox
                                           \nointerlineskip
                                           \box\wordtwo
                                           \nointerlineskip
                                           \box\wordthree
                                          }%
                                    }%
          \testdone
          \ifnotdone
     \repeat
     \egroup % matches \bgroup in \gloss
    }
}

This works in LyX 2.3.0, but my friend who used the same code in his document has a more recent version of LyX. The same file produces a pdf with correct output for me (first line of IGT not interlinearized) but not for him (first line of IGT interlinearized with other lines). This suggests that the issue is how LyX 2.3.3 handles gloss definitions, so I thought I would open this issue to get your recommendations on what needs to change in the redefinition code to fix it for the LyX 2.3.3 preamble.

I had a look through the Covington style code and I can't quite see where the mismatch in the redefinitions are.. appreciate your feedback.

"Title" for \subexample

For \subexample, if I add a bit of text before introducing \item (e.g. to 'title' the phenomenon that the data exemplify, for ease of reference), the subexample counters (a, b, etc) are no long at secondary list level, and instead they almost align with the example counter (See 1). Additionally, if the first example is a table, the (a) will get pushed down into the (b) (see 2).

Would it be possible to add an option for including a line of text before the first \item of the subexample environment?

minimal working example:

\documentclass{article}
\usepackage{covington}

\begin{document}

\begin{subexamples} \textit{vP-selecting Cause: Non-agent-oriented modification allowed below Cause}

\item \gll Here is some data
here is a gloss
\glt The (a,b) alignment is off \glend
\item \gll Here is some data
here is a gloss
\glt The (a,b) alignment is off \glend
\end{subexamples}

\begin{subexamples} \textit{Transitivizer-induced gemination}

\item Root-final segment eligible for gemination\
\begin{tabular}{|c|c|c|}\hline
Translation & Unacc-Past & Trans-Past \ \hline
X & X & x \
Y & Y & Y\ \hline
\end{tabular}

\item Root-final segment not eligible for gemination \

\begin{tabular}{|c|c|c|}\hline
Translation & Unacc-Past & Trans-Past \ \hline
Z & Z & Z\
V & V & V \\hline
\end{tabular}
\end{subexamples}
\end{document}

subex.pdf

How to set up a separate numbering in footnote?

How can I make it automatically use a separate numbering in footnote, for instance, I want the examples in the footnotes to be continuously listed in roman numbers (i), (ii), (iii). Thank you in advance!

Non latin text alignment: Keep glosslineone as it as and change just line two alignment

Hi,

I'm writing more in a request for help and guidance then to enhancemente or improvement. I have written latex text for a while but never risked myself on styles and packages.

I'm studying Tibetan language and I would like to create some latex templates for its traditional texts, called pechas. I'd struggled for a while on finding out how tu put word-by-word vertical translation. I discovered glossing and through your package I would like to modify for my needs.

I would like to keep the Tibetan text as it is and adjust the space only for the word-by-word translation. Something like this

image

There are 3 lines:

  1. Tibetan text
  2. word-by-word translation
  3. phonetics transliteration

I'm trying to achieve a latex template where I can do 1 and 2 together. I really believe your glossing code is a starting point for me. If you could point me if that is possible and maybe give me some idea on what to do I would be quite happy :)

Another issue, is that Tibetan doesn't use space as word separator, instead they use tseg(་). In order to make you package work I've set tseg as an space character, but when using gloss the tseg char disappear.

% Define tseg as a space
\catcode`\་=10

image

Thank very much for all your effort

glossed examples not working with beamer

The LyX wiki says that Covington and Beamer should work together pretty much out of the box (https://wiki.lyx.org/LyX/LinguistLyX#toc15) since 2.2.1, and since I'm now using 2.3 I thought I'd try it out. I created a new Beamer presentation and I get a bunch of errors when compiling, such as:
! Paragraph ended before \twosent was complete.
! LaTeX Error: \begin{flushleft} on input line 50 ended by \end{beamer@framepauses}.
etc.

I'm including a MWE below in case you can see what the issue is (rename the extension to .lyx to open it). Weirdly, it compiles fine when I delete the glosse environment, but throws all sorts of errors when I put it in.
Beamer_examples.txt

If you have a Beamer/Covington template that LyX users could use and that works, maybe you could put it up on the wiki so I can figure out what I'm doing wrong.

Using \[tri|di]gloss outside of example environment breaks fontstyle

Hi there,

First of all, thank you for this very useful package. I believe I have found a slight issue with the behaviour of font styling. Please consider the following MWE:

\NeedsTeXFormat{LaTeX2e}
\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}

\usepackage{covington}
\renewcommand{\glosslineone}{\normalfont\itshape}
\renewcommand{\glosslinetwo}{\footnotesize\sffamily}
\renewcommand{\glosslinethree}{\footnotesize\sffamily}

\usepackage{hyperref}

\begin{document}

  \trigloss[fsii={\itshape}]{building}
           {build -ing}
           {gloss GRAM}
           {translation}

  \begin{example}
    \digloss{Word}
            {gloss}
            {translation}
  \end{example}

\end{document}

image

Notice that the word "gloss" in the second interlinear is NOT in sans font as expected. I have determined that this is caused by the fact that the previous \trigloss is outside of the example environment. This may seem "wrong" maybe, but in the case where I was using it, I didn't want a number nor any kind of specific environment around this example, and so typed it like this. But then, the formatting which I had applied to the glosses in the preamble are broken. Compare to this example which behaves as expected:

\NeedsTeXFormat{LaTeX2e}
\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}

\usepackage{covington}
\renewcommand{\glosslineone}{\normalfont\itshape}
\renewcommand{\glosslinetwo}{\footnotesize\sffamily}
\renewcommand{\glosslinethree}{\footnotesize\sffamily}

\usepackage{hyperref}

\begin{document}
  \begin{example}
  \trigloss[fsii={\itshape}]{building}
           {build -ing}
           {gloss GRAM}
           {translation}
  \end{example}
  \begin{example}
    \digloss{Word}
            {gloss}
            {translation}
  \end{example}

\end{document}

image

Once again, thank you for your work on this package, and let me know if I can provide any more information on this issue.
Best regards,
Mark.

Adding the quotation marker for translation by myself with /digloss{}{}{}

Hi, is there a way that I can add the quotation by myself when I use the /digloss{}{}{} function? This will be particularly helpful in examples in which I need to add literal meaning and the real translation of the example.
Lun dao ni le
turn RST 2SG PST
Lit.: 'Turned to you'
'It's your turn.'

or when I need to specify the language at the end of the example (same line as the translation)
Lun dao ni le
turn RST 2SG PST
Lit.: 'Turned to you'
'It's your turn.' [Chinese]

Thanks!

Display not in accord with \renewcommand\theequation{}

Hi there,

I have been trying to get example numbering to display in the form 1.1, 1.2, 2.1, 2.2, 2.3 etc. where the fist digit is the chapter number. I have the following MWE:

\NeedsTeXFormat{LaTeX2e}
\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}

\usepackage{covington}
\counterwithin*{equation}{chapter}
\renewcommand\theequation{\thechapter.\arabic{equation}}
\usepackage{hyperref}

\begin{document}

  \newcounter{thiscounter}
  \renewcommand\thethiscounter{\thechapter.\arabic{thiscounter}}
  \setcounter{thiscounter}{1}

  \chapter{Chapter}

    This is a reference to interlinear~\ref{ex}, and my counter
    looks like this: \thethiscounter{}.

    \begin{example}
      \digloss{Word}
              {gloss}
              {translation}%
      \label{ex}
    \end{example}

  \chapter{Another Chapter}

    \stepcounter{thiscounter}

    This is a reference to another interlinear~\ref{otherex},
    but---oh no!---how do I tell it apart from a reference to
    interlinear~\ref{ex}, when my counter looks like this:
    \thethiscounter{}!

    \begin{example}
      \digloss{Anotherword}
              {anothergloss}
              {anothertranslation}%
      \label{otherex}
    \end{example}

\end{document}

I have included thiscounter as an illustration of what the behavior I would have expected is. It seems to me that this line: \renewcommand\theequation{\thechapter.\arabic{equation}} is being ignored or squashed somewhere by covington.

Thanks in advance for you help,
Best,
Mark.

compatible with tikz libraries for arrow drawing

Hi, I wonder if there could be a fix so that this package is compatible with packages for drawing arrows indicating syntactic movements. Thank you!

I pasted an example with the gb4e package from the Pomona Linguistics LaTex Template:

\usetikzlibrary{positioning} %does something for the positioning of arrows and I can't remember what
\usetikzlibrary{arrows,arrows.meta} %gives extra details for arrows (specifically, the tips of arrows)
\usepackage{pstricks} %for horizontal arrows in linear diagrams
\usepackage{pst-node} %for placing nodes in horizontal arrow diagrams

\ea \label{LinearExample}

\Lb{CP} \rnode{who2}{Who} \rnode{do2}{do} \Lb{TP} the children \rnode{do1}{\sout{do}} like to visit \rnode{who1}{\sout{who}} ? ] ] %the \rnode s have two arguments: the first is the name of the node and the second is the text that is shown.
\psset{linearc=3pt,nodesep=5pt} %this makes the arrows look pretty (rounded corners and not starting inside the words
\ncbar[angle=90]{<-}{who2}{who1} %this is the top arrow
\ncput*{wh-movement} %and this is the text on the top arrow. I'm pretty sure you just need to put the commands for the arrow and the text next to each other. No text necessary, this line can be deleted/commented out
\ncbar[angle=-90]{-}{do2}{do1} %this is the bottom arrow, the minus sign did that
\ncput*{T-C-mov't} % this is the text on bottom arrow.
\z

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.