parent_url
stringlengths
41
46
parent_score
stringlengths
1
4
parent_body
stringlengths
25
35.5k
parent_user
stringlengths
37
42
parent_title
stringlengths
12
150
accepted
bool
2 classes
body
stringlengths
4
36.7k
score
stringlengths
1
4
user
stringlengths
37
42
answer_id
stringlengths
1
6
__index_level_0__
int64
0
322k
https://tex.stackexchange.com/questions/291
46
How to wrap text around a figure in LaTeX like this? ``` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis mi ut elit interdum imperdiet quis non ante. Sed imperdiet, sapien quis +------------------------+ viverra rhoncus, tellus dui | | dictum nisl, at porta purus | | ipsum ac turpis. Fusce auctor | FIGURE | ullamcorper adipiscing. Nunc | HERE | non quam ac orci egestas con- | | sequat ut eget quam. Cras | | blandit condimentum ornare. +------------------------+ Curabitur aliquam, nulla sit amet iaculis tristique, mi nulla auctor magna, sit amet imperdiet ante arcu a libero. ```
https://tex.stackexchange.com/users/82
How to wrap text around a figure?
true
Try the [wrapfig](http://www.ctan.org/pkg/wrapfig) package. The documentation in the `.sty` file itself says: > > The "wrapfigure" and "wraptable" environments interact > properly with the "\caption" command to produce proper numbering, but > they are not regular floats like "figure" and "table", so (beware!) they > may be printed out of sequence with the regular floats. > > >
33
https://tex.stackexchange.com/users/93
295
202
https://tex.stackexchange.com/questions/143
152
When working with **Bibtex**, manually transferring the **citation information** for articles, prooceedings, books, etc. can be a tedious work. Some web sites provide citations in Bibtex format. What are your favorite sites to get Bibtex citations of your used references?
https://tex.stackexchange.com/users/46
What are good sites to find citations in BibTex format?
false
Slightly orthogonal to the actual question, but hopefully useful to anyone interested in the answers to it, there are libraries that convert from one format to another and these can often be more useful than finding a website that exports them in exactly the right format. For example, for PHP then [bibliophile](http://bibliophile.sourceforge.net/downloads.php) has a library for converting to and from BibTeX. This is used by programs such as [refbase](http://www.refbase.net) for exporting references in BibTeX format. Indeed, rather than a piecemeal approach, I would recommend using a reference program which can import and export to several formats (including BibTeX). Some have been mentioned in the answers above already.
2
https://tex.stackexchange.com/users/86
296
203
https://tex.stackexchange.com/questions/232
89
I imagine that many users are or were [PhD] students, so I would like to know: how do you use LaTeX to write a document (like the final dissertation) that requires many revisions from other people. When I work with my professor, I usually send him a PDF generated by LaTeX and the source files. He then uses a process like such: * Define some color for his commentaries or additions to the text ``` \usepackage{xcolor} ... \define{\profSmith}[1]{{\color{red} #1}} ... Lorem ipsum \profSmith{not very clever} ``` * He sends me his changes and I check his observations, marking my changes with another `\define` * Repeat until everyone is satisfied * For final versions comment defines and replace for `\define{\profSmith}[1]{#1}` So yes, it is a bit cumbersome. I have tried margin notes, but space is limited and sometimes the professor's correction are inside some phrases or paragraphs. I also thought about Version control differences (like svn, mercurial, etc), but my chances are low: everyone but me uses a one-liner for each paragraph. In consequence, I have a hard time checking these differences. What do you guys [would] use in this case? Any other ideas or comments?
https://tex.stackexchange.com/users/146
How can you use LaTeX to write a document with other people?
false
I use the [changes](http://www.ctan.org/pkg/changes) package, which allows authors to mark their changes and makes them colourful and so easier to spot. There's also the [latexdiff](http://www.ctan.org/pkg/latexdiff) program which is a bit like running diff except that you can process the output via LaTeX and get a more useful way of displaying the differences, (see also [ldiff](http://www.ctan.org/pkg/ldiff)). One tip if you're using non-LaTeX-specific tools (such as a DVCS or commands like `diff`): use linebreaks only at the end of sentences. It makes the output from diff (and similar) much more informative (for more detailed reasoning, see [this part](https://loopspace.mathforge.org/HowDidIDoThat/TeX/VCS/#section.3) of my experiences of switching to using a DVCS with LaTeX).
25
https://tex.stackexchange.com/users/86
298
204
https://tex.stackexchange.com/questions/265
180
How can I make text that is larger than the size of the output of `{\Huge ...}`? I would like to be able to make text arbitrarily large (even if that is done by some suboptimal scaling routine).
https://tex.stackexchange.com/users/136
Fonts larger than \Huge?
false
A quick search on CTAN turned up [`anyfontsize`](http://www.ctan.org/pkg/anyfontsize). To quote the description: > > The package allows the to user select any font size (via e.g. `\fontsize{...}{...}\selectfont`), even those sizes that are not listed in the .fd file. If such a size is requested, LaTeX will search for and select the nearest listed size; anyfontsize will then scale the font to the size actually requested. > > > Similar functionality is available for the CM family (type1cm), for the EC family (type1ec), or for either computer modern encoding (fix-cm); the present package generalises the facility. > > >
55
https://tex.stackexchange.com/users/86
300
205
https://tex.stackexchange.com/questions/143
152
When working with **Bibtex**, manually transferring the **citation information** for articles, prooceedings, books, etc. can be a tedious work. Some web sites provide citations in Bibtex format. What are your favorite sites to get Bibtex citations of your used references?
https://tex.stackexchange.com/users/46
What are good sites to find citations in BibTex format?
false
I use [BibSonomy](http://bibsonomy.org) to find and share Bibtex records. You may not find everything there, but with more and more users this should improve in time.
5
https://tex.stackexchange.com/users/12
302
206
https://tex.stackexchange.com/questions/299
88
I often format path names with \texttt which can be very long. Usually Tex will not break this text. The line will just create a hbox overflow. It looks like this: ``` ................ ...C:\documents and settings ................ ................ ................ ................ ................ ................ ................ ``` How do I get Tex to create a line break?
https://tex.stackexchange.com/users/168
How to get long \texttt sections to break
false
Actually, `\texttt` *does* break the text flow, as evidenced from the following test: ``` \documentclass{minimal} \usepackage{lipsum} \begin{document} \lipsum[1] \texttt{\lipsum[1]} \end{document} ``` The problem is that `\texttt` doesn’t break the text *correctly*, because apparently it computes the line width incorrectly. The easiest solution is to introduce soft hyphens at appropriate places: ``` \texttt{C:\doc\-uments and set\-tings} ``` This will use the hyphens as hints for possible word separators, and hyphenate the words accordingly. If that doesn’t help, a manual line break helps. Though quite unsatisfactory, another advice is actually to reformulate the offending sentence so that it flows more nicely.
31
https://tex.stackexchange.com/users/42
304
207
https://tex.stackexchange.com/questions/143
152
When working with **Bibtex**, manually transferring the **citation information** for articles, prooceedings, books, etc. can be a tedious work. Some web sites provide citations in Bibtex format. What are your favorite sites to get Bibtex citations of your used references?
https://tex.stackexchange.com/users/46
What are good sites to find citations in BibTex format?
false
Unfortunately, the largest source of medical, biological and bioinformatical papers, **[PubMed](http://www.ncbi.nlm.nih.gov/pubmed)**, doesn’t offer a BibTeX export (yet?). As a workaround, there is the service **[TeXMed](http://www.bioinformatics.org/texmed/)** that transforms the numeric PubMed identifiers to BibTeX citations. It’s not very usable but still it’s better than nothing.
3
https://tex.stackexchange.com/users/42
305
208
https://tex.stackexchange.com/questions/64
151
A lot of people write makefiles that say something like ``` paper.pdf: paper.tex pdflatex paper bibtex paper pdflatex paper pdflatex paper ``` To handle re-running TeX to get new/changed references and so forth. Is there a better way to do this?
https://tex.stackexchange.com/users/60
Tools for automating document compilation
false
I use a shell script to automatically compile the file with [rubber](http://www.pps.jussieu.fr/~beffara/soft/rubber/) every time i save the file and my viewer automatically reloads the pdf. ``` #!/bin/sh if [ "$#" != 2 ]; then echo "USAGE: onsave <file> <action>" exit 1 fi file=$1 action=$2 last_modified="0" while [ 1 ] do current=`stat -c "%Y" $file` if [ $current -gt $last_modified ]; then `$action` last_modified=$current fi sleep 2 done ```
3
https://tex.stackexchange.com/users/12
306
209
https://tex.stackexchange.com/questions/301
42
How can I produce exercises in one part of a LaTeX document with selected answers in another? I could, of course, simply typeset the questions and the answers separately, but this is too likely lead to divergence in the labels for the questions and the answers as the document is edited. What I'd really like is a command that would allow me to typeset exercises at the point at which the command was used and which took an optional argument for a solution to be stored until a final section (chapter, or part) "Selected Exercise Answers". I'd like the questions (and the selected answers) to be labeled in the output by Chapter.Section.Question or even Chapter.Question.
https://tex.stackexchange.com/users/93
How can I produce exercises in one part of a LaTeX document with selected answers in another?
true
You can use the [exam](http://www.ctan.org/tex-archive/macros/latex/contrib/exam/) document class in both your documents. Then refer to chapter 8: including solutions. Basically, anywhere in the document you can just specify `\printanswers` or `\noprintanswers` or use the `answers` option when loading the document class. It’s easiest if you have the actual questions and answers in a separate document that you `\input` into both the exercise document and the sample solution document. If you want an extra section with the answers, you could instead `\input` the questions document twice, once before and once after the `\printanswers` document: this will cause the first appearance of the questions to be printed without answers, and the second appearance *with* answers.
23
https://tex.stackexchange.com/users/42
307
210
https://tex.stackexchange.com/questions/308
144
I want to define a command that expands to two completely different things depending on whether I supply, or not, an optional argument. For example, ``` \mycmd{normal} -> something(normal) \mycmd[optional]{normal} -> anotherthing(normal, optional) ``` How can I do this?
https://tex.stackexchange.com/users/169
Different command definitions with and without optional argument
false
I usually just use the `ifthen` package to solve this, by testing whether the optional argument is empty. ``` \newcommand\mycmd@noargs{foo} \newcommand\mycmd@withargs[1]{bar #1} \newcommand\mycmd[1][]{ \ifthenelse{\equal{#1}{}}{ \mycmd@noargs{}}{ \mycmd@withargs{#1}}} ``` (Notice that since it uses `@` as a letter, you need to use `\makeatletter` before this definition if it’s in your main LaTeX file (instead of a package), and `\makeatother` after it.)
13
https://tex.stackexchange.com/users/42
309
211
https://tex.stackexchange.com/questions/129
45
I'd like to include some basic math equations into a webpage. Is there an easy way of either compiling the LaTeX into an image which I can upload, or else of having the browser parse the code?
https://tex.stackexchange.com/users/68
Embedding LaTeX equations into a webpage
false
When embedding mathematics into a webpage, there are two primary questions: 1. What format should be used to display it? 2. Where should the conversion be done? In my opinion, each of these has a definite answer and a different solution should only be used if the optimal solution really cannot be done. 1. **MathML**. Reasons: 1. It is the *only* **accessible** way of doing this. Putting the original LaTeX in an `alt` tag on an image is not accessible - it relies on the recipient being able to understand raw LaTeX source code (more on this in a moment). Also, not all of those requiring accessible webpages use screen readers, some simply need to enlarge the page. 2. It is **styleable** (not sure if that's a word). Since MathML is part of the XHTML suite, it can be styled in the same fashion as the rest of the document (namely, via CSS), so the resulting display is far more harmonious than any other (try changing the background colour to something easier on the eyes at one of those wordpress blogs and you'll see what I mean). 3. It is **small**. A quick test on my system with 515 simple files that I happened to have lying around showed that PNGs weighed in at 175kB whilst the MathML equivalents were a shade under 60kB. The PNGs were not large resolution, for example the PNG containing the Zeta symbol was a 9x13 image. 2. **Server-side**. Reasons: 1. It is **small**. Instead of sending both the source *and* the instructions on how to compile it, you just send the result. 2. It is **reliable**. You can easily check that what you want the person to see is what they should see. In particular, a javascript solution relies on two things being correct: the javascript script *and* the implementation of javascript in the browser. MathML just relies on the MathML implementation in the browser. 3. It is **fast**. With server-side caching, you only need to process the mathematics once and then it's done. 4. It is **verifiable** (similar to reliable, I guess). I don't fully understand the differences between the *types* of spec that w3c produce, but MathML is certainly a recommendation. Even though browser support is variable, the variations are known because they can be measured using the open standard, and thus can be taken into account. Server-side MathML is the optimal solution. Of course, it's not always possible and then other solutions are useful. There are various standard arguments against using server-side MathML and other myths about mathematics in webpages that are worth taking a minute over. ### Myths 1. Sending the raw LaTeX code in an alt tag makes images accessible. When people say this, they mean that they can read `$a^2 + b^2 = c^2$` and understand it. Try them on something a little more complicated and you'll soon see that this is complete rubbish. For example, try having someone **read out** the following to you: `$\begin{array}\ell^0(\mathbb{R})&\;\mapsto&\;\ell^2(\mathbb{R})\\\downarrow&&\uparrow\\L^2(\mathbb{R})&\subseteq\,&L^\infty(\mathbb{R})\end{array}$`. Of course, there's going to be people who will say, "*I* can understand that!" but *that's not the point*. You write a webpage for other people and the more complicated the LaTeX, the fewer the number of people who can instantly read it. 2. MathML is badly supported. This is the classic chicken-and-egg. MathML support is absolutely fine in Firefox, in IE with the [MathPlayer plugin](http://www.dessci.com/en/products/mathplayer/), and in [Amaya](http://www.w3.org/Amaya/) (what's that?, I hear you cry!). Plus there are groups working on it for Opera and WebKit who just *need a little encouragement*! Sending them an email saying, "I love your browser but until it has proper MathML support then I can't use it" would provide them with a little more motivation. Of course, there are bugs in the implementations in Firefox and the others, but those are *known* and so can be worked around. 3. MathML requires documents to be valid XHTML. Actually, this isn't a myth. It's absolutely true. But surely your pages were valid to begin with! I'm a mathematician and my ideal document is one that *cannot* be misunderstood. That's impossible, so I try for the lesser goal of where any misunderstanding can be laid at the door of the person reading it rather than me. MathML, as it's an open standard, allows me to reach that goal on webpages - at least technically, the contents are more variable! Finally - on this part - for those that *still* worry about Joe Blogs (or Ola Nordmann, to be geographically correct) not being able to read your webpage due to using an old version of IE and refusing to install plugins, it is actually possible to have two versions of the mathematics on your server and send MathML to those that can see it and PNGs to those that can't, thus getting the best of both worlds. --- What about implementation? Well, there you're in luck. [iTeX](http://golem.ph.utexas.edu/~distler/blog/itex2MML.html) can do it all, and in spades. iTeX is a fast c++ program that converts a subset of LaTeX mathematical language into MathML. The original package comes with bindings for ruby, and I've extended this to PHP, Perl, and Python. By combining it with other packages, in particular [svgmath](http://grigoriev.ru/svgmath/) or [gtkmathview](http://helm.cs.unibo.it/mml-widget/), it is possible to further convert the MathML to an image for broken browsers. (Contact me for these extensions; I haven't gotten round to writing them up yet - it's on my TODO list!) For examples, see the [nlab](http://ncatlab.org) (pure MathML) and the [nforum](http://www.math.ntnu.no/~stacey/Vanilla/nForum) (MathML, SVG, or PNG depending on what browser you are using). --- Lastly, although I'm concerned with accessibility, I'm not an expert. So I've cross-posted my answer to the blindmath mailing list and shall update this according to the response that I get there.
25
https://tex.stackexchange.com/users/86
310
212
https://tex.stackexchange.com/questions/301
42
How can I produce exercises in one part of a LaTeX document with selected answers in another? I could, of course, simply typeset the questions and the answers separately, but this is too likely lead to divergence in the labels for the questions and the answers as the document is edited. What I'd really like is a command that would allow me to typeset exercises at the point at which the command was used and which took an optional argument for a solution to be stored until a final section (chapter, or part) "Selected Exercise Answers". I'd like the questions (and the selected answers) to be labeled in the output by Chapter.Section.Question or even Chapter.Question.
https://tex.stackexchange.com/users/93
How can I produce exercises in one part of a LaTeX document with selected answers in another?
false
The [answers](http://www.ctan.org/pkg/answers) package appears to do something like this (do `texdoc answers`, or the equivalent on your platform, for the documentation). If that doesn't work, or isn't really suitable, then I've got a hand-rolled solution to exactly this problem which I could post here. (duplicated from a [stackoverflow](https://stackoverflow.com/questions/3274727/solution-of-problems-in-the-end-of-a-book/3277148#3277148) question) --- OK: Sam Nead, in the comments, wanted to see the hand-rolled version, so I've included it in part below. The comments report an inheritance from Victor Eijkhout's `comment.sty`, but he's not to blame for the way I've butchered it. This isn't complete, as it doesn't show the output file being read in at the end. It illustrates that if you want to write out stuff with backslashes, you might have to do entertaining things with catcodes. Certainly, I learned a few things from examining and adapting Eijkhout's code. No warranty expressed or implied; contents may settle during handling; do not ingest; and keep *well* out of the reach of children. ``` %%% {examples} environment -- problem/example, to be collected at the end % % \if@examples is a flag to tell us if we've seen any examples yet. \newif\if@examples \@examplesfalse \newwrite\@exampleaux \@definecounter{example} % % Don't use \newenvironment. Instead use the fact that \begin{env} % turns into \begingroup\env . This code is simplified from % Eijkhout's comment.sty % % The \@bsphack...\@esphack pair doesn't seem to want to work, here % (well, it does in horizontal, but not in vertical, mode). % % The {example} environment takes an optional argument, giving the % number of dangerousbend symbols to attach to the example. The % default is zero (negative numbers are treated the same as zero, % numbers larger than about 2 are probably silly, but will work). % % Unfortunately, because of the \@ifnextchar, and the fact that the % contents of this environment are processed oddly, you can't have % anything expandable immediately after the \begin{example}, unless % you write \begin{example}[0] or \begin{example}\relax. % % The end of the environment must be \end{example} alone on a line % (ie, no whitespace before or after). The same is true for the % beginning and end of the {examplenotes} environment. % \def\makeother#1{\catcode`#1=12 } \def\example{\@bsphack\@ifnextchar[%] \@example{\@example[0]}} % \@openexamples opens the examples file. Nilpotent. \def\@openexamples{% \if@examples \else \immediate\openout\@exampleaux\jobname.examples% \immediate\write\@exampleaux{\relax}% \global\@examplestrue \fi } \def\theexample{\@arabic\c@example} \def\@example[#1]{% \@openexamples \refstepcounter{example}% % Read in contents line by line, with all catcodes `other' \let\do\makeother \dospecials % \makeother\^^L% \endlinechar`\^^M \catcode`\^^M=12 % \immediate\write\@exampleaux % {\string\begin{examplebody}% {\theexample}% {\csname the\LN@currsectionlevel\endcsname}% {#1}% }% \if@screenpdf % \marginpar{\small{\hyperlink{ex-\@arabic\c@example}{Ex.\theexample}}}% \else % \marginpar{\small{See example \theexample}}% \fi % \@tempswatrue \ProcessExampleLine % } % % Define \EndExampleTest, with all catcodes other {\escapechar=-1 \xdef\EndExampleTest{\string\\end\string\{example\string\}}} {\escapechar=-1 \xdef\BeginNotesTest{\string\\begin\string\{examplenotes\string\}}} {\escapechar=-1 \xdef\EndNotesTest{\string\\end\string\{examplenotes\string\}}} % Write out the body of the {example}, carefully surrounding the % content of the {examplenotes} environment with % \ifexamplenotes...\fi. Note this _requires_ that the beginning and % end of the {examplenotes} environment appear on lines by % themselves. Change the escape character so that we can write out % \if..\fi without problems. {\catcode`\^^M=12 \endlinechar=-1 \catcode`\|=0 |catcode`|\=12 % |gdef|ProcessExampleLine#1^^M{|def|test{#1}% |if@tempswa |immediate|write|@exampleaux{\ifexampletext}|@tempswafalse |fi |ifx|BeginNotesTest|test % |immediate|write|@exampleaux{\fi\ifexamplenotes}% |fi % |ifx|EndExampleTest|test % |edef|next{% |immediate|write|@exampleaux{\fi\end{examplebody}}% |@esphack % |endgroup % }% |else % |immediate|write|@exampleaux{#1}% |ifx|EndNotesTest|test % |immediate|write|@exampleaux{\fi\ifexampletext}% |fi % |let|next|ProcessExampleLine % |fi % |next}% } % Add text to the examples file \long\def\addtoexamples#1{% \@openexamples {\@temptokena{#1}% \immediate\write\@exampleaux{\the\@temptokena}}} ```
7
https://tex.stackexchange.com/users/96
311
213
https://tex.stackexchange.com/questions/225
32
There are many different kind of options that you can do in order to start using LaTeX on Ubuntu. I would prefer doing that through Eclipse, but if there is a better way of doing it, feel free to write your opinion on why using this instead of something else.
https://tex.stackexchange.com/users/62
I want to start using LaTeX on Ubuntu. Where do I start?
false
Take the editor you are familiar with. Most of the editors have builtin LaTeX support and install the TeX-Packages you need. If you want to have them all, do a ``` sudo apt-get install --install-recommends texlive-full ``` But please be aware that this downloads about 600 MB of software, which expands to about 1.x GB. I am using Eclipse with Texlipse. Some of my colleagues are using Geany. Other taking LxX. The messages is, take the editor you like most.
13
https://tex.stackexchange.com/users/163
313
214
https://tex.stackexchange.com/questions/308
144
I want to define a command that expands to two completely different things depending on whether I supply, or not, an optional argument. For example, ``` \mycmd{normal} -> something(normal) \mycmd[optional]{normal} -> anotherthing(normal, optional) ``` How can I do this?
https://tex.stackexchange.com/users/169
Different command definitions with and without optional argument
true
If you read deep in the LaTeX code you can find lots of examples where this is done. Any command that has optional arguments actually does this already: there are actually two different commands and which one is called depends on whether or not it is called with an optional command. The TeX trick is to use `\@ifnextchar[`. For example, ``` \def\mycmd{\@ifnextchar[{\@with}{\@without}} \def\@with[#1]#2{hello #1, have you met #2?} \def\@without#1{goodbye #1} ``` What happens there is that the TeX interpreter meets the `\mycmd` macro and expands it (swallowing following white-space, of course). The first thing it then encounters is a test on the next character (which, incidentally, is non-destructive - the next character is simply observed, not processed). If it is a square bracket, then it puts `\@with` in the stream and starts again. `\@with` is defined to take two arguments, the first of which is surrounded by square brackets. It therefore matches the first optional argument and the next thingy in the TeX stream. If the next character wasn't a square bracket then `\@without` is put into the stream. This takes one (normal) parameter. But since `\@with` and `\@without` are two completely separate commands, they can do whatever they like with the input. (Note: For commands defined with `\newcommand` which take an optional parameter then sort-of what happens is that the two commands `\@with` and `\@without` expand to the same command, but the optional parameter of `\@with` gets passed to it as the first parameter whereas in `\@without` the default value is passed. It's not *quite* like that, but the difference is more in conciseness of programming than anything else.) Here's a fully compilable example, including the mysterious and mystical duo [`\makeatletter` and `\makeatother`](https://tex.stackexchange.com/q/8351/86): ``` \documentclass{article} %\url{https://tex.stackexchange.com/a/314/86} \makeatletter \def\mycmd{\@ifnextchar[{\@with}{\@without}} \def\@with[#1]#2{Hello #1, have you met #2?} \def\@without#1{Goodbye #1.} \makeatother \begin{document} \mycmd[Polyphemus]{Odysseus} \mycmd{Circe} \end{document} ``` Produces: > > Hello Polyphemus, have you met Odysseus? Goodbye Circe. > > >
103
https://tex.stackexchange.com/users/86
314
215
https://tex.stackexchange.com/questions/49
257
I know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?
https://tex.stackexchange.com/users/69
What is the difference between TeX and LaTeX?
false
In short **TeX is all about formatting**, for document/template designers, while **LaTeX is all about content**, for document writers. TeX is a typesetting system. It provides many commands which allow you to specify the format of your document with great detail (e.g. font styles, spacing, kerning, ligatures, etc.), and has specialized algorithms to compute the optimal flow of text in your document (e.g. where to cut lines, pages, etc.). TeX is all about giving you powerful algorithms and commands to specify even the tiniest detail to make your documents look pretty. LaTeX is a set of macros built on top of TeX. The idea behind LaTeX is to shift the focus from the *format* to the *content* of your document. In LaTeX commands are all about giving a structure to the content of your document (e.g. sections, emphasis, tables, indices, etc.). In LaTeX you just say `\section{...}` instead of: selecting a larger font, a different font style, and inserting appropriate spaces before and after the section heading. As LaTeX is built on top of TeX you also get, of course, a beautiful document as your output; but, more importantly, your source input can also be well structured, easier to read (and write!) for humans.
141
https://tex.stackexchange.com/users/169
315
216
https://tex.stackexchange.com/questions/297
52
Sometimes I want to describe portions of an equation using `\underbrace` and `\overbrace` in such a way that the portions are not completely distinct, for example: ``` /-------\ x = A + B + C + D + E \-------/ \---/ ``` > > What is the best way to do this? > > >
https://tex.stackexchange.com/users/32
How can I get an underbrace and an overbrace to partially overlap in an equation?
false
This may not be the best solution, due to the overhead, but this is quite simple using TikZ. You insert invisible nodes at the points where you want the under and over braces to anchor to and then draw the braces between them. In my preamble, I have: ``` \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing,decorations.pathmorphing,calc} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};} ``` (Obviously, the name can be shortened if this is to be used a lot. I'm not sure off the top of my head which of the decorations library is needed; the calc one is optional but extremely useful.) Then, I would typeset your example using: ``` \[ x = \tikzmark{ubl} A + \tikzmark{obl} B + C \tikzmark{ubr} + \tikzmark{ubll} D \tikzmark{obr} + E \tikzmark{ubrr} \] \begin{tikzpicture}[overlay, remember picture] \draw[decoration={brace,amplitude=10},decorate,thick] ($(ubl)+(-0.25,-1)$) -- ($(ubr)+(-0.25,1.2)$); ... \end{tikzpicture} ``` Reversing the order of the nodes flips the brace, so if that's the wrong way up then simply swap them. The stuff with the dollars is from the `calc` tikz library. What the above does is specify an offset from the node, so that if you find the default position of the braces a little off (which it probably is), it is simple to adjust them. I use this a lot in lectures: for adding strike-outs to things, for better-looking brackets on huge matrices, for all sorts of things where you want to add a little graphical decoration afterwards. For more details, search for 'remember picture' in the TikZ manual, and browse the examples at <http://texample.net>.
10
https://tex.stackexchange.com/users/86
316
217
https://tex.stackexchange.com/questions/258
259
What is the difference between the `\let` and `\def` commands in TeX/LaTeX? Ideally please provide a simple example that will illustrate the difference between them.
https://tex.stackexchange.com/users/136
What is the difference between \let and \def?
true
The difference is in the time at which the ‘right hand side’ is evaluated. Thus `\let\foo\bar` defines `\foo` to have the value that `\bar` had *at the point of definition*. On the other hand, `\def\foo{\bar}` in effect defines `\foo` to have the value that `\bar` has *at the point of use*. Consider: ``` \def\bar{hello} \let\fooi\bar \def\fooii{\bar} \fooi +\fooii \def\bar{goodbye} \fooi +\fooii ``` This produces ``` hello+hello hello+goodbye ``` --- This is a simple process. However it's also a subtle one, so it might be worth highlighting a few key points: * When TeX encounters control sequences such as `\fooi`, it evaluates them; if these are macros (that is, they have been defined by `\def`, or `\let` equal to something which was defined by `\def`), then the result is that they will *expand* to other tokens, which TeX will then examine in turn, and so on, recursively, until what's left is either ‘primitive’ control sequences or letters (I'm simplifying a little bit). * `\fooi` expands directly to the characters `hello` (because `\bar` initially did, and `\fooi` was defined to have the same *value*). * `\fooii`, in contrast, expands to `\bar`, *which is then immediately reexamined and reexpanded*. In the first case, `\bar` expands to `hello` and in the second case to `goodbye`. The definition of `\fooii` hasn't changed, but `\bar` has been redefined in between. * Getting a clear idea of the process of this recursive expansion is *very* helpful when learning how to develop and debug TeX macros.
276
https://tex.stackexchange.com/users/96
318
219
https://tex.stackexchange.com/questions/233
8
As [comprehensive](https://tex.stackexchange.com/questions/14/how-to-look-up-a-math-symbol) as the existing set of symbols is, it doesn't have *every possible* symbol that could exist, and it really takes the fun out of inventing a new symbol if you can't typeset it nicely. One option I know of is "combining" existing symbols in some fashion, such as negative spaces. So I could write something like `m \gg\!\!= k`, but that technique has obvious limitations. What's the best approach here? ("Stop making up new symbols for no good reason" is a valid answer.) **Edit:** For a bit of context my actual interest is in nicer display for typeset source code, particularly making common operators written as multiple ASCII characters look more like a single symbol. This often results in symbols not otherwise used--but recognizable to other programmers--and for which the negative spacing technique suffices. As mentioned in a comment on vanden's answer, I was curious about the more general case.
https://tex.stackexchange.com/users/129
Using custom symbols
true
Whilst I wouldn't go so far as to define completely new symbols, I do occasionally find myself wanting slightly different ones than the standard set. Where I've encountered this is with arrows when lecturing: I find that I want the ⇔ to look a little more important, for example. For those cases, I redraw it using TikZ: ``` \newcommand{\textIff}{\tikz \draw (-3ex,.25ex) -- (-.25ex,.25ex) (-3ex,-.25ex) -- (-.25ex,-.25ex) (-.5ex,.5ex) -- (0,0) -- (-.5ex,-.5ex) (-2.75ex,.5ex) -- (-3.25ex,0) -- (-2.75ex,-.5ex);\xspace} \newcommand{\mathIff}{\mathrel{\textIff}} \newcommand{\Iff}{\ifmmode\mathIff\else\textIff\fi\xspace} ``` I guess that using TikZ rather than MetaFont for this is that I already know how to use TikZ for my other diagrams.
4
https://tex.stackexchange.com/users/86
320
220
https://tex.stackexchange.com/questions/93
18
What do I need in order to use TeX on Windows as an eventual replacement for Word? What software is available for Windows for WYSIWYG editing of TeX files?
https://tex.stackexchange.com/users/91
What do I need in order to use TeX on Windows as an eventual replacement for Word?
false
On Windows I prefer using [TeXlipse](http://texlipse.sourceforge.net/) plug-in for [Eclipse](http://www.eclipse.org/). Not WYSIWYG but looks quite convenient for me. (screen-shot taken from the [TeXlipse site](http://texlipse.sourceforge.net/screenshots/))
3
https://tex.stackexchange.com/users/13
322
221
https://tex.stackexchange.com/questions/48
44
The preambles of my LaTeX documents often include many many lines of `\DeclareMathOperator` instructions, e.g. ``` \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} \DeclareMathOperator{\Maps}{Maps} \DeclareMathOperator{\Diff}{Diff} ``` Is there a nice way to *map* some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?
https://tex.stackexchange.com/users/77
How can I specify a long list of math operators?
false
I'd probably do this differently if I were coding it today (as I've learnt a lot more about TeX in the last decade), but here's something like how I did it for my thesis: ``` \documentclass{article} \usepackage{amsmath} \makeatletter \def\my@shift#1:#2.{#1} \def\my@trunc#1:#2.{#2} \def\my@void{}\relax \newcommand{\Mops}[1]{% \def\my@test{}\relax \def\my@list{#1:}\relax \loop\ifx\my@test\my@void\relax \edef\my@elt{\expandafter\my@shift\my@list.}\relax \edef\my@list{\expandafter\my@trunc\my@list.}\relax \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\DeclareMathOperator\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\csname \expandafter\my@elt\expandafter\endcsname\expandafter}\expandafter{\my@elt} \ifx\my@list\my@void \def\my@test{t} \fi \repeat} \makeatother \Mops{Det:Diff:Rep} \begin{document} \(\Det \Diff \Rep\) \end{document} ``` The test in the loop could probably be cleaned up, and that is a rather horrendous number of `\expandafter`s! But it works.
6
https://tex.stackexchange.com/users/86
324
222
https://tex.stackexchange.com/questions/321
101
I always use `align` in my documents, and avoid `equation`. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?
https://tex.stackexchange.com/users/174
align vs equation
false
While not exactly a bad idea in principle, unfortunately it *is* a bad idea in practise because `align` doesn't have the same feature as `equation` whereby less vertical space is added if a small equation is displayed after a paragraph that ended early on the line. For example, consider ``` \documentclass[twocolumn]{article} \usepackage{amsmath} \begin{document} hello \[ a+b=c \] hello \begin{align} a+b&=c \end{align} \end{document} ``` You should easily be able to see the extra space after the second ‘hello’.
70
https://tex.stackexchange.com/users/179
325
223
https://tex.stackexchange.com/questions/48
44
The preambles of my LaTeX documents often include many many lines of `\DeclareMathOperator` instructions, e.g. ``` \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} \DeclareMathOperator{\Maps}{Maps} \DeclareMathOperator{\Diff}{Diff} ``` Is there a nice way to *map* some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?
https://tex.stackexchange.com/users/77
How can I specify a long list of math operators?
false
There are several ways to do it using different programming facilities of different packages. Here's what it looks like using the LaTeX2e kernel command `\@for` to map over a comma-separated list: ``` \makeatletter \newcommand\MakeMathOperators[1]{% \@for\@ii:=#1\do{% \expandafter\DeclareMathOperator\@ii }% } \makeatother \MakeMathOperators{ \rep {Rep} , \tet {Tet} , \maps {Maps} } ```
24
https://tex.stackexchange.com/users/179
327
224
https://tex.stackexchange.com/questions/297
52
Sometimes I want to describe portions of an equation using `\underbrace` and `\overbrace` in such a way that the portions are not completely distinct, for example: ``` /-------\ x = A + B + C + D + E \-------/ \---/ ``` > > What is the best way to do this? > > >
https://tex.stackexchange.com/users/32
How can I get an underbrace and an overbrace to partially overlap in an equation?
true
One can use commands `\phantom` and `\lefteqn`. Simple example: `\[\lefteqn{\overbrace{\phantom{1+2+3}}}1+\underbrace{2+3+4}\]`. More complicated example: ``` \[ 0+\lefteqn{\overbrace{\phantom{1+2+3}}}1+ \underbrace{2+3+\overbrace{x+y+z}+ \lefteqn{\overbrace{\phantom{4+5}}}4}+5 \] ``` Caveat: `\lefteqn` switches font to `\displaystyle` so one has to use something like `\lefteqn{\textstyle...` in inline formulas. P.S. The recipe is taken from the excellent book by S.Lvovski (<http://www.mccme.ru/free-books/llang/newllang.pdf>, in Russian).
30
https://tex.stackexchange.com/users/85
330
225
https://tex.stackexchange.com/questions/321
101
I always use `align` in my documents, and avoid `equation`. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?
https://tex.stackexchange.com/users/174
align vs equation
false
Will all due respect to Will Robertson, actually I think that it is a bad idea in principle, because they mean different things and markup (be it \*TeX, HTML,...) should be logical as much as possible. If you are typesetting an equation, then use `equation` and if you desire alignment you can use `aligned` blocks inside the equation. You can decide easily whether you are typesetting an equation or not, by thinking how to want to reference it. If you only want one equation number to be displayed and see yourself suppressing by hand any additional equation numbers, (say by using `\notag`) then you are typesetting an equation and your markup should reflect that.
25
https://tex.stackexchange.com/users/18
331
226
https://tex.stackexchange.com/questions/278
48
The commands `\clap`, `\llap` and `\rlap` are useful "horizontal" analogues of `\smash`: they reduce the horizontal width of a box to zero, aligning the box with either the middle, left or right of the typeset contents. Unfortunately they don't work in math mode. > > Can someone suggest a math mode macro that has the effect of `\clap` and friends? > > >
https://tex.stackexchange.com/users/77
Can I use \clap, \rlap and \llap in math mode?
true
The [mathtools](https://www.ctan.org/pkg/mathtools) package contains (among other useful things) the implementations of `\mathclap` and relatives from Andrew's answer.
45
https://tex.stackexchange.com/users/83
338
227
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[Kile](https://kile.sourceforge.io/) — [kile](/questions/tagged/kile "show questions tagged 'kile'") ---------------------------------------------------------------------------------------------------- * *Platforms:* Linux, Windows1 (XP, Vista, 7) * *License:* GNU GPL 2 * *Languages:* bg, bs, ca, cs, da, de, el, en\_GB, eo, es, et, fi, fr, ga, gl, hi, hne, hu, it, ja, kk, lt, mai, ms, nb, nds, nl, nn, pl, pt, pt\_BR, ro, ru, sk, sv, tr, ug, uk, zh\_CN, zh\_TW * *Unicode:* Yes * *RTL/bidi:* Yes * *`% !TEX` directives:* No2 * *Syntax Highlighting:* Yes, customizable * *Code Completion:* Yes, customizable * *Code Folding*: Yes * *Spell Checking:* Yes [uses system dictionaries so works even for unsupported languages] * *SyncTeX:* Yes (but the `-synctex=1` flag must be added manually to the build engine) * *Built-in Output Viewer:* Limited3 (PNG preview of snippets – e.g. current environment or selection – converted from DVI/PS/PDF) * *Project Management:* Yes * *Command Line:* Yes * *Structure/Outline View:* Yes * *VI Input Mode:* Yes 1 Starting from version 3.0, there is a windows installer available. Installation instructions for 2.x versions can be found [here](http://https://kile.sourceforge.io/wiki/index.php?title=KileOnWindows). The [Windows version of the KDE applications](https://web.archive.org/web/20191018184951/http://www.windows.kde.org:80/) is not finalised, so some of them may be unstable. 2 While Kile does not have `!TeX` directives for defining compilation tool etc., it does have some "magic comments", similar to Latexila and TeXStudio. They are `%TODO` and `%FIXME`, which appears in the structure view, for adding notes in the code, and `%BEGIN`/`%END` for defining foldable regions of code. 3 A full built-in output viewer will be available in Kile 3 and is already available by compiling the Kile [git master branch](https://invent.kde.org/office/kile)
173
https://tex.stackexchange.com/users/183
340
228
https://tex.stackexchange.com/questions/341
385
I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ?
https://tex.stackexchange.com/users/183
How to create posters using LaTeX
false
The [`beamerposter`](http://www.ctan.org/pkg/beamerposter) package is quite nice. Examples:
147
https://tex.stackexchange.com/users/nan
342
229
https://tex.stackexchange.com/questions/329
196
I want to use a smaller font size for the bibliography, e.g., \footnotesize. What is the easiest way to achieve this? I currently do `\renewenvironment{thebibliography}...` and copy the definition from report.cls but with the `\footnotesize` inserted in. However, that seems to be a bit of a hack, so I'm looking for a cleaner way.
https://tex.stackexchange.com/users/79
How to change font size for bibliography?
true
First I have to say that you should avoid fiddling with font sizes in order to squish more text into a document. Conferences and journals often discourage such formatting hacks; some might even reject papers found to be doing this. Anyway, if you *still* need to to this for whatever reason, the easiest way I found is to write something like ``` {\footnotesize \bibliography{bibfile}} ```
143
https://tex.stackexchange.com/users/169
343
230
https://tex.stackexchange.com/questions/341
385
I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ?
https://tex.stackexchange.com/users/183
How to create posters using LaTeX
false
[`baposter`](http://www.brian-amberg.de/uni/poster/) is a LaTeX class designed for posters. Look at the example file included in the class' zip file and you will probably find your way. A few quick tips : * You can position boxes by giving them names with `name=abc` and positioning other boxes using `below=abc` * You can set the total number of columns in the document by giving "columns=X" parameter in the `\begin{poster}` parameters. EDIT - one of the example posters:
65
https://tex.stackexchange.com/users/183
344
231
https://tex.stackexchange.com/questions/268
151
When trying to write an e-mail address, there are always problems with the @ sign. Solutions I've seen suggested are using some verbatim environment (more difficult in footnotes) and using a math-mode @. What is *the* correct way to do this?
https://tex.stackexchange.com/users/135
What's the best way to write e-mail addresses?
false
You can also combine the [`hyperref`](http://ctan.org/pkg/hyperref) and [`url`](http://ctan.org/pkg/url) approaches to get a working link that is formatted like an URL: ``` \href{mailto:me@example.com}{\nolinkurl{me@example.com}} ```
68
https://tex.stackexchange.com/users/83
345
232
https://tex.stackexchange.com/questions/335
17
For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, `e` is in roman font, and so forth. At the moment, I do this by defining new macros for each symbol, so a typical line reads something like this: ``` Define \(\tyz^\tyw \coloneqq \tye^{\tyw \ty\ln(\tyz)}\) ``` I'd really like to be able to just type ``` Define \(z^w \coloneqq e^{w \ln(z)}\) ``` To do this, I'd need to be able to tell TeX that the maths symbol for, say, 'e' was not 'e' but actually 'e' in roman font and with a particular colour. Does anyone have any ideas on how to do this?
https://tex.stackexchange.com/users/86
Can I change the font and colour of a letter permanently?
false
Obvious idea is to use something like ``` \catcode\`\x=13 \def x{something}` ``` but one need to do it only in formulas. Probably one can try to redefine `\(` to include `\bgroup\catcode...`. But it will break any commands having `x` in their name...
2
https://tex.stackexchange.com/users/85
346
233
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[LEd](http://www.latexeditor.org/) ---------------------------------- *Available for:* Windows Freeware *Note:* Development of LEd has stopped, and the last version is from 2009. --- I can recommend [LEd](http://www.latexeditor.org/). It is Windows only and is just not working on some computers, still it is very functional; standard things like spelling, tree views, macros are present, while it has some more nice functions. I especially like a toolbar for beamer, but also noticeable is an option in search which can be used to highlight occurrences of a few queries at a time (regex supported of course).
26
https://tex.stackexchange.com/users/nan
347
234
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[TexShop](http://www.uoregon.edu/%7Ekoch/texshop/) -------------------------------------------------- *Available for:* Mac Open Source --- In Mac I use [TexShop](http://www.uoregon.edu/%7Ekoch/texshop/), shipped with [MacTeX](http://www.tug.org/mactex/), and works smoothly together with [MacTeX](http://www.tug.org/mactex/). Among the features that it has are: **Editing features** * syntax highlighting * source/PDF synchronization * autocompletion of commands and environments * macros * stationery (for document templates) * latex panel of commonly used symbols * matrix panel for simple array input * import spreadsheet cells with LaTeX formatting * regex search/replace * customizable themes for coloring text and background * controls to horizontally split source or preview window * preview window document outline pane * customizable choice of auxiliary files to delete **Processing features** * built-in support for TeX, LaTeX, Xe(La)TeX, Lua(La)TeX, ConTeXt, BibTeX, biber * built-in support for Sketch, Asymptote, Sage, LilyPond, LatexMk, MetaPost * user definable Engines (scripts to process documents)
122
https://tex.stackexchange.com/users/184
350
235
https://tex.stackexchange.com/questions/349
100
I understand that some packages (like PSTricks) can't be used with pdflatex. Are there any other differences between these tools? Can we say that pdflatex is better if we don't care about ps?
https://tex.stackexchange.com/users/69
What is the practical difference between latex and pdflatex?
false
You can use pstricks from pdflatex, by using a few tricks (all boils down to manual->automatic external invocation of latex&pstopdf to get pdf image of pstricks graphic which can then be picked up by pdflatex). For beginners there are almost no difference. Once you get to advance usage you start to realise that special things need to be done to use Postscript constructs with pdftex (e.g. pstricks), but on the other hand pdftex engine gives you awesome stuff like pdf table of contents, pdf hyperlinks within document and URL to the web as well as generating pdf metadata, embedding movies / 3D objects, creating PDF-A ready documents for archiving and ability (with certain degrees of pain) to use TTF fonts. Inverse search is a bit easier with latex. And dvi compilation & preview is much faster. But SyncTeX shows promise for awesome pdftex inverse and forward search. If you don't use postscript stuff and care about creating high quality PDFs then pdflatex is preffered. But many people use both and have conditional compilation and macros in the preemble when using one or the other engine. For beginners I would recommend pdflatex since most new users coming from WYSIWYG world of things do not know what dvi and ps are, but everyone nowadays is aware of PDF. After beginners stage it is an open-ended question which depends on particular needs with all engines having special features, advantages and disadvantages.
20
https://tex.stackexchange.com/users/137
353
236
https://tex.stackexchange.com/questions/337
433
How can I change the orientation of some pages of my document into landscape mode, while leaving the others in portrait mode (or vice versa)?
https://tex.stackexchange.com/users/183
How to change certain pages into landscape/portrait mode
false
If you are using **pdfLaTeX** or **LuaLaTeX**, then try [`pdflscape`](http://www.ctan.org/pkg/pdflscape). The `pdflscape` package adds PDF support to the `landscape` environment of package `lscape`, by setting the PDF/Rotate page attribute. Pages with this attribute will be displayed in landscape orientation by conforming PDF viewers: ``` \usepackage{pdflscape} ... \begin{landscape} ... \end{landscape} ``` Otherwise, if you don't use a PDF engine, try the [`lscape`](http://www.ctan.org/pkg/lscape) package: ``` % lscape.sty Produce landscape pages in a (mainly) portrait document. \usepackage{lscape} ... \begin{landscape} ... \end{landscape} ``` This modifies the margins and rotates the page contents but not the page number. Useful, for example, with large multipage tables, and is compatible with the packages `longtable` and `supertabular`.
451
https://tex.stackexchange.com/users/118
354
237
https://tex.stackexchange.com/questions/341
385
I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ?
https://tex.stackexchange.com/users/183
How to create posters using LaTeX
false
I have some advice on this topic elsewhere, which includes pointers to other resources: [Using LaTeX to produce conference posters](http://nxg.me.uk/docs/posters/) Myself, I think that the most useful package for a task like this is the [`textpos` package](http://www.ctan.org/pkg/textpos) (disclaimer: I wrote that, as a spinoff from the task of laying out posters).
28
https://tex.stackexchange.com/users/96
355
238
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[Emacs](http://www.gnu.org/software/emacs/emacs.html) with [AUCTeX](http://www.gnu.org/software/auctex/) — [emacs](/questions/tagged/emacs "show questions tagged 'emacs'") [auctex](/questions/tagged/auctex "show questions tagged 'auctex'") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * *Platforms:* Windows, Mac (incl. Aquamacs fork), Unix * *License:* Free software (GPL) * *Languages:* de, dk, fr, is, it, jp, nl, pl, se, sk are supported by AUCTeX language styles * *Unicode:* Yes, from Emacs 23, characters are represented using Unicode * *RTL/bidirectional support:* From Emacs 24, through `bidi-mode` * *`% !TeX` directives:* No, but has several realizations of [file local variables](http://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html) * *Syntax highlighting:* Yes, customisable through `customize` and Elisp * *Code completion:* Yes * *Code folding:* Yes * *Spell checking:* Yes * *SyncTeX:* Yes * *Built-in output viewer:* Yes * *Project management:* `org-mode`, `reftex-mode`, `speedbar` --- Emacs is one of the oldest programmable editors, which has basic support for TeX and friends. AUCTeX is a plugin to Emacs which provides a much more advanced support for editing LaTeX, ConTeXt, docTeX, Texinfo, and Plain TeX documents. It comes with a sophisticated [auto-completion mechanism](https://www.gnu.org/software/auctex/manual/auctex.html#Editing) for [environments](https://www.gnu.org/software/auctex/manual/auctex.html#Environments) and [commands](https://www.gnu.org/software/auctex/manual/auctex.html#Completion), supporting by default more than two hundreds LaTeX packages (but virtually any package can be automatically parsed in order to provide autocompletion for its commands and environments). (In this screenshot, `visual-line-mode` is enabled. In this mode, lines that are wider than the window are broken between words. The line breaks are not added to the source file.) [RefTeX](http://www.gnu.org/software/auctex/reftex.html) is another plugin to Emacs, independent from and complementary to AUCTeX, which aids you with the management of bibliographic sources. It makes all your references as easy to find as a `C-c <key>`, for both BibTeX and `biblatex`, and also provides convenient shortcuts for navigating between sections in your document, bound by default to `C-c =`: (Note that colour themes are completely customizable) AUCTeX supports multi-file parsing, so that huge documents with `\input` or `\include` commands are easily compiled with `C-c C-c` from any of their files. No more going back to the master file in order to compile. AUCTeX's [`preview-latex`](http://www.gnu.org/software/auctex/preview-latex.html) offers WYSIWYG previewing of formulae. Interesting features of Emacs: * Use `table-insert` along with `table-generate-source` and `table-recognize-*` functions to easily create a base for your tables. * [Lots of useful keyboard shortcuts](https://tex.stackexchange.com/questions/20843/useful-shortcuts-or-key-bindings-or-predefined-commands-for-emacsauctex/21026#21026) * Extensively documented, both in Emacs, via the Emacs and AUCTeX Texinfo manuals, and via many books in several languages. * Supports most of vim's features and keybindings through `evil-mode`.
361
https://tex.stackexchange.com/users/146
356
239
https://tex.stackexchange.com/questions/349
100
I understand that some packages (like PSTricks) can't be used with pdflatex. Are there any other differences between these tools? Can we say that pdflatex is better if we don't care about ps?
https://tex.stackexchange.com/users/69
What is the practical difference between latex and pdflatex?
false
I think the only reasons to continue to use `latex` over `pdflatex` are * You need to use pstricks, or something else which requires dvips specials or particular features of a postscript workflow. * You need to generate specifically postscript for some reason. * You have to fit into an existing workflow (quite often journals require postscript figures, and so effectively require you to use `latex`). Apart from those, I think that `pdflatex` is effectively the default. (Note that `pdflatex` and `latex` are typically the same program, but when it's invoked as `latex` it defaults the value `\pdfoutput=0`, rather than `\pdfoutput=1`. If this is the case in your installation, you can use plain `latex`, set `\pdfoutput=1`, amd get PDF output rather than DVI, and vice versa.)
39
https://tex.stackexchange.com/users/96
357
240
https://tex.stackexchange.com/questions/349
100
I understand that some packages (like PSTricks) can't be used with pdflatex. Are there any other differences between these tools? Can we say that pdflatex is better if we don't care about ps?
https://tex.stackexchange.com/users/69
What is the practical difference between latex and pdflatex?
true
Some packages only work with direct PDF output, since they utilise features not available in PostScript, as mentioned by Dima. Another difference stems from the fact that `tex` and `pdftex` are simply different programs, implemented independently. In particular, author Hàn Thế Thành implemented features in pdfTeX which help improve the document’s [microtypography](http://en.wikipedia.org/wiki/Microtypography). Some of these features have since been implemented in `tex` (the program, not the language), while others have remained exclusive to pdfTeX (although LuaTeX and XeLaTeX have also implemented some of them). Here is a screenshot illustrating the difference (left: LaTeX, right: pdfLaTeX with microtype) – the example document was created with the help of the **[microtype](http://www.ctan.org/tex-archive/macros/latex/contrib/microtype/)** package, which provides a simple interface to access the microtypography features: [Taken from the [TeXblog](http://texblog.net/latex-archive/layout/pdflatex-microtype/)]
107
https://tex.stackexchange.com/users/42
358
241
https://tex.stackexchange.com/questions/352
19
{} and [] do some kind of grouping, and comma seems to be special as well. Being a programmer I find it frustrating to use Latex on incantation-only basis. I would like to know how does it exactly work. What is exactly the syntax of TeX/LaTeX? How is it parsed? Does Latex introduces new commands only or changes the syntax as well? Or maybe changing syntax locally is a inherent feature of Tex?
https://tex.stackexchange.com/users/69
Syntax of TeX/LaTeX
true
For a programmer, I would recommend reading the book "TeX by Topic" (available for free at <http://www.eijkhout.net/tbt/>). I think that that will give you the best answer to your general questions (which really are, in my opinion, a bit *too* general for this site; I would advise you to read TbT and then ask more focussed questions on particular aspects). However, you mention a couple of specifics so let me try to answer them. {} are lexical: ``` \def\hello{world} {\def\hello{hello} \hello} \hello ``` produces: "hello world". The grouping given by *square* brackets is an illusion. *Some* commands in LaTeX start with "If the next character is [, gobble the rest up to ] and use it as the first argument.". This can cause problems if, for example, what you want to pass has a square bracket in it: ``` \newcommand{\hello}[2][hello]{#1 #2} \hello{world} \hello[greetings]{world} \hello[Greetings [1] to the]{world} ``` Produces ``` hello world greetings world Greetings [1 worldo the]world ``` because the first argument to "hello" in the last line is "Greetings [1". (This can be remedied by using braces to do proper grouping, `\hello[{Greetings [1] to the}]{world}` would work fine). I've never heard of commas being special. Can you give an example?
27
https://tex.stackexchange.com/users/86
359
242
https://tex.stackexchange.com/questions/49
257
I know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?
https://tex.stackexchange.com/users/69
What is the difference between TeX and LaTeX?
false
TeX, LaTeX, ConTeXT - different languages / syntax for typesetting. For each of these there are many engines available that can process the above syntax and generate dvi, ps, pdf, html, svg.... and what not. To confuse even more there are engines called tex and latex, which can be used to process tex and latex syntaxes respectivly to produce dvi outputs. @José Figueroa-O'Farrill: Treating the system as blackbox: ConTeXt, LaTeX and TeX have significantly different syntax and different compilers hence they are different. And most users do not need to know that one is using the other behind the scene, that's an implementation detail. The beginner user needs to know that (a) they are different (b) they all produce awesome quality documents (c) each package has its own "native" way to do stuff (d) you can seek for all of them here.
6
https://tex.stackexchange.com/users/137
360
243
https://tex.stackexchange.com/questions/48
44
The preambles of my LaTeX documents often include many many lines of `\DeclareMathOperator` instructions, e.g. ``` \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} \DeclareMathOperator{\Maps}{Maps} \DeclareMathOperator{\Diff}{Diff} ``` Is there a nice way to *map* some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?
https://tex.stackexchange.com/users/77
How can I specify a long list of math operators?
true
Updated solution using the features of [etoolbox](https://www.ctan.org/pkg/etoolbox) which has essentially implemented the “`\MapCommand`” and named it `\forcsvlist` ``` \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \newcommand{\DeclareMyOperator}[1]{% \expandafter\DeclareMathOperator\csname #1\endcsname{#1} } \newcommand{\DeclareMathOperators}{\forcsvlist{\DeclareMyOperator}} \DeclareMathOperators{Rep,Tet,Maps,Diff} \begin{document} Operators: $\Rep, \Tet, \Maps, \Diff$ \end{document} ``` “For historical reasons”, I leave my original answer bellow. --- Combining the previous answers from Grigory and Andrew I was able to come up with the following somewhat cleaner implementation which also exposes a nice user interface. ``` \documentclass{article} \usepackage{amsmath} \makeatletter \def\ops@declare#1{% \expandafter\DeclareMathOperator\csname #1\endcsname{#1} } \def\ops@scan#1,{% \ifx#1\relax \let\ops@next\relax \else \ops@declare{#1}\let\ops@next\ops@scan \fi\ops@next } \newcommand{\DeclareMathOperators}[1]{\ops@scan#1,\relax,} \makeatother \DeclareMathOperators{Rep,Tet,Maps,Diff} \begin{document} Operators: $\Rep, \Tet, \Maps, \Diff$ \end{document} ```
37
https://tex.stackexchange.com/users/169
361
244
https://tex.stackexchange.com/questions/71
4
My document consists (among other things) of blocks that look like this: ``` \begin{Solution}{6.7.8,1.2.3} ... \end{Solution} ``` or ``` \begin{Solution}{,1.2.3} ... \end{Solution} ``` I would like to define the Solution environment so that, upon setting a switch, the contents of the block is included as is (with LaTeX processing, of course), or is omitted completely if the last digit (the "3" above) is even. In addition, the inserted text, if it is inserted, should be labeled with the full string ("1.2.3") in the above example. I don't know TeX well enough to even know where to start. Anyone willing to help?
https://tex.stackexchange.com/users/76
Need macro to ignore specific even-numbered inputs
false
The solution to your question probably involves a number of three smaller subproblems: 1. Scanning the input argument to find the last number. 2. Testing whether a number is even or not. 3. Making (La)TeX ignore a block of code. For the first one you probably need some TeX hackery, maybe something like this ``` \def\scan#1.#2.{\ifx#2\relax\def\next{#1}\else\def\next{\scan #2.}\fi\next} \newcommand{\lastnumber}[1]{\scan#1.\relax.} ``` For the second task the `ifthen` package provides an `\iffodd` which might do the trick. For the final and third task take a look at the `verbatim` package which, among other things, defines a `comment` environment to ignore blocks of LaTeX code.
1
https://tex.stackexchange.com/users/169
362
245
https://tex.stackexchange.com/questions/332
13
There's a couple of things I want to be able to do that are quite similar and basically involve keeping back a macro expansion until the last minute. Possibly the simplest example is that I have a family of macros that expand out to variations of "object in X", but sometimes I override the default. So whilst `\cobj` expands to "object in C", `\sobj` expands to "set" and `\gobj` expands to "group". Where this causes trouble is when I want to talk about *an* object. Generically, I should type "an \cobj" but in the specific cases I may need to change to "a \sobj". The difficulty is that one reason for using these macros is so that I can change my mind as to which ones get special names and which don't. But it (partially) defeats the purpose if I have to go back through rewriting all the 'an's as 'a's. So what I'd like to do is define a macro '\a' which checks the next character for a vowel and produces 'an' or 'a' appropriately (modulo the odd special case!). The difficulty with this is that it isn't followed by a character, it's followed by a macro. So I need to expand that macro to find out what character is the eventual first one. If it were a simple macro, say `\def\cobj{object in C}` then I could just do `\def\a{\noexpand\@a}` and `\def\@a{\@ifnextchar{a}{an}{\@ifnextchar{e}{an}...}`, but `\cobj` is quite a complicated macro and there's several levels to be expanded before one actually gets to the final characters. In particular, `\cobj` takes an optional argument. So what I'd like is to be able to expand `\a` at the last possible minute. Sort of like `\noexpand`, but that only does a noexpand for one hop rather than 'end - 1' hops. Anyone have any ideas as to how best to proceed? To give an indication of the level of answer that would be acceptable, I know about `\expandafter` and I'm not afraid to use it! --- **Edit:** Here's another example that is a little more complicated. In a similar situation to the above, I have `\dcat` for "the category D". On a few rare occasions, I want to "eat" the "the", so I want a `\nothe` command that I can put beforehand: `\nothe\dcat` which eats the first word following it. It's simple enough to write a command that gobbles the next word in the *input stream*, but I want the next word in the *output* to disappear.
https://tex.stackexchange.com/users/86
Is there a '\ReallyDontExpandUntilTheLastMinute' command?
false
Maybe I'm missing something, but you could probably use `\edef` to expand the definition of `\cobj` (or whatever) and *then* find whether it starts with a vowel or not.
0
https://tex.stackexchange.com/users/169
364
246
https://tex.stackexchange.com/questions/50
32
Like most people here, my resume/CV is in LaTeX, but there are always these annoying companies (or more often, recruiters) who will only look at resumes in Microsoft Word format. How can I translate my beautiful LaTeX document into .doc without making it look horrible?
https://tex.stackexchange.com/users/70
How can I convert math-less latex documents into Microsoft Word?
false
The tug.org page has a significant list [here](http://tug.org/utilities/texconv/index.html). This list is in two parts, including both [LaTeX to 'PC textprocessors'](http://tug.org/utilities/texconv/textopc.html) and ['PC textprocessors' to LaTeX](http://tug.org/utilities/texconv/pctotex.html), you want to look at the former.
9
https://tex.stackexchange.com/users/186
368
247
https://tex.stackexchange.com/questions/367
15
Even-odd pages, inner edge 2.5cm, outer edge 1.5cm top and bottom 2cm. 1.5 spacing between the lines, double between paragraphs, no indent. A general solution for other requirements would be best.
https://tex.stackexchange.com/users/137
How do I change my margins and spacing to fit the PhD thesis requirements of University XYZ?
true
For the margins use the `geometry` package. For your particular example use ``` \usepackage[inner=2.5cm,outer=1.5cm,bottom=2cm]{geometry} ``` Check the documentation of this package for more details and other options! For the line spacing use `setspace`. Again for your example ``` \usepackage{setspace} \onehalfspacing % or \doublespacing ```
22
https://tex.stackexchange.com/users/169
369
248
https://tex.stackexchange.com/questions/367
15
Even-odd pages, inner edge 2.5cm, outer edge 1.5cm top and bottom 2cm. 1.5 spacing between the lines, double between paragraphs, no indent. A general solution for other requirements would be best.
https://tex.stackexchange.com/users/137
How do I change my margins and spacing to fit the PhD thesis requirements of University XYZ?
false
You could look at a class such as KOMA-Script, where there are settings for all of these things. On the other hand, you could use the appropriate packages for different items. The geometry package is the way to do margins, something like ``` \usepackage[ left-margin=1.5cm, right-margin=2.5cm, top-margin=2cm, bottom-margin=2cm ]{geometry} ``` For line spacing, use the setspace package, and for not having indents at the start of paragraphs use the parskip package.
6
https://tex.stackexchange.com/users/73
370
249
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[WinEdt](http://www.winedt.com/) — [winedt](/questions/tagged/winedt "show questions tagged 'winedt'") ------------------------------------------------------------------------------------------------------ * *Platforms:* (Windows XP until version 9.1)/Vista/7/8/10/11 * *License:* Shareware, [personal license $40-$100](http://www.winedt.com/registration.html) * *Languages:* en * *Unicode:* Yes (from version 7) * *RTL/bidi:* Yes (from version 10) * *`% !TEX` directives:* Probably possible. * *Syntax Highlighting:* Yes, customizable and including a `.dtx` mode * *Code Completion:* Yes, customizable * *Code Folding*: Yes, customizable (from version 8) * *Spell Checking:* Yes * *SyncTeX:* Yes with appropriate PDF viewer (*e.g.* SumatraPDF or built-in) * *Built-in Output Viewer:* Yes (from version 11, not fully built-in but in a separate window) * *Project Management:* Yes, own project management system and outliner --- A lot of useful add-ons for WinEdt can be found on the [WinEdt's Community](http://www.winedt.org/) site --- WinEdt is a good option on Windows. I wrote a post on some of the [features I liked in WinEdt 6.0](http://jeromyanglim.blogspot.com/2010/04/winedt-60-for-latex-features.html). To summarise: * Tree View can be customised * Automatically display your current location in TOC * Colour coding that aids usability * Intelligent defaults * Options to customise almost anything * Easy configuration interface with MikTeX * One click build process for LaTeX documents * Intuitive default shortcut keys and intuitive alt menu letters It's not free, but it's also not that expensive. WinEdt's new full Unicode support and its **translation tables** allow to show ∀α in the screen but to write `{\forall}{\alpha}` in the disk.
75
https://tex.stackexchange.com/users/151
374
252
https://tex.stackexchange.com/questions/222
19
There are at least two use cases where one might want to list items in a bibliography under separate subsections with different numbering conventions. * a CV, where you'd like to list journal papers, conference papers, workshop papers, etc under different categories (often needed in academic settings); * an annotated bibliography, where you might need different sections for different topics being covered. What I'd like is a method that allows me to specify names of subsections, and for an added bonus, different numbering conventions for each subsection, and then will list `\cite`s in different sections as per my wishes.
https://tex.stackexchange.com/users/103
How do I break up a bibliography into separately numbered sections?
true
For your use cases, I tend to use the `bibentry` package. As the focus is not really on providing a reference mechanism (i.e. `\cite`'s), but actually on *listing* the content of these bibliographical entries, this package works really nice. Using LaTeX lists you can style your output in whatever way you want, and the `\bibentry` command allows you to typeset the content of a bibliography entry wherever you want in your document.
4
https://tex.stackexchange.com/users/169
375
253
https://tex.stackexchange.com/questions/332
13
There's a couple of things I want to be able to do that are quite similar and basically involve keeping back a macro expansion until the last minute. Possibly the simplest example is that I have a family of macros that expand out to variations of "object in X", but sometimes I override the default. So whilst `\cobj` expands to "object in C", `\sobj` expands to "set" and `\gobj` expands to "group". Where this causes trouble is when I want to talk about *an* object. Generically, I should type "an \cobj" but in the specific cases I may need to change to "a \sobj". The difficulty is that one reason for using these macros is so that I can change my mind as to which ones get special names and which don't. But it (partially) defeats the purpose if I have to go back through rewriting all the 'an's as 'a's. So what I'd like to do is define a macro '\a' which checks the next character for a vowel and produces 'an' or 'a' appropriately (modulo the odd special case!). The difficulty with this is that it isn't followed by a character, it's followed by a macro. So I need to expand that macro to find out what character is the eventual first one. If it were a simple macro, say `\def\cobj{object in C}` then I could just do `\def\a{\noexpand\@a}` and `\def\@a{\@ifnextchar{a}{an}{\@ifnextchar{e}{an}...}`, but `\cobj` is quite a complicated macro and there's several levels to be expanded before one actually gets to the final characters. In particular, `\cobj` takes an optional argument. So what I'd like is to be able to expand `\a` at the last possible minute. Sort of like `\noexpand`, but that only does a noexpand for one hop rather than 'end - 1' hops. Anyone have any ideas as to how best to proceed? To give an indication of the level of answer that would be acceptable, I know about `\expandafter` and I'm not afraid to use it! --- **Edit:** Here's another example that is a little more complicated. In a similar situation to the above, I have `\dcat` for "the category D". On a few rare occasions, I want to "eat" the "the", so I want a `\nothe` command that I can put beforehand: `\nothe\dcat` which eats the first word following it. It's simple enough to write a command that gobbles the next word in the *input stream*, but I want the next word in the *output* to disappear.
https://tex.stackexchange.com/users/86
Is there a '\ReallyDontExpandUntilTheLastMinute' command?
false
It's quite hard to fully expand things which have a non-fixed number of arguments, at least unless you know enough to pick them up yourself. The reason is that as far as TeX is concerned your 'last possible moment' for expansion *is* when the token is read. For all TeX knows, your `\a` may alter the meaning of subsequent macros, category codes, *etc*. Could you post a bit more detail on the nature of your optional arguments. It's possible to have a fully-expandable macro that takes optional arguments (see xparse for one approach), so you can imagine designing `\a` so that it looks for the optional argument, grabs it if appropriate, does an `\edef` for `\cobj` and finally does the stuff you want to do.
1
https://tex.stackexchange.com/users/73
379
256
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[LyX](http://www.lyx.org) ------------------------- *Available for:* Windows, Mac, and Linux Open Source --- I use [LyX](http://www.lyx.org/) and I love it. From the webpage: > > LyX is a document processor that encourages an approach to writing based on the structure of your documents (WYSIWYM) and not simply their appearance (WYSIWYG). > LyX combines the power and flexibility of TeX/LaTeX with the ease of use of a graphical interface. This results in world-class support for creation of mathematical content (via a fully integrated equation editor) and structured documents like academic articles, theses, and books. In addition, staples of scientific authoring such as reference list and index creation come standard. But you can also use LyX to create a letter or a novel or a theatre play or film script. A broad array of ready, well-designed document layouts are built in. > > > Quite intuitive and user-friendly, and it is possible to import from and (more importantly) export to LaTeX. Too many useful features to mention, but I'll mention one that I find extra good: If you want to typeset a "2-dimensional" math expression, LyX is the way to go. I have used LyX for nearly ten years. Switched to AUCTeX recently, but I still use LyX whenever I want to get the LaTeX code for a complicated math expression.
103
https://tex.stackexchange.com/users/155
380
257
https://tex.stackexchange.com/questions/332
13
There's a couple of things I want to be able to do that are quite similar and basically involve keeping back a macro expansion until the last minute. Possibly the simplest example is that I have a family of macros that expand out to variations of "object in X", but sometimes I override the default. So whilst `\cobj` expands to "object in C", `\sobj` expands to "set" and `\gobj` expands to "group". Where this causes trouble is when I want to talk about *an* object. Generically, I should type "an \cobj" but in the specific cases I may need to change to "a \sobj". The difficulty is that one reason for using these macros is so that I can change my mind as to which ones get special names and which don't. But it (partially) defeats the purpose if I have to go back through rewriting all the 'an's as 'a's. So what I'd like to do is define a macro '\a' which checks the next character for a vowel and produces 'an' or 'a' appropriately (modulo the odd special case!). The difficulty with this is that it isn't followed by a character, it's followed by a macro. So I need to expand that macro to find out what character is the eventual first one. If it were a simple macro, say `\def\cobj{object in C}` then I could just do `\def\a{\noexpand\@a}` and `\def\@a{\@ifnextchar{a}{an}{\@ifnextchar{e}{an}...}`, but `\cobj` is quite a complicated macro and there's several levels to be expanded before one actually gets to the final characters. In particular, `\cobj` takes an optional argument. So what I'd like is to be able to expand `\a` at the last possible minute. Sort of like `\noexpand`, but that only does a noexpand for one hop rather than 'end - 1' hops. Anyone have any ideas as to how best to proceed? To give an indication of the level of answer that would be acceptable, I know about `\expandafter` and I'm not afraid to use it! --- **Edit:** Here's another example that is a little more complicated. In a similar situation to the above, I have `\dcat` for "the category D". On a few rare occasions, I want to "eat" the "the", so I want a `\nothe` command that I can put beforehand: `\nothe\dcat` which eats the first word following it. It's simple enough to write a command that gobbles the next word in the *input stream*, but I want the next word in the *output* to disappear.
https://tex.stackexchange.com/users/86
Is there a '\ReallyDontExpandUntilTheLastMinute' command?
true
Another answer to your problem but not to your question, what about creating a "\newobject" command where you can specify whether it's an "a" or "an" (and then you're safe from any exceptions!) and provide you with a set of commands to typeset as you need. For example ``` \newobject{Gobj}{a}{group} \newobject{Aobj}{an}{axiom} \Gobj % group \aGobj % a group \theGobj % the group \Aobj % axiom \aAobj % an axiom \theAobj % the axiom ``` You can of course define alternative interfaces, like `\A\GObj` or `\The{gobj}` or whatever looks better to you.
16
https://tex.stackexchange.com/users/169
382
258
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[TeXnicCenter](http://www.texniccenter.org/) — [texniccenter](/questions/tagged/texniccenter "show questions tagged 'texniccenter'") ------------------------------------------------------------------------------------------------------------------------------------ * *Platforms:* Windows XP/Vista/7/8/10 * Open Source * *Languages:* English, German, more dictionaries for spelling control downloadable * *Unicode:* Yes (in version 2, which was released mid-september 2013). * *RTL/bidi:* **?** * *`% !TEX` directives:* No * *Syntax Highlighting:* Yes, customizable (also background colour) * *Code Completion:* Yes * *Code Folding:* Yes * *Spell Checking:* Yes * *SyncTeX:* Yes * *Built-in Output Viewer:* No. You can config TeXnicCenter to use an external PDF viewer like Acrobat Reader or SumatraPDF with synchronized viewing. * *Project Management:* Yes --- I highly recommend TeXnicCenter. It stands out because it is the right mix between a GUI heavy editor (think Lyx) and no GUI (think emacs). Moreover, it is very easy to setup on Windows; and it integrates with MiKTeX without requiring extra configuration. An easy-to-navigate user interface provides a document tree, editor and compiling output as well as a vast array of drop-down menus: Click image to enlarge Customizable profiles allow for manipulating of `latex`, `bibtex` and `makeindex` parameters, as well as post-processing features and viewer parameters (e.g. forward and backward search): Click image to enlarge TeXnicCenter also allows to jump directly to the line that caused an error and provides code completion. TeXnicCenter has easy and integrated project management tools, and handles multiple files conveniently. It can be synchronized with pdf viewers such as Adobe Reader or SumatraPDF to provide forward and backward search options. Forward and backward search lets user jump and navigate between LaTeX code and pdf output seamlessly.
100
https://tex.stackexchange.com/users/189
384
259
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[TeXlipse](http://texlipse.sourceforge.net/) -------------------------------------------- *Available for:* Windows, Mac, Linux and others (Java based) Open Source --- I've been happily using [TeXlipse](http://texlipse.sourceforge.net/) in [Eclipse](https://www.eclipse.org) for a long time, it has integrated code completion (including BibTeX entries), customizable templates, an outline view - and being integrated into Eclipse it includes all useful stuff I'm used to when working in Eclipse, like editor shortcuts, version control, etc. There is also an Eclipse pdf viewer plugin [Pdf4Eclipse](http://borisvl.github.com/Pdf4Eclipse/) with complete support of SyncTeX, which allows forward and reverse search in LaTeX documents. Since TeXlipse rebuilds the LaTeX sources automatically (in background) after a save, the code and the preview of the document are always synchronized. Click image to enlarge
61
https://tex.stackexchange.com/users/30
386
260
https://tex.stackexchange.com/questions/383
81
The images in my paper are in EPS format. If I execute `pdflatex` to get a PDF version of my paper, the figures won't appear. I have to typeset using the `latex` command, and then convert the DVI file to PDF using `dvipdf`. Why doesn't `pdflatex` support EPS figures?
https://tex.stackexchange.com/users/165
Why can't pdflatex print EPS figures?
false
Yes it can and it will be default in TeXLive2010. You need: 1. `\usepackage{epstopdf}` in the preemble 2. Include graphics without extension e.g `\includegraphics{picture}` 3. `pdflatex -shell-escape` or enabling write18 on windows
68
https://tex.stackexchange.com/users/137
387
261
https://tex.stackexchange.com/questions/383
81
The images in my paper are in EPS format. If I execute `pdflatex` to get a PDF version of my paper, the figures won't appear. I have to typeset using the `latex` command, and then convert the DVI file to PDF using `dvipdf`. Why doesn't `pdflatex` support EPS figures?
https://tex.stackexchange.com/users/165
Why can't pdflatex print EPS figures?
true
EPS is more than an image format: it's an entire programming language. The way that DVI mode includes EPS images is to simply leave a space for them in the output. If you look at a DVI, you'll find that the EPS images are not actually added to it: they have to be present for appropriate interpretation when looking at the DVI. When you convert the DVI to EPS format (or directly to PDF), it is the conversion tool that deals with the EPS, not TeX at all. (The usual DVI route uses GhostScript: it does contain all of the code to interpret EPS files.) When producing a PDF directly, the images do have to be properly included by pdfTeX. It doesn't include an EPS interpreter (which would be much too complex to do), and instead expects that some other tool (probably GhostScript) is used first to make PDF files for inclusion. PDF files use some of the same concepts as EPS, but in a way that pdfTeX can use successfully.
69
https://tex.stackexchange.com/users/73
388
262
https://tex.stackexchange.com/questions/93
18
What do I need in order to use TeX on Windows as an eventual replacement for Word? What software is available for Windows for WYSIWYG editing of TeX files?
https://tex.stackexchange.com/users/91
What do I need in order to use TeX on Windows as an eventual replacement for Word?
false
If you're looking for a direct replacement for Word, you're never going to find it in TeX. They are fundamentally different products, even if there is some overlap in what they're used for. Word is built from the ground up to be a WYSIWYG word processor, and **nothing** else. It couldn't care less about actually producing nice-looking text, as long as it's able to present an editor that looks *exactly* like the output. TeX is designed from the ground up to actually output professional, nice-looking documents. It does this by sacrificing the WYSIWYG paradigm. In order for TeX to typeset your document, it has to be given freedom to do so. Which means that it doesn't let the user see the document while you're editing it (because the output is constantly changing in non-obvious ways. Line breaks change, ligatures are inserted, the table of contents is updated and so on.) In a sense, Word allows you to take a document, and insert a character into it. And what you get out of it is precisely that: the same document, but with that extra character of text. All other changes are minimized because it'd confuse the user of the WYSIWYG editor. TeX on the other hand, doesn't allow you to insert into an existing document. You can generate a new document which contains that extra character of text, but it's a different document from the original one. The entire paragraph you inserted into might have changed, the characters surrounding the one you inserted may have changed, and so on. Tables and images might have been moved to an entirely different page. As much as I like prefer TeX over Word, I would never recommend it as a direct replacement. Someone expecting to work with MS Word might find OpenOffice acceptable, but they'll just be frustrated by TeX. Anyway, [Lyx](http://www.lyx.org/) might be a reasonable compromise, giving you *something like* Word's WYSIWYG editor, while still producing TeX-style documents. For "true" TeX, [MikTeX](http://miktex.org/) is the de facto standard on Windows. It comes with pretty much everything you need.
6
https://tex.stackexchange.com/users/148
389
263
https://tex.stackexchange.com/questions/366
11
For my thesis my university has only a Word template with font sizes and "window" specifications to position title, name, date, etc. What is the easiest way to layout such thing, if I'm not an expert in creating custom classes and only a basic user of pstricks and tikz?
https://tex.stackexchange.com/users/137
How to painlessly create a custom layout for the title page for pdflatex?
false
If it's for a one off solution, you can use `minipage` to typeset individual "windows" with specific widths. Then tweak the vertical spacing between those windows using the `\vspace*{2cm}` command. Of course you can specify whatever separation you want, other than `2cm`, and even negative lengths. With the `geometry` package you can also get the proper margins around the whole page.
1
https://tex.stackexchange.com/users/169
390
264
https://tex.stackexchange.com/questions/367
15
Even-odd pages, inner edge 2.5cm, outer edge 1.5cm top and bottom 2cm. 1.5 spacing between the lines, double between paragraphs, no indent. A general solution for other requirements would be best.
https://tex.stackexchange.com/users/137
How do I change my margins and spacing to fit the PhD thesis requirements of University XYZ?
false
Have you checked if your university already has a document class (`.cls`) or style file (`.sty`) for theses? If there is no university wide one, you might also check with a prof or grad student in Computer Science or Mathematics. Many universities or departments do have such files already. Though, in some cases, the quality and utility of these files leaves a bit to be desired.
9
https://tex.stackexchange.com/users/93
391
265
https://tex.stackexchange.com/questions/352
19
{} and [] do some kind of grouping, and comma seems to be special as well. Being a programmer I find it frustrating to use Latex on incantation-only basis. I would like to know how does it exactly work. What is exactly the syntax of TeX/LaTeX? How is it parsed? Does Latex introduces new commands only or changes the syntax as well? Or maybe changing syntax locally is a inherent feature of Tex?
https://tex.stackexchange.com/users/69
Syntax of TeX/LaTeX
false
The excellent [*TeX by Topic*](http://www.eijkhout.net/tbt/) has already been mentioned, and I'd start there if you are a programmer looking for enlightenment. What you need to bear in mind is that TeX works with tokens with category codes. In the case of grouping, usually `{` and `}` are tokens with category codes 1 (begin group) and 2 (end group), respectively. So TeX will start a group when it reads `{` and finish it when it reads `}`. For a simple macro such as ``` \newcommand*\example[1]{Stuff with #1} ``` the argument will be either a single token or a single group. Thus ``` \example{stuff} ``` will absorb 'stuff' as #1, but ``` \example stuff ``` will only pick up the 's' of 'stuff', as 's' is a single token. LaTeX introduces the idea of optional arguments inside `[` ... `]`. As pointed out by Andrew, this isn't done by grouping, and so can give odd results. You can get around this: see how xparse manages optional arguments for example. LaTeX also uses `(` ... `)` for co-ordinate arguments, but again with no grouping. As I said, category codes are important. ConTeXt uses `[` and `]` for grouping rather than `{` and `}`. So it's not the character you need to worry about, but the token (including the category code). This is a rather TeX-specific concept, so looking at *TeX by Topic* and *The TeXbook* is a good way to get to grips with it.
10
https://tex.stackexchange.com/users/73
392
266
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[Vim](http://www.vim.org/) with [LaTeX-suite](http://vim-latex.sourceforge.net/) — [vim](/questions/tagged/vim "show questions tagged 'vim'") [latex-suite](/questions/tagged/latex-suite "show questions tagged 'latex-suite'") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * *Platforms:* Windows, Mac, Linux and others * *License:* Open Source Charityware * *Languages:* **?** * *Unicode:* Yes * *RTL/bidi support:* [partially](http://vimdoc.sourceforge.net/htmldoc/rileft.html) * *`% !TEX` directives:* No, but has [modelines](http://vimdoc.sourceforge.net/htmldoc/options.html#modeline) * *Syntax Highlighting:* Yes, customizable * *Code Completion:* Yes (using [Omni Completion](http://vim.wikia.com/wiki/Omni_completion), extendable with [SnipMate](https://github.com/garbas/vim-snipmate) plugin) * *Code Folding:* Yes * *Spell Checking:* Yes * *SyncTeX:* Yes, see e.g. [this question](https://tex.stackexchange.com/questions/2941/how-to-setup-synctex-with-vim-pdflatex-and-an-open-source-pdf-viewer-under-linu) * *Built-in Output Viewer:* No * *Project Management:* **?** --- If you're really hardcore, you can always use Vim. There's a [suite of macros](http://vim-latex.sourceforge.net/) and whatnot appropriate for Vim which can be used to edit LaTeX files. You can have word/command completion via `<C-P>` and `<C-N>`, to go the previous and next matches, respectively. There is a version of Vim with graphical menus, called gVim. If it is used with LaTeX-suite, then various TeX commands are displayed in the menu bar for quick insertion in the text. (For Mac, there is a native build called [MacVim](http://code.google.com/p/macvim).) ### Features Vim also allows for code folding, the package `vim-latex` offers automatic code folding. Folding can also be done manually based on a key (e.g., `{{{` and `}}}`) to open and close automatic folds. Example of folds can be seen as follows: As per original question, some other useful features not listed elsewhere in this post include ### VIM * Regular Expressions * Powerful keyboard short-cuts/commands * Extremely customizable * Smart Indenting ### LaTeX-Suite * Calling the compiler is quick with `\ll`; viewing the result is `\lv` * Environments accessible with three letter sequences in insert mode: + `EEQ` = equation environment + `EFI` = figure environment * Place-holders (`<+text+>`) can be jumped to with `Ctrl-J` without leaving insert mode * Inverse searching: Double click in (supported) pdf viewer and you jump to corresponding tex source line For issues, pull request and installation from github see [here](https://github.com/vim-latex/vim-latex).
298
https://tex.stackexchange.com/users/142
394
267
https://tex.stackexchange.com/questions/326
100
Aside from CTAN, what are good resources/repositories for Latex templates? In particular, I'm looking for some pretty Thesis templates (I'm familiar with classicthesis)
https://tex.stackexchange.com/users/171
LaTeX templates for writing a thesis
false
UK-TUG have a list of thesis templates from various UK institutions at <http://uk.tug.org/training/thesis/>. There is also a good generic template at <http://www.sunilpatel.co.uk/thesistemplate.php>, but I'm note sure any of these are 'pretty'. At least in the UK the requirements tend to be vary much geared around a traditional manuscript style (double spaced and so on).
15
https://tex.stackexchange.com/users/73
395
268
https://tex.stackexchange.com/questions/363
25
It seems that a common operation needed when defining new commands is to scan over a list of arguments (separated e.g. by a comma, but maybe by something else) and do something with each argument in the list, find the last one, or whatever. For example to write commands that look like `\Command{a,b,c}` or `\Command{c.d.e}` and do something with each `a`, `b`, and `c`. See e.g. questions on [defining a list of operators](https://tex.stackexchange.com/questions/48/how-can-i-specify-a-long-list-of-math-operators) and [ignoring even numbered inputs](https://tex.stackexchange.com/questions/71/need-macro-to-ignore-specific-even-numbered-inputs). Some solutions have been posted there, but what would be the best idiom to perform such kind of operations? LaTeX's `\@for` looks very nice, but is it possible to use it to scan anything other than comma-separated lists?
https://tex.stackexchange.com/users/169
What is the best way to scan over a list of somethings?
false
Here's my solution (borrowed form Kevin Walker): ``` % tricky way to iterate macros over a list \def\semicolon{;} \def\applytolist#1{ \expandafter\def\csname multi#1\endcsname##1{ \def\multiack{##1}\ifx\multiack\semicolon \def\next{\relax} \else \csname #1\endcsname{##1} \def\next{\csname multi#1\endcsname} \fi \next} \csname multi#1\endcsname} ``` And some examples of its use: ``` % \def\cA{{\cal A}} for A..Z \def\calc#1{\expandafter\def\csname c#1\endcsname{{\mathcal #1}}} \applytolist{calc}QWERTYUIOPLKJHGFDSAZXCVBNM; % \DeclareMathOperator{\pr}{pr} etc. \def\declaremathop#1{\expandafter\DeclareMathOperator\csname #1\endcsname{#1}} \applytolist{declaremathop}{pr}{im}{gl}{ev}{coinv}{tr}{rot}{Eq}{obj}{mor}{ob}{Rep}{Tet}{cat}{Maps}{Diff}{Homeo}{sign}{supp}{Nbd}{res}{rad}; ```
2
https://tex.stackexchange.com/users/77
398
269
https://tex.stackexchange.com/questions/48
44
The preambles of my LaTeX documents often include many many lines of `\DeclareMathOperator` instructions, e.g. ``` \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} \DeclareMathOperator{\Maps}{Maps} \DeclareMathOperator{\Diff}{Diff} ``` Is there a nice way to *map* some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?
https://tex.stackexchange.com/users/77
How can I specify a long list of math operators?
false
Here's a solution from Kevin Walker's LaTeX preambles: ``` % tricky way to iterate macros over a list \def\semicolon{;} \def\applytolist#1{ \expandafter\def\csname multi#1\endcsname##1{ \def\multiack{##1}\ifx\multiack\semicolon \def\next{\relax} \else \csname #1\endcsname{##1} \def\next{\csname multi#1\endcsname} \fi \next} \csname multi#1\endcsname} % \DeclareMathOperator{\pr}{pr} etc. \def\declaremathop#1{\expandafter\DeclareMathOperator\csname #1\endcsname{#1}} \applytolist{declaremathop}{pr}{im}{gl}{ev}{coinv}{tr}{rot}{Eq}{obj}{mor}{ob}{Rep}{Tet}{cat}{Maps}{Diff}{Homeo}{sign}{supp}{Nbd}{res}{rad}; ```
3
https://tex.stackexchange.com/users/77
399
270
https://tex.stackexchange.com/questions/397
63
I do know that LaTeX3 is a long term project, but I'm interested to find out what's new in LaTeX3 and have there already been any big advancements and backwards incompatible changes.
https://tex.stackexchange.com/users/137
What new bits have already been implemented in LaTeX3? Will my current documents (with many packages) still compile with LaTeX3?
true
At present, the 'usable' bits of LaTeX3 are: * The [expl3](https://ctan.org/pkg/expl3) language. This provides a much more 'programming-like' language than using TeX primitives plus LaTeX internals. The language is still fluid (I have some changes I'm pushing, but the rest of the team are not so sure), but the general shape is there. The idea is to continue to extend expl3 to add more features. For example, I'm currently working out what type of real number arithmetic we need. * [xparse](https://ctan.org/pkg/xparse). This is a package to define document commands in a much more robust way than `\newcommand` does. I mention xparse a lot as I like it :-) For me, it works very well (Note: I wrote most of the current implementation, although the ideas are not really mine.) With xparse you can quickly define all sorts of input syntax that are a pain in LaTeX2e. It also generates robust commands (using e-TeX), and lets you automatically have access to the arguments to an environment at the end of the environment. * [xtemplate](https://ctan.org/pkg/xtemplate). This is intended to allow the separation of design and implementation by giving a proper structure to design decisions. The template concept is not easy to explain in a few lines: I can only recommend you read the documentation. None of the above alter any existing parts of LaTeX: this is deliberate. What we are working on at the moment is things like the galley (where boxes are on the page) and the output routine. Those packages (which are not currently on CTAN, but are available from the public SVN) do alter the behaviour of LaTeX (particularly the output routine one). The advantage of the current modules is that you can use them and know you have documented stuff. Unlike programming in LaTeX2e, we're aiming to explain all of the expl3 functions that are 'public' so that you don't need to use bits of TeX, bits of documented LaTeX and bits of undocumented LaTeX to get things to work. I've written siunitx in expl3, and it makes programming LaTeX a lot easier. (Compare the code for siunitx v2 with that for v1 to see this!) What is not yet formalised is how LaTeX3 will look for the end user. I think, however, that we can be confident that the current basic model ``` \documentclass{<something>} \begin{document} Some text \emph{with italics}. \end{document} ``` will survive (the project will fail if it does not). I know that LaTeX3 is 'long term', but the aim with things like expl3 and xparse is to bring new ideas to users now. As I say, siunitx (a LaTeX2e package) is written almost entirely in expl3, and [fontspec](http://tug.ctan.org/pkg/fontspec) is moving that way too. This means that without needing to know about LaTeX3 users of these packages get the benefits that come from a clearer programming approach. I keep pushing xparse as it lets you easily do things that `\newcommand` does not ``` \NewDocumentCommand\foo{omom}{% % Mandatory #2 and #4 % Optional #1 and #3 } ```
61
https://tex.stackexchange.com/users/73
400
271
https://tex.stackexchange.com/questions/396
5
Does LaTeX have an escape sequence for the open source [sarcmark](http://opensarcasm.org/)?
https://tex.stackexchange.com/users/142
Does LaTeX support the sarcmark?
true
`\textexclamdown` is an inverted exclamation point: (found via [Detexify](http://detexify.kirelabs.org/classify.html))
7
https://tex.stackexchange.com/users/29
401
272
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[Texmaker](http://www.xm1math.net/texmaker/) — [texmaker](/questions/tagged/texmaker "show questions tagged 'texmaker'") ------------------------------------------------------------------------------------------------------------------------ * *Platforms:* Windows XP/Vista/7/8, OS X 10.5+, Linux * *License:* GPL license, free * *Languages:* cs, de, el, en, es, fa, fr, gl, hu, it, nl, pl, pt, pt (bra), ru, se, sr, zh (cn), zh (tw) * *Unicode:* Yes * *RTL/bidi:* **?** * *`% !TEX` directives:* No * *Syntax Highlighting:* Yes, customizable * *Code Completion:* Yes, customizable * *Code Folding*: Yes * *Spell Checking:* Yes * *SyncTeX:* Yes * *Built-in Output Viewer:* Yes, supports PDF * *Project Management:* Yes Customizable code completion Rectangular block selection --- The editor [TeXstudio](https://tex.stackexchange.com/a/5281/) started out as a fork of Texmaker and was originally called TexMakerX.
252
https://tex.stackexchange.com/users/193
402
273
https://tex.stackexchange.com/questions/301
42
How can I produce exercises in one part of a LaTeX document with selected answers in another? I could, of course, simply typeset the questions and the answers separately, but this is too likely lead to divergence in the labels for the questions and the answers as the document is edited. What I'd really like is a command that would allow me to typeset exercises at the point at which the command was used and which took an optional argument for a solution to be stored until a final section (chapter, or part) "Selected Exercise Answers". I'd like the questions (and the selected answers) to be labeled in the output by Chapter.Section.Question or even Chapter.Question.
https://tex.stackexchange.com/users/93
How can I produce exercises in one part of a LaTeX document with selected answers in another?
false
If you can't find a LaTeX package to do your job, this can be done with the \openout, \write and \closeout commands of TeX to output whatever you want to an auxilliary file, and then import it back by running \input on it. The file writing functions are described on pages 226--228 in the TeXBook.
1
https://tex.stackexchange.com/users/194
403
274
https://tex.stackexchange.com/questions/393
14
Is there a documentclass specificaly for taking notes in a class? If not, what does the community see as things which should be included in such a class (which I'd be happy to write)? **Edit**: This was meant to be edited days ago, my apologies. However, I'm looking for a documentclass specifically for something like *Engineering*, *Biology* would be nice as well, something which allows the drawing of flow charts of metabolic processes, etc. I type most of my math notes up in LaTeX because it's quite convenient. Not so much for something like organic *chemistry*, I'd like all my compounds that I use regularly to be in say a bank of compounds which I could just insert at will, and link instances of that phrase to an image at the end, much like an endnote. I'd also be interested if anyone has document classes for *Biochemistry*.
https://tex.stackexchange.com/users/142
Best documentclass for class notes
true
Right. This type of question is quite broad and I'll try to answer it. First of all depends whether you are doing humanities, languages, mathematics, engineering and particular sciences. More importantly depends on how many graphics, formulas you have in the notes and how quickly you are at typing those up (since typing those is the slowest of all). I personally did take notes in latex using just report class. I would it great to type up syllabus beforehand for the whole year such that I can predict headings more precisely. I was able to keep up with formulas but I couldn't keep up with figures (I didn't know tikz back then). So I have ended up drawing figures on a tablet or paper and then scanning them in later on. I'm doing electronic engineering. If you are doing chemistry, biology or physics your experience can be much different. And if you are doing languages, history or law your requirements will be completely different. Best is to ask: "I'm doing electronics, what is the best way to quickly sketch circuits for later polishing in latex?" The questions as it is now doesn't tell what area your are not finding report class to be suitable.
10
https://tex.stackexchange.com/users/137
404
275
https://tex.stackexchange.com/questions/393
14
Is there a documentclass specificaly for taking notes in a class? If not, what does the community see as things which should be included in such a class (which I'd be happy to write)? **Edit**: This was meant to be edited days ago, my apologies. However, I'm looking for a documentclass specifically for something like *Engineering*, *Biology* would be nice as well, something which allows the drawing of flow charts of metabolic processes, etc. I type most of my math notes up in LaTeX because it's quite convenient. Not so much for something like organic *chemistry*, I'd like all my compounds that I use regularly to be in say a bank of compounds which I could just insert at will, and link instances of that phrase to an image at the end, much like an endnote. I'd also be interested if anyone has document classes for *Biochemistry*.
https://tex.stackexchange.com/users/142
Best documentclass for class notes
false
"Taking notes for a class" covers a broad territory, but one thing which it might be nice in general to have is a way of marking sections of text with dates and instructor names. One could tell LaTeX, "This section of text comes from a lecture given on 27 January by the TA instead of the regular professor", and that information would be available for inclusion in the page header, the TOC, etc. When I was taking lots of LaTeX notes during lectures, I defined commands to abbreviate the constructions which kept coming up in whichever class it was. That way, I was able to keep up with hairy formulae; I sketched diagrams and such by hand and worked them up as SVG files later (or, in one case, I clipped figures from the professor's hand-written notes, which he posted on the class website). Such abbreviations are like to be fairly subject-specific, so they're probably not suitable for a general "lecture notes" package or documentclass.
2
https://tex.stackexchange.com/users/112
406
276
https://tex.stackexchange.com/questions/336
12
I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of `${x^2_4}^6_8$`, the 2 and 6 were aligned, as were the 4 and 8 (obviously, I'd expect to do this with a macro rather than the super- and subscript commands). As a bonus, it'd be nice to be able to control whether or not this appeared like `$x^{26}_{48}$` or `$x^{2\phantom{4}6}_{\phantom{2}4\phantom{6}8}$`. And it would be nice to truly be able to do this incrementally, so that each subscript or superscript could be added without having to know all the previous ones (useful for adding stuff via macros). Simply writing `$x^2_4{}^6_8$` wouldn't work as the latter super and subscripts wouldn't know the difference between x and X and ∏. (see also [non-kludgey left subscripts](https://tex.stackexchange.com/questions/334/non-kludgey-left-subscripts))
https://tex.stackexchange.com/users/86
Is there a way to stop the vertical spread of multiple super- and sub-scripts?
true
My answer to the linked question on "non-kludgy left index" also works here. Use the [tensor](http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tensor) package. The `\tensor` form leaves phantom spaces, while the `\tensor*` form compresses everything.
15
https://tex.stackexchange.com/users/119
408
278
https://tex.stackexchange.com/questions/319
15
I use TexMaker and LyX in Ubuntu. I'd like to typeset Tamil/Telugu/Hindi text, and so far I've been unsuccessful. Please suggest me a working TeX/LaTeX/variants setup for Indic languages, especially Tamil. edit: XeTeX seems to have good Unicode support, and I read TexMaker has XeteX support too. I installed all XeTeX, latex-tamil packages etc. But couldn't make them work yet. Documentations talk about Arabic or Korean text. Nothing mentioned about Tamil/Indic text.
https://tex.stackexchange.com/users/172
LaTeX/XeTeX setup Tamil/Indic languages
false
For Hindi, you can probably use the [devanagari](http://www.ctan.org/tex-archive/language/devanagari/) package for LaTeX. I've used it for Sanskrit. Just note that the "internal" codes for the script is a bit obtuse, so it is suggested that you follow the documentation and type in a more readable format, and then pass the source file through a preprocessor. (Included in the distribution.) There are also language packages for [Telugu](http://tug.ctan.org/tex-archive/language/telugu/) and [Tamil](http://tug.ctan.org/tex-archive/language/tamil/), but not having used either I cannot say more about them.
2
https://tex.stackexchange.com/users/119
410
279
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[TeXworks](https://github.com/TeXworks/texworks/releases) — [texworks](/questions/tagged/texworks "show questions tagged 'texworks'") ------------------------------------------------------------------------------------------------------------------------------------- * *Platforms*: Windows XP/Vista/7/8, OS X, Linux all pre-compiled plus source available * *License*: GPL * *Languages*: en, af, ar, ca, cs, de, fa, fo fr, it, ja, nl, ko, pl, pl, ru, sl, tr zh * *Unicode*: Yes * *RTL/bidi*: Yes * *`% !TEX` directives*: Yes * *Syntax Highlighting*: Yes, regex-based * *Code Completion*: Yes, customizable based on 'known entry' list * *Code Folding*: No * *Spell Checking*: Yes, but have to install by hand * *SyncTeX*: Yes * *Built-in Output Viewer*: Yes, PDF (Poppler-based, auto-follow option to scroll source and preview together) * *Project Management*: No --- Screen shot of TeXworks on the Mac: the layout stays the same on Windows and Linux: --- On Windows and Linux, I use [TeXworks](https://github.com/TeXworks/texworks/releases), which provides with an editor window and a document preview window. Clicking in the document preview locates the edit mark at that TeX source corresponding to the clicked location.
182
https://tex.stackexchange.com/users/94
411
280
https://tex.stackexchange.com/questions/409
20
I'm about to start writing something up which includes a fair number of [Dynkin diagrams](http://mathworld.wolfram.com/DynkinDiagram.html), and I can think of several ways of going about it: * Just draw the darn things in, *e.g.,* [InkScape](http://www.inkscape.org/), and include the graphics in the standard way. * Hack them together using the `picture` environment or tikz, as [this person](http://www4.ncsu.edu/~njschwar/latex.shtml) suggests. * Abuse the [feynmf](http://xml.web.cern.ch/XML/textproc/feynmf.html) package, possibly with defining new kinds of "propagator" lines. Anybody have experience with this sort of task?
https://tex.stackexchange.com/users/112
What is a good way to draw Dynkin diagrams in LaTeX?
false
I have two additional suggestions: * Use the [Xy-pic](http://tug.org/applications/Xy-pic/) package. I find easier than tikz or feynmf. * Or you can find a paper on the arxiv which has some Dynkin diagrams and see what the authors have done.
6
https://tex.stackexchange.com/users/104
412
281
https://tex.stackexchange.com/questions/339
920
What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. --- This question is undergoing a systematic refurbishment, see [Let’s polish the Editors/IDEs question](https://tex.meta.stackexchange.com/questions/3253) on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question. --- ### List of editors Links to answers. * [Archimedes](https://tex.stackexchange.com/a/213830) * [Atom](https://tex.stackexchange.com/a/195435) * [Auto Latex Equations for Google Docs](https://tex.stackexchange.com/questions/339/latex-editors-ides/397408#397408) * [Bakoma TeX Word](https://tex.stackexchange.com/a/53406) * [Compositor](https://tex.stackexchange.com/a/384950) * [Emacs with AUCTeX](https://tex.stackexchange.com/a/356) * [Emacs with WhizzyTeX](https://tex.stackexchange.com/a/998) * [gedit with the gedit-LaTeX-plugin](https://tex.stackexchange.com/a/413) * [Geany with GeanyLaTeX](https://tex.stackexchange.com/a/1000) * [gummi](https://tex.stackexchange.com/a/923) * [Inlage](https://tex.stackexchange.com/a/4568) * [IntelliJ IDEA](https://tex.stackexchange.com/a/485125) * [jEdit](https://tex.stackexchange.com/a/281907) * [JOVE](https://tex.stackexchange.com/a/142195) * [Kile](https://tex.stackexchange.com/a/340) * [KTikZ](https://tex.stackexchange.com/a/1321) * [Latexian](https://tex.stackexchange.com/a/6843) * [Latexila](https://tex.stackexchange.com/a/21253) * [LaTeX Base](https://tex.stackexchange.com/a/362080) * [LEd](https://tex.stackexchange.com/a/347) * [LyX](https://tex.stackexchange.com/a/380) * [Notepad++](https://tex.stackexchange.com/a/10220) * [Overleaf](https://tex.stackexchange.com/a/116794) * [Open LaTeX Studio](https://tex.stackexchange.com/a/265836) * [Papeeria](https://tex.stackexchange.com/a/227465) * [QuatraTeX](https://tex.stackexchange.com/a/262949) * [RTextDoc](https://tex.stackexchange.com/a/141039) * [DMelt](https://tex.stackexchange.com/a/157012) * [Scientific Word](https://tex.stackexchange.com/a/26636) * [Scientific Workplace](https://tex.stackexchange.com/a/26634) * [Scribes](https://tex.stackexchange.com/a/99643) * [Scribo](https://tex.stackexchange.com/a/5273) * [Sublime Text with LaTeXTools or LaTeXing Plugin](https://tex.stackexchange.com/a/42552) * [TechWriter](https://tex.stackexchange.com/a/274816) * [TeXifier](https://tex.stackexchange.com/a/111367) * [TeXlipse for Eclipse](https://tex.stackexchange.com/a/386) * [Texmaker](https://tex.stackexchange.com/a/402) * [TeXnicCenter](https://tex.stackexchange.com/a/384) * [TeXnicle](https://tex.stackexchange.com/a/141869) * [Texpen](https://tex.stackexchange.com/a/225515) * [TeXShop](https://tex.stackexchange.com/a/350) * [TeXStudio](https://tex.stackexchange.com/a/5281) * [TextMate](https://tex.stackexchange.com/a/19552) * [TeXworks](https://tex.stackexchange.com/a/411) * [Verbosus](https://tex.stackexchange.com/a/142191) * [Vim with LaTeX-Box](https://tex.stackexchange.com/a/148473) * [Vim with LaTeX-plugin](https://tex.stackexchange.com/a/394) * [Vim with Snipmate plugin and rubber](https://tex.stackexchange.com/a/5370) * [Vim with vimtex](https://tex.stackexchange.com/a/252555) * [Visual Studio Code with LaTeX-Workshop](https://tex.stackexchange.com/a/390058/74942) * [WinEdt](https://tex.stackexchange.com/a/374) * [Winefish](https://tex.stackexchange.com/a/334184) * [WinShell](https://tex.stackexchange.com/a/631)
https://tex.stackexchange.com/users/183
LaTeX Editors/IDEs
false
[gedit](http://live.gnome.org/Gedit/) with the [gedit-LaTeX-plugin](http://live.gnome.org/Gedit/LaTeXPlugin) ------------------------------------------------------------------------------------------------------------ *Available for*: Windows, Mac, Linux and others Open Source *Unicode:* yes *RTL/bidi:* yes --- It has a clean interface and provides: Code Completion, Spell Checking, Syntax Checking and Validation, Outlines, Wizards, BibTeX Integration, Template Editing, User-Defined Snippets and a preconfigured comprehensive build system using rubber (including LaTeX → DVI with source specials for inverse search). For my gedit LaTeX suite to be complete, I add two other plugins, first the 'Control your tabs' plugin to get Ctrl-(Shift)-Tab behavior, and also the AutoCompletion plugin which provides automatic suggestions for completion of any word, based on the words already present in the document - it can be a real time saver. --- **Temporary edit:** Currently the plugin is not ready for release with gedit 3. So, if you're running the latest Ubuntu (11.10) or like being cutting edge, you need to manually install the [LaTeX-plugin](http://live.gnome.org/Gedit/LaTeXPlugin). The easiest way is to download the version you want from [here](http://ftp.gnome.org/pub/GNOME/sources/gedit-latex/) extract and install with the standard `./configure`, `make`, `sudo make install` sequence. Read the `INSTALL` file in the archive for more details. You can also get the most recent version of the plugin from their [git repository](http://git.gnome.org/browse/gedit-latex). Note: If the `./configure` script gives the error "No package ‘gtk+-3.0′ found" then, under Ubuntu, run `sudo apt-get install libgtk-3-dev` and then try the script again.
46
https://tex.stackexchange.com/users/10
413
282
https://tex.stackexchange.com/questions/409
20
I'm about to start writing something up which includes a fair number of [Dynkin diagrams](http://mathworld.wolfram.com/DynkinDiagram.html), and I can think of several ways of going about it: * Just draw the darn things in, *e.g.,* [InkScape](http://www.inkscape.org/), and include the graphics in the standard way. * Hack them together using the `picture` environment or tikz, as [this person](http://www4.ncsu.edu/~njschwar/latex.shtml) suggests. * Abuse the [feynmf](http://xml.web.cern.ch/XML/textproc/feynmf.html) package, possibly with defining new kinds of "propagator" lines. Anybody have experience with this sort of task?
https://tex.stackexchange.com/users/112
What is a good way to draw Dynkin diagrams in LaTeX?
true
I would not recommend abusing the feynmf package. In the past I have used the picture environment (with the `eepic` package) to do precisely this. Table 6.2 in page 185 of [these lecture notes](http://www.maths.ed.ac.uk/~jmf/Teaching/Lectures/EDC.pdf) (PDF file), I typeset the Dynkin diagrams using the picture environment. I'm happy to make the code available. Here's a sample for the $A\_n$ Dynkin diagram: ``` \begin{picture}(50,7) \multiput(5,1)(10,0){5}{\circle{2}} \multiputlist(10,1)(10,0)% {{\line(1,0){8}},{\line(1,0){8}},{$\cdots$},{\line(1,0){8}}} \multiputlist(5,3)(10,0){$\scriptscriptstyle 1$,% $\scriptscriptstyle 2$,$\scriptscriptstyle 3$,% $\scriptscriptstyle \ell{-}1$,$\scriptscriptstyle \ell$} \end{picture} ``` The diagram is decorated with a labelling of the nodes, by the way.
8
https://tex.stackexchange.com/users/18
414
283
https://tex.stackexchange.com/questions/409
20
I'm about to start writing something up which includes a fair number of [Dynkin diagrams](http://mathworld.wolfram.com/DynkinDiagram.html), and I can think of several ways of going about it: * Just draw the darn things in, *e.g.,* [InkScape](http://www.inkscape.org/), and include the graphics in the standard way. * Hack them together using the `picture` environment or tikz, as [this person](http://www4.ncsu.edu/~njschwar/latex.shtml) suggests. * Abuse the [feynmf](http://xml.web.cern.ch/XML/textproc/feynmf.html) package, possibly with defining new kinds of "propagator" lines. Anybody have experience with this sort of task?
https://tex.stackexchange.com/users/112
What is a good way to draw Dynkin diagrams in LaTeX?
false
I typically use tikz. I like tikz because I find it relatively straight-forward. Also, because my interest is in representation theory and quivers I have to create many other diagrams beyond Dynkin diagrams and tikz allows me to use a single language to create all of them and the resulting graphics have a consistent style (arrow heads, line thickness, etc).
6
https://tex.stackexchange.com/users/144
415
284
https://tex.stackexchange.com/questions/405
13
ConTeXt and LaTeX are well-known and I'm aware of different engines to process those, e.g., XeTeX, pdfTeX, or LuaTeX. But on this [meta](https://tex.meta.stackexchange.com/questions/51/avoid-using-the-tex-tag/64#64) question discussion came up about TeX, plain-TeX, initex. Can someone please tell me the quick difference between those? Are there any other meta-packages? And what is bare minimum TeX (the one everything else is based upon)? And which one of these are "frozen" in featureset and bugs.
https://tex.stackexchange.com/users/137
What are some of the less-well-known TeX-like formats?
true
I think you are wanting to know about IniTeX and the plain format, mainly. The TeX binary knows roughly 300 primitives: things which are actually defined in the binary. This includes some you probably know (such as `\let` or `\def`) and others you probably don't (such as `\output`). An easy way to see if something is a primitive is to `\show` it: you'll just get the name again. ``` > \let=\let. l.1 \show\let ``` If you start TeX in IniTeX mode (`tex -ini`), that is all you get. The problem is that this is not very useful. There are no fonts loaded, there is no output routine (so you get a 'fallback' dump of `\box255`), and so on. The primitives are all you need to build a working typesetting system, but there is 'some assembly required'. What IniTeX is good for is creating a format: you can only dump TeX's memory into a format when in IniTeX mode. So this is what is used 'behind the scenes' by TeX distributions to produce the LaTeX format, the plain TeX format (see below) and so on. This brings us to the plain TeX format, which is often referred to simply as 'plain'. This is a minimal set of macros, *etc*., that Knuth wrote to make the TeX typesetting engine produce something usable. It doesn't provide very much, but there is a lot more than just the 300-ish iniTeX primitives. For example, there is an output routine, so things actually print. Plain TeX defines a lot of useful basics, such as constants and methods to allocate variables. If you type `tex` at the terminal, you will be using this plain format (unless you specifically ask for IniTeX). LaTeX2e uses most of the plain format as a base, and so you will find a source file `l2plain.dtx` which copies much of plain TeX into LaTeX. There are some differences (for example, LaTeX's output routine is very different from plain TeX's). In that sense, plain TeX is a 'base'. If you look at the LaTeX3 work, things are rather different in implementation. However, the base requirements (set up variables, load fonts, do output, provide minimal macro support) remain the same. It's not really possible to drop parts of plain TeX and still do anything useful. Both the TeX engine itself and the plain TeX format are maintained by Knuth. There are no new features added to either of these by Knuth, but he does fix bugs. The later are *very* rare indeed, so if you think you've found one make *very* sure! One of the reasons for projects such as pdfTeX, XeTeX and LuaTeX is to add new features to the engine, something that will not happen with TeX itself. Of course, over time there have been other formats. Knuth's model (as seen with *The TeXbook*) was to have dedicated formats for dedicated purposes. Both LaTeX and ConTeXt have gone the other way: they are general formats that can be used for many things. Other specialised formats do exist (see CTAN for example), but these have never really caught on. It turns out to be easier to have more generalised formats (LaTeX, ConTeXt or indeed plain with custom macros) and choose which bits to use than to have many formats and have to pick which one to use.
22
https://tex.stackexchange.com/users/73
416
285
https://tex.stackexchange.com/questions/352
19
{} and [] do some kind of grouping, and comma seems to be special as well. Being a programmer I find it frustrating to use Latex on incantation-only basis. I would like to know how does it exactly work. What is exactly the syntax of TeX/LaTeX? How is it parsed? Does Latex introduces new commands only or changes the syntax as well? Or maybe changing syntax locally is a inherent feature of Tex?
https://tex.stackexchange.com/users/69
Syntax of TeX/LaTeX
false
I would recommend reading The TeXbook, by Donald Knuth, at least for two reasons: 1. It is a big pleasure to read. Knuth's writing style is very clear and explanatory. Not to mention he is the author of TeX. 2. It has a excellent chapter which is almost literally the answer to your question: ``Chapter 7. How TeX Reads What You Type.'' I consider this book to be the best writing about the TeX low-level features.
12
https://tex.stackexchange.com/users/199
418
286
https://tex.stackexchange.com/questions/417
57
I have a BibTeX database with some big number of references which I use for work. When I need to send a document prepared using that database to somone I have two options: either send a full copy of the database (which I would not like to do), or copy all referenced entries from a large database to a smaller copy, and send that copy with a document. Are there any tools which would do this automatically?
https://tex.stackexchange.com/users/199
How to split all BibTeX referenced entries from a big BibTeX database to a copy?
false
A reference manager such as [JabRef](http://jabref.sourceforge.net/) will allow you to save selected entries from your entire .bib database to a new, smaller .bib file. JabRef also allows you to export to many other formats, such as XML, HTML, EndNote, and Harvard RTF.
17
https://tex.stackexchange.com/users/32
423
287
https://tex.stackexchange.com/questions/417
57
I have a BibTeX database with some big number of references which I use for work. When I need to send a document prepared using that database to somone I have two options: either send a full copy of the database (which I would not like to do), or copy all referenced entries from a large database to a smaller copy, and send that copy with a document. Are there any tools which would do this automatically?
https://tex.stackexchange.com/users/199
How to split all BibTeX referenced entries from a big BibTeX database to a copy?
true
[BibTool](http://www.ctan.org/tex-archive/biblio/bibtex/utils/bibtool/) is a command-line tool which allows you to perform various manipulations on `.bib` files, including extracting all of the entries which are mentioned in a given `.aux` file.
34
https://tex.stackexchange.com/users/96
424
288
https://tex.stackexchange.com/questions/417
57
I have a BibTeX database with some big number of references which I use for work. When I need to send a document prepared using that database to somone I have two options: either send a full copy of the database (which I would not like to do), or copy all referenced entries from a large database to a smaller copy, and send that copy with a document. Are there any tools which would do this automatically?
https://tex.stackexchange.com/users/199
How to split all BibTeX referenced entries from a big BibTeX database to a copy?
false
Or again [Mendeley](http://www.mendeley.com) -- with it you could even have a shared collection which will stay in sync.
1
https://tex.stackexchange.com/users/nan
425
289
https://tex.stackexchange.com/questions/417
57
I have a BibTeX database with some big number of references which I use for work. When I need to send a document prepared using that database to somone I have two options: either send a full copy of the database (which I would not like to do), or copy all referenced entries from a large database to a smaller copy, and send that copy with a document. Are there any tools which would do this automatically?
https://tex.stackexchange.com/users/199
How to split all BibTeX referenced entries from a big BibTeX database to a copy?
false
I use a shell script called [`bibexport`](http://www.ctan.org/tex-archive/biblio/bibtex/utils/bibexport/) ``` bibexport: a tool to extract BibTeX entries out of .bib files. usage: .../bibexport [-h|v] [-n] [-b bst] [-a [-e file]...] [-o file] file... -a, --all export the entire .bib files -b, --bst specifies the .bst style file [default: export.bst] -e, --extra extra .bib files to be used (for crossrefs) -c, --crossref include entries that are crossref'd [default: yes] -n, --no-crossref don't include crossref'd entries [default: no] -o file write output to file [default: bibexport.bib] -h, --help print this message and exit -v, --version print version number and exit ```
7
https://tex.stackexchange.com/users/18
426
290
https://tex.stackexchange.com/questions/167
28
Every now and then I use the description list environment ``` \begin{description} \item[foo] foo is good \item[bar] bar is bad \end{description} ``` to create lists with non-numerical labels. Unfortunately the description list does not support the label-reference pair as normal latex: i.e. if I write ``` \begin{description} \item[foo] \label{foo} foo is good .... \end{description} .... For good things (see, for example \ref{foo})... ``` the reference does not point to the item in the list. Instead it points to the closest environment that supports labeling (usually the subsection). So instead of showing the text foo (in boldface), it shows something like 2.2.1 (the subsection corresponding to where the description environment is sitting). My question: is there a way or a package which allows references to description list items? My current work-around is to just type the text myself in the spot (since I named it myself, and it is not numbered, the formatting is unlikely to change the label =). But one of the good things about the label/reference pairs in latex is the implementation in pdflatex that allows in PDF hyperlinks between references and the objects referred to, this I cannot replicate myself. **Edit**: let me rephrase my question. The primary goal is *not* to display `\ref` to something other than what LaTeX thinks the `\label` is. There are many ways to deal with it, some of which outlined in Michael Underwood's helpful answer below. What I am looking at is whether there exists an implementation of a list environment which is like the built-in `description` environment in that the displayed "title" for the list item is completely customized, while having support for `\label`s. (The built-in `description` environment does not support `\label`s, whereas the built-in `enumerate` environment does not support customized "title"s.) The `enumitem` package adds some customizability to the environments, but as far as I can tell it doesn't support exactly what I want.
https://tex.stackexchange.com/users/119
How to cross-reference items in description lists?
false
Okay, after Michael's second answer I had an idea which I want to just document here. Instead of using the `description` environment, it seems that another way is to abuse the `list` environment. The following snipplet is what can be done ``` \newcounter{foobarcounter} \renewcommand{\thefoobarcounter} {({\ifcase\value{foobarcounter}\or foo\or bar\else ehhh\fi\relax})} \begin{list}{\thefoobarcounter}{\usecounter{foobarcounter}} \item\label{foodesc} Foo is good \item Bar is bad \item This list was not supposed to be this long \end{list} ...... .. Something good, see \ref{foodesc}. ``` Comments are welcome.
3
https://tex.stackexchange.com/users/119
427
291
https://tex.stackexchange.com/questions/422
100
Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section. I'd like to include the statement of these theorems twice over, each time numbered as the theorem would naturally appear in its later section. My current solution (using amsthm) is, e.g. ``` %(in the introduction) \newtheorem*{thm:associativity}{Theorem \ref{thm:associativity}} \begin{thm:associativity} Lorem ipsum ... \end{thm:associativity} %(in a later section) \begin{thm} \label{thm:associativity} Lorem ipsum ... \end{thm} ``` > > Can anyone think of a cleaner solution? > > >
https://tex.stackexchange.com/users/77
How do I repeat a theorem number?
false
A somewhat "sketchy" solution: there's a package by Ulrich Diez called theomac.sty that's floating online but isn't on CTAN, and which I've used once before. The latest version I'm aware of contains the string "2007/06/18 v1.00beta4 Define macros from theorems" in it, and can be found, say, in the discussions [here](http://www.hilpers.com/1228348-equation-kopieren-referenzieren#3) or [here](http://cookp.com/thread/1500775/Equation%20kopieren%20referenzieren) (or an older version on [Google Groups](http://groups.google.com/group/comp.text.tex/msg/2a964c4489a8b5d5?hl=en) where you can download it). You use it somewhat as follows: ``` \usepackage{theomac} %To repeat theorems \newtheoremWithMacro{rtheorem}[theorem]{Theorem} ... \begin{rtheorem}[\foo] $1 + 1 = 2$ \end{rtheorem} ``` (Or any name instead of `rtheorem`.) Then you can write `\foo` anywhere you want the theorem to appear, without having to repeat the body.
2
https://tex.stackexchange.com/users/48
428
292
https://tex.stackexchange.com/questions/420
24
I've had occasion to typeset [extraordinarily large matrices](http://tqft.net/EH/matrices), which I didn't seriously expect anyone to expect in detail (without a computer) or print, but I needed it to be obvious that they were completely explicit and written down *somewhere*. By trial and error, I found a really large paper size that would compile (about 5.5m) in pdflatex and fit my matrices on a reasonable number of sheets. (I used the geometry package to choose custom page sizes.) But it would have been easier if I'd been able to find out: > > What are the limitations on paper sizes in pdflatex? > > >
https://tex.stackexchange.com/users/77
What's the absolute largest paper size permissible with pdflatex?
true
From the immensely useful [TeX by Topic](https://savannah.nongnu.org/projects/texbytopic): > > \maxdimen 16383.99999pt; the largest legal dimension. > > > and > > Internally TEX works with multiples of a smallest dimension: the scaled point. Dimensions larger > (in absolute value) than 2^30 − 1sp, which is about 5.75 metres or 18.9 feet, are illegal. > > > [Knuth delivered a beautiful extended dig at "modern" software development practices at the 2010 TUG meeting](http://river-valley.zeeba.tv/an-earthshaking-announcement/), during the early part of which he referred to the value of `\maxdimen`. I can't work out if he was serious when he suggested it had been a mistake to fix the largest dimension in TeX at this rather small value. --- Perhaps it is worth mentioning that as far as I know, pdflatex does not apply any more restrictive limits than TeX itself for this application. So the limitation that is relevant here is the internal TeX one.
23
https://tex.stackexchange.com/users/132
430
293
https://tex.stackexchange.com/questions/366
11
For my thesis my university has only a Word template with font sizes and "window" specifications to position title, name, date, etc. What is the easiest way to layout such thing, if I'm not an expert in creating custom classes and only a basic user of pstricks and tikz?
https://tex.stackexchange.com/users/137
How to painlessly create a custom layout for the title page for pdflatex?
true
While it has the disadvantage that it will likely look slightly different from the rest of your document, it does have the advantage that the title page will look like exactly like how the university expects it to be: include a PDF version you created with their Word template. This can be done with the [pdfpages](http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/) package: ``` \usepackage{pdfpages} \begin{document} \includepdf[pages=-]{titlepage.pdf} \end{document} ```
14
https://tex.stackexchange.com/users/193
432
294
https://tex.stackexchange.com/questions/431
6
By "bind more tightly" I refer to the order in which operations are carried out by default. Experimenting shows that if `\ab` is `ab` and `\cd` is `cd` then `\ab^\cd` is `ab^cd`. I would like it to be `{ab}^{cd}`. Of course, I can do this by defining `\ab` to `{ab}` and `\cd` to `{cd}` but that's not always an acceptable solution; for example, if `\cd` is actually `c^d` then `\cd_2` is `c^d_2` but if `\cd` is `{c^d}` then `\cd_2` is `{c^d}_2`. Indeed, if `\cd` is `c^d` then with the current precedence, `\ab^\cd` produces a complaint about double superscripts but changing the precedence would make it `{ab}^{c^d}` which is fine. (NB I've tried to present the simplest case that I can; the actual macros that I'm using are considerably more complicated and introducing braces into these macros is much more problematic than in the simplistic case above. In particular, they are recursively defined and so introducing new braces at the outside actually introduces new braces at several inconvenient spots inside as well.)
https://tex.stackexchange.com/users/86
Can super/sub-scripts bind more tightly than macro expansion?
true
You can't change this behaviour directly, no. However, the `breqn` package makes `^` and `_` active characters that behave as macros that take arguments ‘like normal’, which then has the effect you're looking for. So if you're happy to load breqn, that should fix your problem: ``` \documentclass{article} \usepackage{amsmath,breqn} \begin{document} \def\ab{ab}\def\cd{cd} $\ab^\cd$ \end{document} ```
5
https://tex.stackexchange.com/users/179
434
295
https://tex.stackexchange.com/questions/371
27
This is a counterpart to ["How can I typeset an exam or assignment paper in LaTeX?"](https://tex.stackexchange.com/questions/286/how-can-i-typeset-an-exam-or-assignment-paper-in-latex), which was from a teacher looking for a template to compose assignments and exams. I'm a student, and I'd like to submit PDFs or printouts composed in LaTeX in response to assignments submitted as Word documents. As a math and engineering student, I regularly receive emailed or uploaded assignments with .doc (and now .docx) attachments, which generally contain a numbered list of questions (often with parts A, B, C, etc.) to answer. Styles or other advanced Word structuring tools are rarely used. These assignments also frequently contain equations, tables, and images or Microsoft drawing objects (Usually circuits, graphs, or timing diagrams). I don't really mind copying the images over, or, if they're simple, drawing them myself (as I'll likely have to make changes to it in my answer anyways). However, on a long math assignment, the equations get tedious, and a little error in copying is a big problem. From the [tug.org converter page,](http://tug.org/utilities/texconv/pctotex.html) I see winw2ltx, Word2TeX and Word-To-LaTeX (These utilities have such clever names...) which have some support for equation transformation. One thing which isn't clear from the documentation is whether the MathType extension to Word must be used to create the equation, or whether it can simply convert an Equation Editor or .docx equation to LaTeX if it's installed on my computer. The holy grail of answers to this question would be a utility which: * Recognizes MS Word numbered lists and outlines (I, 1, a, i, etc.). * Is faster than copy-pasting the text of each question into, say, the exam document class, writing the equations, and drawing the diagrams. This is what I do right now. Not too bad, but it adds half an hour to every assignment. * Makes better looking documents than the original Word document. I'd like to do a little evangelism here. * Includes support for equations, tables, and images. * Can import both .doc and .docx files. Saving the .docx as a .doc is not acceptable, as it renders the equations as bitmaps. Saving the .doc as .docx might be acceptable. I don't really need it to structure the document; if it just sticks some selected text into a section of my LaTeX document, that would be plenty.
https://tex.stackexchange.com/users/186
How can I import an exam or assignment from Word into LaTeX?
false
I recommend [docx2tex](http://docx2tex.codeplex.com/). Against your criteria: * Recognizes MS Word numbered lists and outlines (I, 1, a, i, etc.). + Yes, although it doesn't try to keep enum types; * Is faster than copy-pasting the text of each question into, say, the exam document class, writing the equations, and drawing the diagrams. This is what I do right now. Not too bad, but it adds half an hour to every assignment. + It is automatic, provided it recognises all of your OOXML markup (it doesn't handle everything). * Makes better looking documents than the original Word document. I'd like to do a little evangelism here. + It gives pretty easy-to-read, vanilla Latex. I don't call that beautiful, but it's easier to beautify than Word. * Includes support for equations, tables, and images. + Yes. It converts included images to .eps files; I'm not sure what quality that gives you with included SVG files. * Can import both .doc and .docx files. Saving the .docx as a .doc is not acceptable, as it renders the equations as bitmaps. Saving the .doc as .docx might be acceptable. + Only docx files. Provided you have Word 2007 or later, this shouldn't be a problem. Issues: It's abandonware, not updated since November 2008. It only supports the DVI toolchain. It's native to Windows, being a C#/.NET3 based technology, and works very well there; away from Windows, it supposedly it works with Mono, although the last time I tried, about 18 months ago, it did not work. It's docx/OOXML-only technology. although since conversion of RTF/.doc to .docx is very well-behaved, this should not be a problem. [The TUG 2008 talk](http://river-valley.zeeba.tv/docx2tex-word2007-to-tex/) announcing the technology was recorded by River Valley TV.
15
https://tex.stackexchange.com/users/175
435
296
https://tex.stackexchange.com/questions/161
111
I use revision control (Subversion, to be exact) to keep track of the edits to my LaTeX documents. Is there a LaTeX package that interfaces with revision control? Specifically, it would be nice to see the revision number and time and date inside the document. (Obviously, I'd turn this off in the final version.) Also, it might be nice to get a PDF showing what was added and removed in a given revision.
https://tex.stackexchange.com/users/52
LaTeX packages for use with revision control
false
Keyword substitution is frowned on by revision control purists and is not facilitated in some modern systems such as [Git](https://git.wiki.kernel.org/index.php/GitFaq#Does_git_have_keyword_expansion.3F) and [Darcs](http://wiki.darcs.net/Ideas/CVSKeywords). Solution recommended to me is to have a script generate the information and then write it to a file. Then add the information from file using `\input`.
9
https://tex.stackexchange.com/users/185
436
297
https://tex.stackexchange.com/questions/433
36
I need to place an icon and text behind each other on one line. The icon is higher than a single text line, and would like to have the icon and text center aligned. How do I do that?
https://tex.stackexchange.com/users/193
Vertically center text and image in one line
true
The only way I found to do this robustly (well, Scott showed me this...) is to put the figure in a math matrix: ``` \documentclass{article} \usepackage{graphics} \begin{document} hello here is $ \begin{array}{l} \includegraphics{icon} \end{array} $ my line. \end{document} ``` resulting in
27
https://tex.stackexchange.com/users/117
440
298
https://tex.stackexchange.com/questions/439
14
I want to have drafting information appear on each page of document. I have seen something similar in the Kluwer document class where it defines `\@oddfoot` and `\@evenfoot` for a lot of possibilities. Is there an easier way than this? Is there a way to do it without overwriting existing headers?
https://tex.stackexchange.com/users/185
How to "stamp" the same text on each page of a document
false
You can use the package `fancyhdr` to simplify the creation and modification of page styles. However, doing it manually isn’t that hard either. It basically boils down to redefining the `\ps@plain` command, so that this redefines `\@oddfoot` and `\@evenfoot`: ``` % Define a nice example stamp. \newcommand\myoverlay{ % Taken from the TikZ documentation. % NB: This requires \usepackage{tikz}! \begin{tikzpicture}[remember picture,overlay] \node [rotate=60,scale=10,text opacity=0.2] at (current page.center) {Example}; \end{tikzpicture} } % Save the old definition: \let\old@ps@plain\ps@plain \renewcommand\ps@plain{ % First, load the old definition: \old@ps@plain % Now, save the previously (by \@old@ps@plain) defined footers: \let\old@oddfoot\@oddfoot \let\old@evenfoot\@evenfoot % Actual redefinition of the footer to include the overlay stamp. \gdef\@oddfoot{ \old@oddfoot \myoverlay } \gdef\@evenfoot{ \old@evenfoot \myoverlay } } ``` Now tested, it works. But notice that it *only* works on pages whose page style is actually `plain`. Some pages – e.g. `\part` title pages – automatically define their page to have some other page style. This can of course be addressed by redefining those page styles as well. But I guess that using `fancyvrb` or the packages mentioned by Charles save a bit of work.
7
https://tex.stackexchange.com/users/42
441
299
https://tex.stackexchange.com/questions/438
4
Why doesn't the following code work? From [a failed, now fixed, SO answer](https://stackoverflow.com/questions/3282319/correct-way-to-define-macros-etc-ie-in-latex/3285603#3285603) of mine: ``` \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \newcommand\latinabbrev[1]{ \peek_meaning:NTF . {% Same as \@ifnextchar #1\@} { \peek_charcode:NTF a {% Check whether next char has same catcode as \'a, i.e., is a letter #1.\@ } {#1.\@}}} \ExplSyntaxOff %Omit final dot from each def. \def\cf{\latinabbrev{cf}} \begin{document} Knuth, \cf The TeXbook. \end{document} ``` This code should check the next character to see if it is a dot (so the code shouldn't insert another dot, and it should space the coming dot as if it at the end of a sentence), or catcode 10 (then it should insert a dot and a space), or something else (then it should insert a dot). Although the other two branches seem to work, the `\peek_charcode:NTF` never seems to take its true branch, e.g., in the `\cf T` case. Why not?
https://tex.stackexchange.com/users/175
How to test whether next token on input stream is catcode 10
true
I think you want `\peek_catcode:NTF` here: ``` \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \newcommand \latinabbrev [1] { \peek_meaning:NTF . { #1 \@ } { \peek_catcode:NTF a { #1 . \@ ~ } { #1 . \@ } } } \ExplSyntaxOff %Omit final dot from each def. \def\cf{\latinabbrev{cf}} \begin{document} Knuth, \cf The TeXbook. \end{document} ``` `peek_charcode:NTF` checks for character code, in your case looking for a letter 'a'. Remember that TeX will ignore spaces after `\cf`, you you can never see a space here!
9
https://tex.stackexchange.com/users/73
442
300
https://tex.stackexchange.com/questions/422
100
Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section. I'd like to include the statement of these theorems twice over, each time numbered as the theorem would naturally appear in its later section. My current solution (using amsthm) is, e.g. ``` %(in the introduction) \newtheorem*{thm:associativity}{Theorem \ref{thm:associativity}} \begin{thm:associativity} Lorem ipsum ... \end{thm:associativity} %(in a later section) \begin{thm} \label{thm:associativity} Lorem ipsum ... \end{thm} ``` > > Can anyone think of a cleaner solution? > > >
https://tex.stackexchange.com/users/77
How do I repeat a theorem number?
true
If you want to allow yourself to vary the text between the two occurrences, here's an alternative: ``` \documentclass{article} \usepackage{amsthm} \makeatletter \newtheorem*{rep@theorem}{\rep@title} \newcommand{\newreptheorem}[2]{% \newenvironment{rep#1}[1]{% \def\rep@title{#2 \ref{##1}}% \begin{rep@theorem}}% {\end{rep@theorem}}} \makeatother \newtheorem{theorem}{Theorem} \newreptheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newreptheorem{lemma}{Lemma} \begin{document} \begin{reptheorem}{myAmazingTheorem} That theorem again \end{reptheorem} \begin{theorem} \label{myAmazingTheorem} A theorem \end{theorem} \begin{lemma} \label{anInsignificantLemma} A lemma \end{lemma} \begin{replemma}{anInsignificantLemma} That theorem again \end{replemma} \end{document} ``` Probably needs a little tweaking to suit different theorem styles and the like.
46
https://tex.stackexchange.com/users/86
443
301
https://tex.stackexchange.com/questions/335
17
For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, `e` is in roman font, and so forth. At the moment, I do this by defining new macros for each symbol, so a typical line reads something like this: ``` Define \(\tyz^\tyw \coloneqq \tye^{\tyw \ty\ln(\tyz)}\) ``` I'd really like to be able to just type ``` Define \(z^w \coloneqq e^{w \ln(z)}\) ``` To do this, I'd need to be able to tell TeX that the maths symbol for, say, 'e' was not 'e' but actually 'e' in roman font and with a particular colour. Does anyone have any ideas on how to do this?
https://tex.stackexchange.com/users/86
Can I change the font and colour of a letter permanently?
false
This is wild speculation, but you could define a new math environment which first scans the tokens in the input replacing some predefined set of symbols with their corresponding "colored" versions and leaving everything else the same. Finally, you do let LaTeX evaluate the resulting list of tokens. Still, I'm not sure how many things would be broken by this. And diving inside of `{}` will also probably be tricky. Really have no clue about this, but maybe this is the kind of things you could do with LuaTeX?
1
https://tex.stackexchange.com/users/169
444
302
https://tex.stackexchange.com/questions/439
14
I want to have drafting information appear on each page of document. I have seen something similar in the Kluwer document class where it defines `\@oddfoot` and `\@evenfoot` for a lot of possibilities. Is there an easier way than this? Is there a way to do it without overwriting existing headers?
https://tex.stackexchange.com/users/185
How to "stamp" the same text on each page of a document
true
You can use [the everypage module](http://www.ctan.org/tex-archive/macros/latex/contrib/everypage/) to execute Latex code just before each page is shipped. You can use PS specials to put in things like watermarks in the page (cf. the watermark package in [the ncctools bundle](http://www.tex.ac.uk/ctan/macros/latex/contrib/ncctools/), which I belive uses this technique), or overlay graphics on the page using PS drawing packages.
14
https://tex.stackexchange.com/users/175
445
303
https://tex.stackexchange.com/questions/366
11
For my thesis my university has only a Word template with font sizes and "window" specifications to position title, name, date, etc. What is the easiest way to layout such thing, if I'm not an expert in creating custom classes and only a basic user of pstricks and tikz?
https://tex.stackexchange.com/users/137
How to painlessly create a custom layout for the title page for pdflatex?
false
The `textpos` package makes the absolute positioning of "text boxes" fairly easy. I have used it to prepare flyers, posters, etc.
3
https://tex.stackexchange.com/users/100
446
304
https://tex.stackexchange.com/questions/449
15
I know how to change the colour of a section name using for example ``` \section{\color{Red} Foobar} ``` but that still leaves the section number in black. Is there any way to change the colour of the numbers of the sections, subsections, etc?
https://tex.stackexchange.com/users/14
How can I change the colour of my document's section numbering?
true
I'm sure there is some package that does this, but the simplest way is to redefine the `\thesection` command: ``` \renewcommand\thesection{\color{red}\arabic{section}} ``` or if you also want the chapter number: ``` \renewcommand\thesection{\color{red}\thechapter.\arabic{section}} ``` Similar commands work for `\thechapter`, `\thesubsection`, etc. EDIT: A maybe unintended side effect of this is that it also color every reference to the section. To just change it in the section header you can use ``` \makeatletter \renewcommand\@seccntformat[1]{\color{red} {\csname the#1\endcsname}\hspace{0.5em}} \makeatother ``` In any case you might want to have a look at section 2.2 of the LaTeX Companion and the `titlesec` package.
22
https://tex.stackexchange.com/users/83
450
306
https://tex.stackexchange.com/questions/371
27
This is a counterpart to ["How can I typeset an exam or assignment paper in LaTeX?"](https://tex.stackexchange.com/questions/286/how-can-i-typeset-an-exam-or-assignment-paper-in-latex), which was from a teacher looking for a template to compose assignments and exams. I'm a student, and I'd like to submit PDFs or printouts composed in LaTeX in response to assignments submitted as Word documents. As a math and engineering student, I regularly receive emailed or uploaded assignments with .doc (and now .docx) attachments, which generally contain a numbered list of questions (often with parts A, B, C, etc.) to answer. Styles or other advanced Word structuring tools are rarely used. These assignments also frequently contain equations, tables, and images or Microsoft drawing objects (Usually circuits, graphs, or timing diagrams). I don't really mind copying the images over, or, if they're simple, drawing them myself (as I'll likely have to make changes to it in my answer anyways). However, on a long math assignment, the equations get tedious, and a little error in copying is a big problem. From the [tug.org converter page,](http://tug.org/utilities/texconv/pctotex.html) I see winw2ltx, Word2TeX and Word-To-LaTeX (These utilities have such clever names...) which have some support for equation transformation. One thing which isn't clear from the documentation is whether the MathType extension to Word must be used to create the equation, or whether it can simply convert an Equation Editor or .docx equation to LaTeX if it's installed on my computer. The holy grail of answers to this question would be a utility which: * Recognizes MS Word numbered lists and outlines (I, 1, a, i, etc.). * Is faster than copy-pasting the text of each question into, say, the exam document class, writing the equations, and drawing the diagrams. This is what I do right now. Not too bad, but it adds half an hour to every assignment. * Makes better looking documents than the original Word document. I'd like to do a little evangelism here. * Includes support for equations, tables, and images. * Can import both .doc and .docx files. Saving the .docx as a .doc is not acceptable, as it renders the equations as bitmaps. Saving the .doc as .docx might be acceptable. I don't really need it to structure the document; if it just sticks some selected text into a section of my LaTeX document, that would be plenty.
https://tex.stackexchange.com/users/186
How can I import an exam or assignment from Word into LaTeX?
true
I'm sorry I wont be able to provide any answer other than: *"Don't do it!"* Other than using some of the converters that you and other people have suggested, which may give you a reasonable place to start, there is really no satisfactory solution to convert an existing Word document into a LaTeX one. This is difficult to implement, and for a good reason. Word and LaTeX have two completely different approaches at describing and encoding documents. Word (as most people use it) stores formatting information while LaTeX encodes the "logical structure" of a document (which then gets translated to TeX formatting instructions while compiling). Trying to get a LaTeX document out of a Word document is somewhat similar to trying to obtain a C++ program from it's binary: You can do it, but the results wont be pretty. You are better off taking a printout of your assignments and typing the whole thing yourself in LaTeX. Of course you can copy/paste large bodies of text, but for equations there is nothing better than typing them yourself. If you do this for a while, and show your beautiful documents to your teachers and colleagues, you might be even able to convince them to switch to LaTeX all together. **LaTeX is not a format to *store* pretty documents, it is a fully-fledged system to *create* those documents.**
18
https://tex.stackexchange.com/users/169
454
308
https://tex.stackexchange.com/questions/452
93
I often create pictures in tikz that I want to either send to someone, or include in an email. The problem with that is that there is a big white space around and and especially below my pictures. To get around this, I usually print screen my figure and crop it to get the size I want. Another solution is to use beamer and then scaling to make the figure as big as the slide size. Those two solutions, though, are not all that good. What I would really like is a way to get the pdf file to be just as big as my picture, as if it was cropped from start. Is there a package to do that?
https://tex.stackexchange.com/users/14
How can I create a pdf document exactly as big as my tikz picture?
false
Make sure that there's nothing extra on the page (page numbers, for example, using `\thispagestyle{empty}`) and then use the command `pdfcrop` which is included in TeXLive. (It's a perl script). That's what I used to make this picture for [this answer](https://mathoverflow.net/questions/90/fn-2n-is-not-surjective) on MathOverflow: (source file: <http://www.math.ntnu.no/~stacey/myicons/2n_graph_small.tex>)
15
https://tex.stackexchange.com/users/86
455
309