0

I am building a dictionary in which each entry is generated by \guientry command defined as follows.

% #1: index, #2: orthography, #3: pronunciation, #4: part of speech, #5: explanation
\newcommand{\guientry}[5]{\hangindent = 1cm%
\textbf{#1} #2 #3 \textit{#4}.\ #5}

When the item name is too long, the line will overflow to the right, as shown by the red box in the image below. Basically I expect outputs like the line with blue box, which do not overflow to the right (this output was generated with \hfill).

How can I get the expected results like the blue box without ad hoc solution like \hfill? I think some \penalty commands are related to this, but I do not know the exact solution.

enter image description here

Full .tex files are as follows:

\documentclass[a4paper,xelatex,nomag,twoside,titlepage]{bxjsarticle}

\usepackage{fontspec}
\setmainfont{Charis SIL}
\setsansfont{Arial}

% Hyphenation
\hyphenpenalty=10000\relax
\exhyphenpenalty=10000\relax
\sloppy

% Multiple columns
\usepackage{multicol}

% define entry
% #1: index, #2: orthography, #3: pronunciation, #4: part of speech, #5: explanation
\newcommand{\guientry}[5]{\hangindent = 1cm%
\textbf{#1} #2 #3 \textit{#4}.\ #5}


% define markups
\newcommand{\defin}[1]{#1}
\newcommand{\defn}[1]{#1}
\newcommand{\guiex}[1]{\textit{#1}}
\newcommand{\engex}[1]{`#1'}
\newcommand{\guiwd}[1]{\textit{#1}}
\newcommand{\engwd}[1]{#1}


\usepackage{graphicx}
\begin{document}

\begin{multicols*}{2}
    \linepenalty-100000
    \guientry{qχʼárà}{(kx'árà)}{}{v}{\defin{to scrape hairs off from a central part of a steenbok fur in order to make a traditional skirt.}}

    \guientry{qχʼárā}{(kx'árā)}{}{n}{\defin{impala, a game animal (larger than springbok).} (possibly loan from Naro)}
    
    \guientry{qχʼárè}{(kx'árè)}{}{v}{\defin{to scrape round its trunk in cutting a big tree.}}
    
    \guientry{qχʼárō}{(kx'árō)}{}{n}{\defin{a deep and large hole (e.g.\ of aardvark/porcupine).}}
    
    \guientry{qχʼārū}{(kx'ārū)}{}{n}{\defin{sp.\ tree. \textit{Albizia anthelmintica}. (classifed as \guiwd{ìī}).}}
    
    \guientry{qχʼáū}{(kx'áū)}{}{v (taste)}{\defin{bitter; astringent; extremely salty.}}
    
    \guientry{qχʼāwā}{(kx'āwā)}{}{particle}{\defin{marker of the remote future tense.}}
    
    \guientry{qχʼáḿ}{(kx'áḿ)}{}{n}{\defin{the way, the manner. used as a nominalizer.}}
    
    \guientry{qχʼáḿ}{(kx'áḿ)}{}{n}{\defin{a mouth; a blade; the beginning.}}
    
    \guientry{qχʼáḿ}{(kx'áḿ)}{}{v}{\defin{to hit. (rare).}}
    
    \guientry{qχʼáḿ-ɡǁṵ́bí-tsʼī}{(kx'áḿ-ǁgú'bí-ts'ī)}{[qχʼáḿ-ɡǁúᵊˤbí-tsʼī]}{n}{\defin{upper cheek.}}

    \hangindent = 1cm %
    \textbf{{qχʼáḿ-ɡǁṵ́bí-tsʼī}} \hfill (kx'áḿ-ǁgú'bí-ts'ī) [qχʼáḿ-ɡǁúᵊˤbí-tsʼī] \textit{n}.\ \defin{upper cheek.}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}
\end{multicols*}

\end{document}

Thank you.

7
  • on line 55 \guientry{qχʼáḿ-ɡǁṵ́bí-tsʼī}{(kx'áḿ-ǁgú'bí-ts'ī)}\\{[qχʼáḿ-ɡǁúᵊˤbí-tsʼī]}{n}{\defin{upper cheek.}} seems to give the same solution as your blue box but without the big gap on the first line, is this what you want?
    – Paul A
    Oct 8, 2022 at 7:25
  • Manual workaround: add some soft spaces, they become glue: \guientry{qχʼáḿ-ɡǁṵ́bí-tsʼī}{(kx'áḿ-ǁgú'bí-ts'ī) }{[qχʼáḿ- ɡǁúᵊˤbí-tsʼī] }{n}{\defin{upper cheek.}}.
    – Cicada
    Oct 8, 2022 at 7:29
  • Paul A's output is what I'm lokking for, but I'd like to lose a bit more ad hoc in my approach. In other words, if an item name is too long and overflows, I want a line to be automatically (without manual addition of \\) broken appropriately.
    – Kanji
    Oct 8, 2022 at 8:02
  • 1
    you could try to set \emergencystretch20pt. Oct 8, 2022 at 8:09
  • have a look at this post tex.stackexchange.com/questions/451404/… it might help with what you need
    – Paul A
    Oct 8, 2022 at 8:19

2 Answers 2

1

Putting \emergencystretch20pt worked well.

So the code is:

\documentclass[a4paper,xelatex,nomag,twoside,titlepage]{bxjsarticle}

\usepackage{fontspec}
\setmainfont{Charis SIL}
\setsansfont{Arial}

% Hyphenation
\hyphenpenalty=10000\relax
\exhyphenpenalty=10000\relax
\sloppy

% Multiple columns
\usepackage{multicol}

% define entry
% #1: index, #2: orthography, #3: pronunciation, #4: part of speech, #5: explanation
\newcommand{\guientry}[5]{\hangindent = 1cm%
\textbf{#1} #2 #3 \textit{#4}.\ #5}


% define markups
\newcommand{\defin}[1]{#1}
\newcommand{\defn}[1]{#1}
\newcommand{\guiex}[1]{\textit{#1}}
\newcommand{\engex}[1]{`#1'}
\newcommand{\guiwd}[1]{\textit{#1}}
\newcommand{\engwd}[1]{#1}


\usepackage{graphicx}
\begin{document}

\begin{multicols*}{2}
    \emergencystretch20pt
    \guientry{qχʼárà}{(kx'árà)}{}{v}{\defin{to scrape hairs off from a central part of a steenbok fur in order to make a traditional skirt.}}

    \guientry{qχʼárā}{(kx'árā)}{}{n}{\defin{impala, a game animal (larger than springbok).} (possibly loan from Naro)}
    
    \guientry{qχʼárè}{(kx'árè)}{}{v}{\defin{to scrape round its trunk in cutting a big tree.}}
    
    \guientry{qχʼárō}{(kx'árō)}{}{n}{\defin{a deep and large hole (e.g.\ of aardvark/porcupine).}}
    
    \guientry{qχʼārū}{(kx'ārū)}{}{n}{\defin{sp.\ tree. \textit{Albizia anthelmintica}. (classifed as \guiwd{ìī}).}}
    
    \guientry{qχʼáū}{(kx'áū)}{}{v (taste)}{\defin{bitter; astringent; extremely salty.}}
    
    \guientry{qχʼāwā}{(kx'āwā)}{}{particle}{\defin{marker of the remote future tense.}}
    
    \guientry{qχʼáḿ}{(kx'áḿ)}{}{n}{\defin{the way, the manner. used as a nominalizer.}}
    
    \guientry{qχʼáḿ}{(kx'áḿ)}{}{n}{\defin{a mouth; a blade; the beginning.}}
    
    \guientry{qχʼáḿ}{(kx'áḿ)}{}{v}{\defin{to hit. (rare).}}
    
    \guientry{qχʼáḿ-ɡǁṵ́bí-tsʼī}{(kx'áḿ-ǁgú'bí-ts'ī)}{[qχʼáḿ-ɡǁúᵊˤbí-tsʼī]}{n}{\defin{upper cheek.}}

    \hangindent = 1cm %
    \textbf{{qχʼáḿ-ɡǁṵ́bí-tsʼī}} \hfill (kx'áḿ-ǁgú'bí-ts'ī) [qχʼáḿ-ɡǁúᵊˤbí-tsʼī] \textit{n}.\ \defin{upper cheek.}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}

    \guientry{qχʼáḿ-ŋǀà}{(kx'áḿ-ǀnà)}{}{n}{\defin{the first stomach.}}
    
    \guientry{qχʼàǹ}{(kx'ànǹ)}{}{adv}{\defin{just (because). (discourse marker to emphasize the reason).}}
    
    \guientry{qχʼánì}{(kx'ánì)}{}{n}{\defin{a large termite (\textit{Hodotermes mossambicus}). (edible. flies with wings).}}
    
    \guientry{qχʼānū}{(kx'ānū)}{}{v}{\defin{(clothes) to suit (someone); (food) to be one's taste. be suitable to. to be lucky} \guiex{ʔāã̄-χò sì cíā qχʼānū.} \engex{The dress suits me.} \guiex{ǃʔūm̄-ǀʔè dzì cíā qχʼānū.} \engex{I am lucky with good edible roots (\textit{Cucumis kalahariensis}).} }
    
    \guientry{qχʼō}{(kx'ō)}{}{particle}{\defin{marker of the remote past tense.}}
\end{multicols*}

\end{document}
1

Not an answer, but more an exploration of an alternative.

I was wondering what an e-only version would look like: it would not need to be constrained by paper-and-ink costs and other related hardcopy considerations, and could afford to space things out a bit so that line-breaking and hyphenation becomes less of a worry.

But more importantly, it could present the information in a visually structured way, such that the eye could find that information almost automatically.

dictionary

Here, an expl3 sequence is used to read in a delimited list of records whose fields could themselves be further (different) records. Formatting is done in one spot and is separated from the data, making any format changes or rearrangement trivial.

It means, though, that the data has to be strictly structured, but that is not impossible, and not onerous either - almost like the idea of a bibliography database.

Ultimately, the raw data could be stored in a spreadsheet, and from there to TeX would be only one step.

MWE

\documentclass[a4paper,lualatex,ja=minimal,nomag,twoside,titlepage]{bxjsarticle}
\usepackage{xcolor}

\usepackage[no-math]{fontspec}
\setmainfont{Noto Serif}%Charis SIL}
\setsansfont{Noto Sans}
\setmonofont{Noto Sans Mono}
\newfontface\fsym{Noto Sans Symbols2}
\newcommand\exampleitem{{\color{blue}\fsym\Uchar9900}}

% Hyphenation
%\hyphenpenalty=10000\relax
%\exhyphenpenalty=10000\relax
\sloppy

% Multiple columns
\usepackage{multicol}

% define entry
% #1: index, #2: orthography, #3: pronunciation, #4: part of speech, #5: explanation
\newcommand{\guientry}[5]{\hangindent = 1cm%
\textbf{#1} #2 #3 \textit{#4}.\ #5}


% define markups
\newcommand{\defin}[1]{#1}
\newcommand{\defn}[1]{#1}
\newcommand{\guiex}[1]{\textit{#1}}
\newcommand{\engex}[1]{`#1'}
\newcommand{\guiwd}[1]{\textit{#1}}
\newcommand{\engwd}[1]{#1}

\usepackage{graphicx}



\newcommand\semi{;}
\newcommand\comma{,}

%...............................................................................................
\ExplSyntaxOn


        \cs_generate_variant:Nn 
            \seq_gset_split:Nnn 
            { cno }

    \tl_new:N 
            \g_fc_namespace_tl



\tl_new:N \l_dict_word_tl
\tl_new:N \l_dict_translit_tl
\tl_new:N \l_dict_ipa_tl
\tl_new:N \l_dict_grammar_tl
\tl_new:N \l_dict_meaning_tl
\tl_new:N \l_dict_comment_tl

\tl_new:N \l_dict_examplea_tl
\tl_new:N \l_dict_exampleaorig_tl
\tl_new:N \l_dict_exampleagloss_tl
\tl_new:N \l_dict_exampleb_tl
\tl_new:N \l_dict_exampleborig_tl
\tl_new:N \l_dict_examplebgloss_tl
\tl_new:N \l_dict_examplec_tl
\tl_new:N \l_dict_examplecorig_tl
\tl_new:N \l_dict_examplecgloss_tl


%****************************************************
%*
%****************************************************
%------------------
    \cs_set:Npn \ic_funcdictgetrecord:n #1 { 
    % 1 = seq item = record
            \seq_set_split:Nnn 
                    \l_tmpa_seq 
                    { ; } 
                    { #1 }
                    
            \tl_set:Nx \l_dict_word_tl        {\seq_item:Nn\l_tmpa_seq{1}}
            \tl_set:Nx \l_dict_translit_tl     {\seq_item:Nn\l_tmpa_seq{2}}
            \tl_set:Nx \l_dict_ipa_tl           {\seq_item:Nn\l_tmpa_seq{3}}
            \tl_set:Nx \l_dict_grammar_tl   {\seq_item:Nn\l_tmpa_seq{4}}
            \tl_set:Nx \l_dict_meaning_tl    {\seq_item:Nn\l_tmpa_seq{5}}
            \tl_set:Nx \l_dict_comment_tl   {\seq_item:Nn\l_tmpa_seq{6}}
            \tl_set:Nx \l_dict_examplea_tl   {\seq_item:Nn\l_tmpa_seq{7}}
            \tl_set:Nx \l_dict_exampleb_tl   {\seq_item:Nn\l_tmpa_seq{8}}
            \tl_set:Nx \l_dict_examplec_tl   {\seq_item:Nn\l_tmpa_seq{9}}

%           \tl_show:N \l_dict_word_tl        
%           \tl_show:N \l_dict_translit_tl     
%           \tl_show:N \l_dict_ipa_tl           
%           \tl_show:N \l_dict_grammar_tl   
%           \tl_show:N \l_dict_meaning_tl    
%           \tl_show:N \l_dict_comment_tl   
            
            \tex_par:D
            \medskip
            \tex_noindent:D
            \tex_hangindent:D = 1em
            \tex_hangafter:D = 1
            \textbf{\textcolor{blue}{
            \tl_use:N \l_dict_word_tl
}}

\tl_if_empty:NF
\l_dict_meaning_tl
{
%\\
\hspace{1.5em}
            \tl_use:N \l_dict_meaning_tl
}

\tl_if_empty:NF
\l_dict_comment_tl
{
            \tex_space:D
            --
            \tex_space:D
            (
            \tl_use:N \l_dict_comment_tl
            )
}
.
            



\tl_if_empty:NF
\l_dict_translit_tl
{
\\
\hspace{0.5em}\textsf{(
            \tl_use:N \l_dict_translit_tl
)}
}

\tl_if_empty:NF
\l_dict_ipa_tl
{
\\
\hspace{1em}\texttt{[
            \tl_use:N \l_dict_ipa_tl
]}
}

\tl_if_empty:NF
\l_dict_grammar_tl
{
\\
\hspace{1.5em}\textit{
            \tl_use:N \l_dict_grammar_tl
}
}


\tl_if_empty:NF
\l_dict_examplea_tl
{
            \seq_set_split:NnV 
                    \l_tmpb_seq 
                    { = } 
                    \l_dict_examplea_tl 
%           \tl_show:N
%                   \l_dict_examplea_tl   
%           \seq_show:N
%                   \l_tmpb_seq 
            \tl_set:Nx 
                    \l_dict_exampleaorig_tl   
                    {\seq_item:Nn\l_tmpb_seq{1}}
            \tl_set:Nx 
                    \l_dict_exampleagloss_tl   
                    {\seq_item:Nn\l_tmpb_seq{2}}
%           \tl_show:N
%                   \l_dict_exampleaorig_tl   

            \\
            \exampleitem
            \tex_space:D
            \textcolor{blue}{
            \textit{
            \tl_use:N \l_dict_exampleaorig_tl
            }}
            \tex_space:D
            \tl_use:N \l_dict_exampleagloss_tl
}

\tl_if_empty:NF
\l_dict_exampleb_tl
{
            \seq_set_split:NnV
                    \l_tmpb_seq 
                    { = } 
                    \l_dict_exampleb_tl 
            \tl_set:Nx 
                    \l_dict_exampleborig_tl   
                    {\seq_item:Nn\l_tmpb_seq{1}}
            \tl_set:Nx 
                    \l_dict_examplebgloss_tl   
                    {\seq_item:Nn\l_tmpb_seq{2}}

            \\
            \exampleitem
            \tex_space:D
            \textcolor{blue}{
            \textit{
            \tl_use:N \l_dict_exampleborig_tl
            }}
            \tex_space:D
            \tl_use:N \l_dict_examplebgloss_tl
}

\tl_if_empty:NF
\l_dict_examplec_tl
{
            \seq_set_split:Nnv
                    \l_tmpb_seq 
                    { = } 
                    \l_dict_examplec_tl 
            \tl_set:Nx 
                    \l_dict_examplecorig_tl   
                    {\seq_item:Nn\l_tmpb_seq{1}}
            \tl_set:Nx 
                    \l_dict_examplecgloss_tl   
                    {\seq_item:Nn\l_tmpb_seq{2}}

            \\
            \exampleitem
            \tex_space:D
            \textcolor{blue}{
            \textit{
            \tl_use:N \l_dict_examplecorig_tl
            }}
            \tex_space:D
            \tl_use:N \l_dict_examplecgloss_tl
}


            
    }




%****************************************************
%*
%****************************************************
%--------------------
\NewDocumentCommand { \mfsloadaseq } { o m +m } { % 1=seq name, 2=data

                \IfNoValueTF { #1 } 
                        { \tl_clear:N \g_fc_namespace_tl } 
                        { \tl_gset:Nn \g_fc_namespace_tl { #1 } }


    \cs_if_free:cT
            { g_fc_rwe \g_fc_namespace_tl #2 _seq }
            { \seq_new:c
                    { g_fc_rwe \g_fc_namespace_tl #2 _seq } 
            }
    \seq_gclear:c 
            { g_fc_rwe \g_fc_namespace_tl #2 _seq } 
    \seq_gset_split:cno 
            { g_fc_rwe \g_fc_namespace_tl #2 _seq } 
            { , } 
            { #3 }

%   \seq_show:c 
%           { g_fc_rwe \g_fc_namespace_tl #2 _seq } 


}

%****************************************************
%*
%****************************************************
%--------------------
\NewDocumentCommand { \mfsprintdict } { o m } { 
% 1=seq name

                \IfNoValueTF { #1 } 
                        { \tl_clear:N \g_fc_namespace_tl } 
                        { \tl_gset:Nn \g_fc_namespace_tl { #1 } }




%: for each record
            \seq_map_function:cN 
                    { g_fc_rwe 
                      \tl_use:N
                            \g_fc_namespace_tl 
                            #2
                       _seq } 
                    \ic_funcdictgetrecord:n
                    
%   \seq_show:c 
%           { g_fc_rwe \g_fc_namespace_tl #2 _seq } 


}


\ExplSyntaxOff


\begin{document}

\begin{multicols*}{2}

\mfsloadaseq{qdict}{%
qχʼárà
;kx'árà
;
;verb
;to scrape hairs off from a central part of a steenbok hide in order to make a traditional skirt
,qχʼárā
;kx'árā
;
;noun
;impala\semi\ a game animal (larger than springbok)
;possibly loan from Naro
,qχʼárè
;kx'árè
;
;verb
;to scrape round its trunk in cutting a big tree
,qχʼárō
;kx'árō
;
;noun
;a deep and large hole (e.g.\ of aardvark/porcupine)
,qχʼārū
;kx'ārū
;
;noun
;a species of tree. \textit{Albizia an\-thel\-min\-ti\-ca}
;classifed as \guiwd{ìī}
,qχʼáū
;kx'áū
;
;verb
;(taste) bitter\semi\ astringent\semi\ extremely salty
,qχʼāwā
;kx'āwā
;
;particle
;
;marker of the remote future tense
,qχʼáḿ
;kx'áḿ
;
;noun
;the way\comma\ the manner
;used as a nominalizer
,qχʼáḿ
;kx'áḿ
;
;noun
;a mouth\semi\ a blade\semi\ the beginning
,qχʼáḿ
;kx'áḿ
;
;verb
;to hit
;\textit{rare}
,qχʼáḿ-ɡǁṵ́bí-tsʼī
;kx'áḿ-ǁgú'bí-ts'ī
;qχʼáḿ-ɡǁúᵊˤbí-tsʼī
;noun
;upper cheek
;
,qχʼáḿ-ŋǀà
;kx'áḿ-ǀnà)
;
;noun
;the first stomach
,qχʼàǹ
;kx'ànǹ
;
;adverb
;just (because)
;discourse marker to emphasize the reason
,qχʼánì
;kx'ánì
;
;noun
;a large termite (\textit{Hodotermes mossambicus})
;edible\semi\ flies with wings
,qχʼānū
;kx'ānū
;
;verb
;(clothes) to suit (someone)\semi\ (food) to be one's taste -- be suitable to -- to be lucky
;
;ʔāã̄-χò sì cíā qχʼānū.=The dress suits me.
;ǃʔūm̄-ǀʔè dzì cíā qχʼānū.=I am lucky with good edible roots (\textit{Cucumis kalahariensis}).
,qχʼō
;kx'ō
;
;particle
;
;marker of the remote past tense
}

\mfsprintdict{qdict}

\end{multicols*}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .