Tag Info

Hot answers tagged

23

Following up on Matthew Leingang's answer, here's the same approach tied up with some syntactic sugar. It messes around with \catcode stuff, so care needs to be taken. \documentclass{standalone} \usepackage{tikz} \newcount\contourmarkcount \newdimen\contourraise {\catcode`\|=13 \gdef\installbarmark#1\ignorespaces{% #1\ignorespaces% ...


18

This is not commonly the way trees are represented in the linguistic literature, so none of the regular tree drawing packages (qtree and tikz-qtree) do this by default. Specifically, the way trees are drawn in the linguistics literature, the terminal nodes are not drawn at the same level (i.e. with the words along a baseline and the tree growing up from ...


17

I would use the famous \tikzmark macro and combine it with intersection coordinates. Here is the code: \documentclass{standalone} \usepackage{tikz} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {};}% \tikzstyle{intonation}=[rounded corners=2mm,yshift=1.5ex] \begin{document} \begin{tikzpicture}[remember ...


16

There are two ways to write IPA symbols in LaTeX. One uses regular pdfLaTeX and the tipa package; the other uses XeLaTeX or LuaLaTeX and you can enter the symbols directly into your source, assuming you have the correct fonts. The SIL Doulos font is an excellent Unicode IPA font that is widely used in Linguistics. You can download it here. I'll outline ...


16

There are good packages for numbering examples in linguistics which have been specifically designed by linguists to meet our needs. Two of the most commonly used ones are gb4e and linguex. The questions egreg linked to in the comments show some examples. A third package, ExPex is still in development, and is extremely powerful, although somewhat non-LaTeX ...


14

Interlinear glosses using ExPeX As I mentioned in my previous answer, I think that the ExPex package provides good tools for what you would like to do, although the input isn't thought out in the way you describe. The basic idea of automatic glossing in ExPex is that each line of the glosses is entered separately, and the package lines up the pieces in ...


13

TeX fonts have only 256 slots. And you can't mix encodings without telling LaTeX to do it; \textcyrillic defined by babel with the russian option does this. The last specified encoding becomes the default one. This should be a complete list of sans serif fonts available also in T2A encoding (for cyrillic): \documentclass{article} ...


13

I suggest you start from something like what is shown in the minimal below. You will have to input all three "words" line by line. I have used "|" as a delimiter and a ";" to end the macro as I feel it will be easier to capture the input this way. \documentclass{article} \usepackage[polutonikogreek, english]{babel} \fboxrule0pt \fboxsep1pt \parindent0pt ...


12

Both of the major linguistic example packages provide this functionality, although in different ways. I'm assuming you just want regular labelled bracketing as is normally done in articles in the literature (i.e., the brackets are all of a fixed size.) gb4e The gb4e package provides an \lb command for a labelled bracket: \documentclass{article} ...


12

Partitions similar to these, but with even higher degrees of syncing, are common in linguistics. At http://www.essex.ac.uk/linguistics/external/clmt/latex4ling/ most LaTeX resources for linguistics have been gathered. Specifically your synched texts are similar to what's called glosses in linguistics; and these can be handled by cgloss4e.sty. See ...


12

Since this answer might be of use to other linguists, I'm giving a detailed answer of how to effectively transfer documents from Word to TeX, assuming you are using the regular SIL phonetic fonts in Word. The modern TeX engines LuaTeX and XeLaTeX both use UTF-8 as their file encoding, and can use any OpenType font on your system. See the following for some ...


12

You will need tikz package tikz-qtree package This code will get you pretty near what you are trying to achieve: \documentclass[]{article} \usepackage[margin=1cm]{geometry} \usepackage{tikz} \usepackage{tikz-qtree} \newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}} \newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}} \begin{document} ...


12

Ok, here's a quick and dirty TiKZ solution. I haven't connected be in the diagram, although I assume it actually should be connected with seront. If you want to connect them, you could make a p3 node below now in the matrix and connect will and be to that and then connect that to seront. Update I've tweaked a few parameters to make the spacing between the ...


11

This isn't too hard to do with tikz-qtree. In order to get the movement arrow from T to C to go under the VP, I made the object DP a node and used that as a reference point to create an intermediate node that the line passes through. Thanks very much to both Peter Grill and percusse for suggesting elegant ways to avoid the VP structure. The final solution ...


11

I contacted the author of ExPex (John Frampton) and he was unaware of the web page issue. The issue has now been resolved, and the link in the question has been changed (although the link in the question now redirects there). He has no intentions of abandoning development of the package. It is likely that it will be uploaded to CTAN in the future. Until ...


11

If you use Alexis Dimitriadis' version of cgloss4e available here as cgloss.sty you can put language information right aligned with the first line of the example. This is IMO a very nice way to format such information, and quite common in the field: \documentclass{article} \usepackage{gb4e} \usepackage{cgloss} \usepackage{lipsum} \begin{document} ...


11

it's always better to use "precomposed" characters rather than trying to cobble something together. this may involve some work with font tools, and others on this list are better able to address that than i. however, many fonts created for use within linguistics environments are available from sil international, and i suggest looking there before trying to ...


10

You can add a node with a dot and instead of using in and out angles, use the bend parameter. \documentclass{standalone} \usepackage{tikz} \usepackage{tikz-qtree} \usepackage{tikz-qtree-compat} \usetikzlibrary{positioning} \newcommand\TR[1]{\textlangle#1\textrangle} \usepackage{ textcomp } \begin{document} \begin{tikzpicture} \Tree [ .TP [ .T\1 ...


10

It's Unicode character U+026B LATIN SMALL LETTER L WITH MIDDLE TILDE. See also The Comprehensive LaTeX Symbol List. wsuipa (PK-Fonts) \documentclass{article} \usepackage{ipa} \begin{document} \tildel \end{document} tipa \documentclass{article} \usepackage{tipa} \begin{document} \textltilde \end{document}


9

I'm not sure I put the coordinates on the right places (and reused \zzb in two points) but something like %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[a4paper,12pt, oneside]{article} \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase} \setmainfont{Charis SIL} \makeatletter ...


9

The warnings are harmless, and the substitutions will happen automatically. If you want to get rid of the warning you could redefine the \textipa command and the IPA environments to always use Computer Modern as shown in the example below. If you decide later to change to using e.g. mathptmx then you would need to change the definition of \tiparmdefault to ...


9

You can just make the text of the roof a node. (I also simplified the arrow syntax a bit.) \documentclass{article} \usepackage{tikz-qtree,tikz-qtree-compat} \tikzset{every tree node/.style={align=center, anchor=north}} \begin{document} \begin{tikzpicture} \Tree [.TP [.DP \edge[roof]; \node (J) {John}; ] [.T$'$ [.T ] [.\emph{v}P ...


9

Here's a way to do this using my version of the popular tikzmark macro, since the gb4e version of arrows is very cumbersome to use. If you need the real \tikzmark for some other purpose, you'll need to change the name of the macro in my code. Mainly this puts together bits of code from various sources. There are two issues to be solved: first connecting ...


9

gb4e sets the exe environment as a regular list. Moreover, every \ex macro defaults to \item (if you don't specify an optional argument). So, you can use enumitem to emulate the display, yet set some other properties as needed. The following MWE does exactly that (I grabbed the list parameters from g4be.sty) and provides myexe as the alternative: ...


9

A completely different approach from Werner's one. Load calc package and add \makeatletter \def\myex{\setlength{\parindent}{-\leftmargin+\labelsep}\@ifnextchar [{\@ex}{\item}} \makeatother in the preamble. Then use the newly defined \myex inside the exe environments where you want the special layout, e.g. \documentclass{article} ...


9

This isn't very pleasant to input, but here is one thought with plain XeTeX: \font\greek="GFS Olga" % http://www.greekfontsociety.gr/pages/en_typefaces20th.html \font\portuguese="TeX Gyre Pagella:mapping=tex-text" % http://www.gust.org.pl/projects/e-foundry/tex-gyre/pagella \font\bold="TeX Gyre Pagella/B" at 20pt \fontdimen3\portuguese=1em % let interword ...


9

Have a look at this thread, there are both tikz and tikz-qtree solutions there; this turns out to be very simple to do once you know the trick. Here's Alan Munn's final solution from there adapted for your particular question. (I didn't bother to try to get the IPA right.) \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} ...


9

Depending on your actual needs, this looks very much like the kind of job for the expex package. The ExPex package provides very sophisticated glossing macros which should do what you need. Here's an example from the documentation: \documentclass{article} \usepackage{expex} \begin{document} \ex[glhangstyle=none] \let\\=\textsc \begingl \gla Hom\^{a}o sa ...


9

There are probably a lot of different ways to address this, but I find the following quite effective: \draw[-latex] (aidais3.south) to[out=270,in=225,looseness=2] (temps.265); \draw[-latex] (aime.south) to[out=270,in=270,looseness=2] (temps.280); \draw[-latex] (détestes3.south) to[out=270,in=260,looseness=2] (temps.south); Note that I have specified the ...


9

If you need to do a lot of these, the pst-asr package is extremely powerful, but somewhat complicated. Compile the following with XeLaTeX. (Since it uses pstricks it can't be compiled with pdfLaTeX directly, and either needs XeLaTeX (as in this example) or LaTeX+dvips (in which case you would use the tipa package and not load fontspec, etc.) The spacing ...



Only top voted, non community-wiki answers of a minimum length are eligible