# Tag Info

14

My answer consists of three parts. Step 1: decorate segments First, we would like to replace every segment by a dumbbell: This could be done, as the title suggests, by defining a decoration and applying it. So we may write \pgfdeclaredecoration{dumbbells}{initial} { \state{initial}[width=0pt,next state=depict one]{ \egroup % set up ...

10

LuaLaTeX embeds the Lua scripting language, which provides a powerful and flexible set of string manipulation functions. Via the \directlua macro and the environments provided by the luacode package, LuaLaTeX provides easy access to these string functions. By using LuaLaTeX, it's straightforward to roll one's own text and macro substitution routines. Per ...

7

The answer by Jake inspired me to write TikZ-Feynman, a dedicated package that uses TikZ' graph drawing library in order to draw Feynman diagrams. It has just recently been uploaded to CTAN and you can view more information over on the project page. Below is the code to draw three diagrams of increasing complexity which showcase some of the feature of ...

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 ...

5

The default installation of TeXLive is to install every package, so it usually won't be an issue; however, installing missing packages on the fly is possible with texliveonfly. It is available through CTAN, so to use it: tlmgr install texliveonfly % If not already installed texliveonfly document.tex If you're on Windows and have MikTeX, it will actually ...

4

Here is a solution based on atbegshi and answers packages. The idea is to use answers that write contents of theorem, lemma to an external file (mtfile.tex), discard all pages (all contents of the main file http://tex.stackexchange.com/a/267555/71471) and then use the external file to output only theorems. We use a newif test \onlytrue for only theorem and ...

4

The solution is to use \usepackage{morewrites} since basically any of the packages already loaded there grabs at least one (write) file handle, but the number of file handles is restricted to 16 registers only, unless morewrites is loaded. The question is: Are some of the packages really needed? Here is a short excerpt of the \jobname.log file ...

4

Just load geometry conditionally. Of course the documentation should make it clear that the package must be loaded after geometry, if this package is used. A test for this could be added. columbidaeTitle.sty % Copyright note: This package defines how titles should % be typeset at the columbidae University % Please check for updates ...

4

It is not in front of the command it is part of the command, in packages @ is a letter so \SB@foobar is just the command with name \SB@foobar package authors often use such a naming scheme to avoid clashes with other packages. In this case the songs package author has used this naming scheme \def\SB@star... so \SB@star could have been called \zzzstar ...

3

To prevent hyphenation of words before their respective fourth letter, say, just insert the instruction \lefthyphenmin4 (For English-language documents, one usually works with \lefthyphenmin2 and \righthyphenmin3.)

3

Usually there's a time lag between uploading on CTAN and transmitting it from CTAN to TeXLive (given the license is correct) -- it takes sometimes up to two days until packages are available for the distributions. (From clemens' comment: If TeXLive is frozen, it takes longer of course until the packages are taken from CTAN) The relevant package (most likely ...

2

Difference between morewrites and scrwfile morewrites aims at patching the TeX-primitives that are used for creating and writing to text files, that is \write, \openout and \closeout. the \newwrite-macro that is used for allocating \write-registers and that in turn uses the \openout-primitive. scrwfile aims at patching the ...

2

An other quite recent style is available here: http://mrzool.cc/tex-boilerplates/

2

If you are not particular about which \lightning symbol you use, you can substitute \usepackage{stmaryrd} %\lightning for \usepackage{marvosym} %\Lightning Or for another one with a lightning symbol, you can check page 101 from The Comprehensive LaTeX Symbol List to see other similar symbols. I don't know what other packages you need to add so this ...

2

Use \usepackage[bbgreekl]{mathbbol} in the preamble. Hollow omega (or any other minuscule Greek letter) can be typed with \bbomega. [For hollow epsilon, use \bbespilon.]

2

There is a package for blue book style written by Chrisopher DeCoro: LawTeX

2

In the specific case where Sublime Text is used for writing latex documents, one can use the package LaTeX Word Count.

1

It just means that you don't have those packages, You are using texlive 2015 so a command such as tlmgr update relsize should fetch that package and install it locally.

1

I created a package called TikZ-Feynman which is available from CTAN, and in today's update, I have added support for SUSY particles by allowing edge styles to be stacked. Here's the code for the above diagram \documentclass[tikz]{standalone} \usepackage[compat=1.1.0]{tikz-feynman} \begin{document} \feynmandiagram [large, horizontal=a to b] { i1 ...

1

! LaTeX Error: File `todonote.sty' not found. and /usr/share/texmf-dist/tex/latex/todonotes: todonotes.sty one has an s and one does not....

1

Use tlmgr to update. Put the packages in your texmf directory and do texhash to install new packages, and see How can I manually install a package on MiKTeX (Windows). LaTeX for Complete Novices also has a section on installing packages. That being said there are a lot of other reasons why you would not be getting any output from a package, other than it ...

1

Regarding your questions: How to know what is the TeXlive version I'm using, and how to know if it's the latest one? At a command prompt, type tlmgr --version. TeXLive is released once a year, 2015 is the current one. How to update it in case it's not updated (provided it's worth doing it, rather than remove the older version and install the up-to-date ...

1

Not a solution, but more of an explanation: There are two issues: by default \omega is defined not to react to math alphabet (contrarily to \Delta). This is the default situation without any package and is not changed by your loaded packages. in font bbold in U encoding (see file returned by kpsewhich Ubbold.fd for the specific tfm filenames), there is ...

1

It's “by design”. The definitions of \bra and \ket are % braket.sty, line 31: \def\bra#1{\mathinner{\langle{#1}|}} % braket.sty, line 32: \def\ket#1{\mathinner{|{#1}\rangle}} and \mathinner adds a thin space on either side of the construction. If you want to remove those additional thin spaces (which is not a bad idea, by the way), you can redefine them ...

1

The MiKTeX Package Manager for Windows is known under its abbreviation "MPM". You should be able to find it under all applications by looking under "M": Alternatively, you can also search for items and look for "MPM":

1

mathtools needs to go before mathabx

1

Of course there are 'placeholders' in (La)TeX -- 'every' macro is a place holder that will be expanded to it's meaning (or is a primitive that does something different) The xspace package is just for the correct spacing after the macro, but some will frown on this. The question is now: Is it worth to use much of those place holders? Rather not. In my ...

1

You can use the todonotes package to insert not in the margin: \documentclass{article} \usepackage{todonotes} \begin{document} A horse is \todo{not} able to fly. \end{document}

1

See section 4.1 in the documentation of struktex: you have to issue \MathNormal if you want to get the “normal” math font. \documentclass{scrreprt} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[standard-baselineskips]{cmbright} \usepackage{struktex} ...

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