言語例の 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}

しかし、トランスクリプトから複数の行を一列に並べたいので、表形式の環境に配置しようとしました。これは 1 つの例ではうまく機能しているようですが、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

これがあなたの求めているものかどうかはわかりませんが、単語ごとに例を説明するわけではないので、 と を使用して単語のセットをグループ化することができます。{...}これにより、 を使用しなくても単語が整列します。マクロでは、最大 3 行の整列が可能です。 は2 行になります。 は3 行になります。行を整列させようとしないでください。それがマクロの目的ではありません。より多くの行を取得するには、次に示す手法を使用できます。tabulargb4e\gll\glll\gltgb4e で複数の言語の注釈を揃える追加の回線(原理的にはそれ以上)を追加します。ただし、回線がもっとある場合は、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}

コードの出力

関連情報