New answers tagged

3

Assuming that you have unicode input correctly declared either via \usepackage[utf8]{inputenc} or using xelatex or lualatex then `` will ligature to “ and produce identical output. So the pros and cons are all about the human interface to editing, not about latex. Most latex users use ascii input as they have been using it for a long time, but even ...


2

You almost do what you like to achieve. See, if this works for you (I just ad $ before and after your variables, which put them in math environment): \documentclass{article} \begin{document} $n_e$ and $n_i$ are the density of electrons and ions; $m_{\alpha}$ and $Z_{\alpha}$ are the mass and charge number of species $\alpha$; $v_e$ and $v_i$ are the average ...


6

You can exploit \new@ifnextchar from amsmath: \documentclass[]{article} \usepackage{amsmath} \usepackage{newtxtext,newtxmath} \usepackage{syntax} \usepackage{xpatch} \makeatletter \pretocmd{\grammar}{\let\@ifnextchar\new@ifnextchar}{}{} \makeatother \renewcommand{\syntleft}{$\langle$\normalfont\ttfamily} \begin{document} \begin{grammar} <a> ::= ...


5

The first part of your question is not specific to the syntax package. The problem is that in environments such as array and tabular and grammar, \\ directly followed by an opening square bracket is assumed to introduce an adjustment to vertical spacing. And a space beforehand doesn't prevent the next relevant token counting as the [. You don't want an ...



Top 50 recent answers are included