0
votes
0answers
29 views

How to let latex only run one user defined command and save the ouput to a tax file [duplicate]

I want to let latex only run one of my defined commands and output results to a tax file. For example, the following tex file: \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} ...
3
votes
0answers
56 views

pdflatex: How to automatically quit on compile error?

See also this question on Reddit. I want to automate running pdflatex over and over with make and guard. However, when pdflatex encounters a syntax error, it hangs, preventing guard from being able ...
1
vote
1answer
37 views

Pre-compiling with a different syntax [closed]

I am looking for a pre-compiler to introduce a customized syntax into LaTeX. Hope that an example will be worth a thousand words: I would like to compile this \thm The sum $ 1+2+3 is equal to ...
3
votes
1answer
119 views

How to cross-reference several objects simultaneously

I want to define a macro for referencing equations in an article. I want the equation to be referenced as: " Eq. (3) " So I defined a command "\eref{}" as: \def\eref#1{Eq.~\ref{#1}} But I also have ...
2
votes
0answers
81 views

Is there a way to partially evaluate TeX files? [duplicate]

I am looking for tools or techniques that can partially evaluate (e.g. inline definitions) a TeX source file into an equivalent, simplified TeX file with some parameters fixed. Specifically I would ...
0
votes
0answers
76 views

compilation problem related to solution to “output multiple pdf files” : PLEASE HELP [duplicate]

Can someone please explain to me how to make the example sample solution, work with some actual text content? In particular, exact steps of compilation under a Unix environment... and a sample input ...
2
votes
1answer
2k views

Compilation fails with “! Missing \endcsname inserted.”

Hi I've got a strange problem. I've defined a new command to print Linux commands line in the document: \documentclass[12pt,a4paper]{article} \usepackage{listings} \newcommand{\shellcmd}[1] { ...
2
votes
2answers
112 views

Ignore some self-defined command during compilation?

In a .tex file, there is some self defined command \newcommand{\mycomment}[1]{\textcolor{red}{#1}} ... \mycomment{blah blah} ... I hope to be able to skip the command during compilation in my final ...
25
votes
2answers
583 views

Programming TeX macros so that they output instructions to rerun the compilation

This question is motivated by the behavior of the tikzmark macro created by Andrew Stacey, and a recent discussion with David Carlisle on chat. I have noticed that LaTeX code using tikzmark typically ...
16
votes
3answers
317 views

Print 'system information' in LaTeX doc

I've used TeX quite a bit before but am getting back into it at the moment. I want to print a document details page with info such as: Compiled on: Compiled by: OS version: LaTeX version: ...
6
votes
1answer
163 views

Arbitrary text parsing from a separate file

I'm still very new to the world of TeX, so please bear with me if this question is unclear or has been asked before. I'm starting to figure my way through TeX and the millions of plugins and ...
2
votes
0answers
126 views

make flashmode work [closed]

I am not sure whether this is an appropriate question for tex.SE. Anyway: I am trying to use Flashmode, which I discovered reading the answers to this question. Unfortunately I am not able to make it ...
27
votes
7answers
5k views

Conditional typesetting / build

Let's say I have .tex file which is a set of problems and solutions, of which I want to make two pdf files, one which includes the solutions and one which doesn't. so I need to build the .tex file ...
1
vote
1answer
259 views

Passing listing-environment as option to command [duplicate]

I have a simple command which takes one argument. Now I want to pass a small listing-environment to the command. Here is the code: \documentclass{article} \usepackage{listings} \begin{document} ...
16
votes
3answers
3k views

Is there any way to generate custom errors/warnings in LaTeX?

I want something like \ifmmode\else\GenerateWarning{The command \backslash uzuka is supported only in math mode.}\fi, which is supposed to generate a warning "The command \uzuka is supported only in ...