5
votes
2answers
67 views

How to make a wrapper for \input

I would like to make a wrapper for \input to include TikZ figures. I have tried something like this: \newcommand{\inputtikz}[1]{% \tikzsetnextfilename{#1} \input{figures/{#1}.tikz} } but with this ...
5
votes
1answer
42 views

How to include files from a directory specified by a concatenation of text and a macro?

This is almost certainly a silly mistake somewhere. I'm essentially trying to do what is being done here. My MWE project: $ find ./ ./ ./common ./common/preambleCommon.tex ./mydoc ./mydoc/mydoc.tex ...
1
vote
0answers
29 views

replacing macros parameters by its definition [duplicate]

Usually, I use many macros in my documents to save time. I am searching for clever "ideas, methods, tools" which can replace macros by its definition. For example, if we have a the following document ...
7
votes
1answer
159 views

Automatically convert \left to \Bigl

I have a LaTeX file, which includes tons of other auto-generated LaTeX files containing TikZ figures. Suppose I want to make every \left( in the TikZ figure appear at the same, fixed size, say \Bigl(. ...
4
votes
1answer
67 views

Hook into \input (or any underlying command) in order to allow transparent preprocessing

Which command would be most suitable to be hooked in order to preprocess input before it is passed to TeX? Input file: \begin{document} \input{a} \end{document} Seen by TeX (after a file ...
8
votes
4answers
223 views

Checking for a matching entry within a file

I have a file containing a list, like this: apple orange pear pineapple How can I create a macro which checks if an item is on that list. E.g.: \isfruit{pear} returns "1". \isfruit{carrot} ...
1
vote
1answer
212 views

Adding new parameter in lyx

In texmaker, I create document_setting.tex for input some document attribution like the author, publisher, some attribution in acknowledgements. And then input document_setting in master document ...
2
votes
1answer
1k views

Is there a way to get TexMakerX to recognize commands defined in an input file?

I have a file that defines a bunch of commands for various variables that I use in other documents. Here's a small example of what it contains: \newcommand{\varElevation}{\ensuremath{\alpha_{el}}} ...
12
votes
1answer
569 views

How do I create a macro which reads the content of a file when the macro is defined?

I am trying to do something like: \newcommand{\sometext}{\input{somefile.txt}} This works, but requires inputting the file every time the macro is used in the document. I would like to know a way ...
9
votes
3answers
272 views

Make newlines expand to custom command

I am making a guest list which I will print on a sticker sheet, cut them out, then stick them to envelopes. This means that each guest/guest group will have a bounding box drawn around it as a cutting ...
6
votes
3answers
277 views

Avoid inputting a file multiple times

I have a revision string automatically saved to a file VERSION (it is the output of git describe and usually looks like v2.2-19-g0a51c27), and define a command ...