語言範例的 GB4E 格式

語言範例的 GB4E 格式

我正在撰寫語言學博士學位,我有很多從數據中提取的例子。我用於gb4e編號範例和註釋。標準示例如下圖所示:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{gb4e}

\begin{document}
\begin{exe} 
\ex
\gll Reece\textsubscript{1}: this is an example \emph{trên} Internet, \\
\hspace{0cm} \hspace{0cm} \hspace{0cm} \hspace{0cm} \hspace{0cm} on \\
\glt \hspace{1cm} ‘This is an example on the internet’ \\
\hspace*{\fill} (SpeakerA.SpeakerB.0906, 0:37.6 - 0:42.8) 
\label{ex:internet}
\end{exe}
\end{document}

然而,由於我有多行成績單並希望它們對齊,因此我嘗試將它們放入表格環境中。對於一個例子來說,這似乎運作得很好,但是當我有 2 個彼此相鄰時,這條\hspace線就變得一團糟並分成多個地方。範例編號也以某種方式移動到中間,而不是像上面的標準範例那樣位於範例的開頭。熟悉該軟體包的人可以幫助我:

  1. \hspace線放在正確的位置,並且
  2. 將範例編號恢復到應有的位置(如標準範例所示)?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{gb4e}

\begin{document}
\begin{exe} 
\ex
\begin{tabular}{l l}
   John\textsubscript{2}:  & $\emptyset$ you want to go to the zoo or Questacon? \\
                            & zoo see the animals. \\
\end{tabular}
\hspace*{\fill} (John.Mary.0709, 09:20.1 - 9:30.5) 
\label{ex:aux}
\end{exe}

\begin{exe} 
\ex
\begin{tabular}{l l}
   Mary\textsubscript{2}:  & you $\emptyset$ going there for nothing, \\
                            & because he is a man. \\
    Rosie\textsubscript{1}:   & He $\emptyset$ not giving standard.\\

\end{tabular}

\hspace*{\fill} (Mary.Rosie.0102, 2:12.3 - 3:32.1) 
\label{ex:aux4}
\end{exe}
\end{document}

答案1

我不確定這是否是您想要的,但由於您並沒有真正逐字逐句地註釋示例,因此您可以將單詞集分組在一起,{...}這樣就可以將它們排列起來,而無需使用tabular.巨集gb4e允許最多 3 條開箱即用的對齊線:\gll給您兩條線;\glll給你三行。你不應該試著排隊\glt;這不是它的目的。要獲得更多行,您可以使用此處所示的技術:將多種語言的註釋與 gb4e 對齊添加額外的行(或原則上更多)。但如果您有更多線路,那麼 ExPex 可能會更擅長。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{gb4e}
\newcommand\sub{\textsubscript}

\begin{document}
\begin{exe} 
\ex
\glll {Reece\sub{1}:} {this is an example} {\emph{trên} Internet,} \\
 {} {} on {}\\
 {} {‘This is an example} {on the internet’}\\

\hfill (SpeakerA.SpeakerB.0906, 0:37.6 - 0:42.8) 
\label{ex:internet}
\end{exe}

\begin{exe} 
\ex
\gll John\sub{2}:  {$\emptyset$ you want to go to the zoo or Questacon?} \\
   {} {zoo see the animals.} \\

\hfill(John.Mary.0709, 09:20.1 - 9:30.5) 
\label{ex:aux}
\end{exe}

\begin{exe} 
\ex
\glll
   {Mary\sub{2}:}  {you $\emptyset$ going there for nothing,} \\
        {}           {because he is a man. }\\
    {Rosie\sub{1}:}   {He $\emptyset$ not giving standard.}\\

\hfill (Mary.Rosie.0102, 2:12.3 - 3:32.1) 
\label{ex:aux4}
\end{exe}
\end{document}

程式碼的輸出

相關內容