Tag Info

Hot answers tagged

46

As Kurt mentions in the comments, the directives are understood by TeXShop and TeXWorks. The TS stands for TeXShop which was the IDE that first implemented them on the Mac. (Other editors have similar kinds of metadata). I'll comment on each directive separately, since I think they are not equally useful. My comments apply in principle to both TeXShop ...


32

I managed to find the perfect solution! For some reason, this didn't show up on my previous Google searches. I tailored my version of this solution: http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/ My version (on a 64-bit Windows 7 machine) is as follows: Download and install Basic MiKTeX 2.9 (32-bit) Download and install SumatraPDF ...


29

Advantage If you use biblatex or multiple languages with babel or polyglossia, you can benefit from the integrated commands of csquotes. There are commands to quote in languages other than the main language so that the quoted text is typeset in accordance with the rules of the language. There are also commands to make formal quotes, both in the main ...


28

There is ktikz (also available in the qtikz version), which seems not only run on Linux/KDE but also on Windows. Version 0.10 is released. This version is available as an Ubuntu package for Lucid, as a Debian package for Squeeze and as a Windows installer (a patch release 0.10.1 is available). For Linux there are two versions available: KtikZ and QtikZ. ...


27

As a tip for the future: When creating big tables, I make a command to encode the row. \newcommand{\resultrow}[4]{#1 & #2 & #3 & #4 \\} If you then want to change the order/layout of something you only have to change the command definition. You should take care in making the command as descriptive as possible, and that the arguments are in ...


27

Stick point somewhere near \usepackage{array,colortbl} and two buffers will open up for array and colortbl packages if you do M-x getpackage which you can bind to a key of your choice (defun getpackage () (interactive) (search-backward "\\") (re-search-forward "usepackage[^{}]*{" nil t) (while (looking-at "\\s-*,*\\([a-zA-Z0-9]+\\)") (re-search-forward ...


26

Any editor with regular expression replace can easily swap columns. For example on the command line if tab.tex contains your input this regexp will swap column 2 and 3. (You may need more or less backslashes in the regexp depending on the command line shell in use) sed -e "s/^\([^\&]*\)\&\([^\&]*\)\&\([^\&]*\)/\1\3\2/" tab.tex A ...


24

Latexmk has an option that will compile your document every time you save it. It requires Perl. There is also some very useful information in this Stackoverflow question about how to work with latexmk when you document has errors (which can happen a lot with TikZ).


22

On a Mac, you can of course just open up a terminal, cd to the directory where you keep the TeX file, and issue while true; do sleep 5; latex -halt-on-error filename.tex; done and have the DVI file open in a viewer that watches for (and reloads on) changes. The one-liner runs latex continuously with 5 second break between runs (the -hald-on-error options ...


22

I am very happy with vim and the tabular plugin. To align the table, place the cursor anywhere inside the (nonaligned) table and type :Tabularize /&. The result is a nicely aligned table. Before: moon&456456456423423534&2342523 sun&234324&3453 Then a :Tabularize /&, after: moon & 456456456423423534 & 2342523 sun & ...


22

Complete Highlighting Scheme for WinEdt This is a highlighting scheme for expl3 in WinEdt 8. New: It is now available as an add-on: LaTeX3 Highlighting LaTeX3 guards in .dtx files Add the following lines in Switches.ini just before the switch SWITCH="DTX Single Guard" SWITCH="DTX LaTeX3 Guard" ENABLED=1 MODE_FILTER="DTX" START="DTX %" ...


21

There are two separate tasks here: making your keyboard produce the various Unicode symbols, and making those symbols meaningful to LaTeX. 1. Producing Unicode symbols from your keyboard If you're on a Mac, make a .keylayout file, put it in the ~/Library/Keyboard Layouts directory, then log out and back in again. Your new keyboard layout should now appear ...


20

I am glad you are still willing to give TeX a shot! The learning curve can be steep, but hopefully this site can help. There are already answers for most of the points you raised: Installing and using fonts is a pain. This can be difficult- but package management tools like TeX Live's tlmgr amd MikTeX's mpm can take most of the pain away. The LaTeX ...


20

For the record, here's my font-lock settings for Emacs with LaTeX3. To make use of these, I define a latex3-mode which is derived from the inbuild latex-mode. (Note: I don't use AucTeX, I use the simple TeX modes.) The idea of the font-locking is similar to Joseph's in that it adds more matches for highlighting. I've added a specials for core functions ...


19

Well even if I know which quotes I want to use in a document: I would find it painful to remember which quotes and keyboard keys to use in an English text, and which in the German and whatever a Frenchman must use in a French text. Actually at the time csquotes appeared I was just thinking about a generic system to relieve me from trying to remember which of ...


18

There are already good answers here, but there's a moral imperative to point out that, of course, there's an easy way to do this in emacs (or xemacs), without using regular expressions. You can copy a column to a register using copy-rectangle-to-register, paste it in as a new column using insert-register, and then delete the unwanted column using ...


18

The general problem of finding where a command is defined has no viable solution. Macros can and do change their meaning; a typical example is \\. This simple document \documentclass{article} \begin{document} \show\\ {\centering\show\\} \begin{tabular}{c} \show\\ \end{tabular} \end{document} gives the following output in the terminal window: > ...


17

These are some of the things I do Have semantic markup for typing equations. It probably depends on your field, or the target audience, but on some of my slides about half of the content is equations. Defining macros that explain the meaning rather than the syntax of my math formulas helps to keep the source readable and often also concise. (And this is ...


17

I think you must first understand the TeX/LaTeX typesetting system. TeX and its offspring PdfTeX, XeTeX, LuaTeX, etc. are programs that interpret a specific markup/macro language to create a high quality printable document format. TeX's power resides in its line, paragraph, and page breaking algorithms for pieces of text and its power to typeset mathematics. ...


17

TeXworks uses a simple regex-based approach to syntax highlighting, with the information stored in the file syntax-patterns.txt inside the folder TeXworks/configuration, which lives in a system-dependent location. I have a set of patterns for working with .dtx (LaTeX documented source) files, which include highlighting for expl3 code: [LaTeX DTX] # ...


16

There's a tool called latexdiff which highlights differences between 2 tex files. You call it this way: latexdiff [ OPTIONS ] old.tex new.tex > diff.tex And then you run pdflatex on diff.tex and you will get a new pdf file which highlights changes in the document (quite similar to the review option in MS Word). Later edit: If you wish to compare ...


16

One thing you need to move from MS Word to TeX and friends is to drop the desire for WYSIWYG. For complicated documents that paradigm is, at best, WYSIPCTYADFWYG: What You See is Probably Close To, Yet Actually Different From, What You Get. (Not the basis of a marketing campaign!) TeX and friends offer a fundamentally different way to think about document ...


16

Alan Munn’s answer covered most of the question for TeXShop; I’ll explain them for TeXworks. (This is adapted from Joseph Wright’s blog post TeXworks ‘magic comments’.) % !TeX program =〈program〉: 〈program〉 should be one of the programs set up in TeXworks and is case-insensitive. (Note that the “TS-” in TS-program is optional in TeXworks.) % !TeX encoding ...


15

Eclipse strikes me as an odd choice of an IDE to use for LaTeX, but I guess it should work, since the steps in producing a LaTeX-generated document are quite similar to those involved in producing a computer program. The first step is obviously to make sure you have Eclipse and LaTeX themselves installed. Then, if you haven't already done so, you should ...


14

MiKTeX is a good bundle on Windows. It includes the LaTeX environment as well as an editor. Should be enough to get you started. For WYSIWYG there is Lyx (though they call it "What You See Is What You Mean"/WYSIWYM, not WYSIWYG).


14

In your TeXnicCenter installation folder and subfolders look out for xml files, such as base.xml and math.xml. Edit these files or create your own xml file. Some example lines for align autocompletion: <lxEnvironment name="align" parameters="1" desc="Math environment" icon="math.bmp" index="10" ...


13

I have two strong recommendations: TeXworks: if you like it quick and easy, it's usually already installed by MiKTeX and TeX Live, so just try. TeXnicCenter: if you would like to work with a complex LaTeX editor with project management and a lot of features, toolbars and output options. Further LaTeX editors for Windows are listed here: Distributions, ...


13

I would recommend you to install the full TeXLive manually (i.e. not using the Ubuntu packages) with both Linux and Windows binaries to the shared drive. The full TeXLive is about 2.6GB in size and should contain every package which is also available in MikTeX, except brand-new packages not yet included. Installing everything avoids any issues with missing ...


13

There are many programs that can export Pgf or TikZ code of diagrams or pictures generated there. For example Geogebra is a geometry software that can export nice TikZ code. Dia is a diagram design software that exports Pgf code. Inkscape is a vector drawing software (similar to Corel Draw) has a plugin to export TikZ code A full list of this can be ...


13

May be Tikzedt (works on windows and linux) is what you are looking for. TikZ/PGF is a pair of widely used languages for creating vector graphics, in particular in Latex documents. There are a couple of editors assisting in the creation of TikZ code. However, mostly one has the choice between a text editor with preview, with no WYSIWYG capabilities, and ...



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