2
votes
2answers
87 views

Read part and page count from auxiliary file

My main document is included into another that rearranges and adds crop marks to it. For universalizing my script I need to extract the page and part count out of the .toc- or .aux-file. These are ...
6
votes
1answer
158 views

Can I define a variable that contains a URL (youtube) and call \includemedia with it?

I can successfully embed a video in my latex file using a syntax like this: \documentclass[10pt,letterpaper]{book} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ...
4
votes
1answer
235 views

Command to insert filename in caption of a listing

I would like to have a command to insert listings that contain the filename in the caption. This works well as long as there is no "_" etc. in the filename. I also tried the suggestion from a ...
14
votes
1answer
224 views

Poor man's “namespaces”

I have searched for "namespaces", but all of these posts seem to ask for something way more advanced. The problem I encounter can be solved by renaming everything, but that does not seem "right". ...
1
vote
1answer
261 views

How to strip curly-braces from variable before using it as a filename?

I'm trying to use a variable to pass a filename to \includegraphics. I'm having trouble because my filename is built up from other variables. This leaves an empty curly-brace inside the filename. The ...
5
votes
2answers
174 views

Latex3 input/output and expansion of macros

I have a package that formats a course outline and have a macro that reads a formatted user file and turns it into a section. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \tl_new:N ...
1
vote
2answers
514 views

How to disable package used by external document?

Doxygen uses its own doxygen.sty style file, but I'd like to keep the style of my document where I want to put the Doxygen's output. So I'd prefer to somehow to turn of its settings. For example, ...
8
votes
4answers
262 views

Having multiple commands with underscores and numbers that start with same text

Recently me and some friends really got into "making everything compilable". More specifically, we need to do a lot of matlab calculations, and then we need to put the results into a tex document. ...
2
votes
2answers
957 views

input filename as caption in listing

I'm working on the following piece of code \newcommand{\mycin}[1]{% new command for icluding piece of code from external files \lstinputlisting{#1} } I want to add a caption that reflects the ...
9
votes
1answer
161 views

How to read from an external dictionary in LaTeX?

I'm wondering how to define a LaTeX command \x that prints "def1" when I write \x{name1}, reading from an external (dictionary) file having a structure like {name1}{def1} {name2}{def2} etc.
4
votes
1answer
714 views

Tikz externalize + macro's ? Or how would you do it?

I'm currently building courses for some of my college teachers. The aim is to make their Word/MS paint generated study material into high grade Latex/Tikz material. I'm aiming for high consistency in ...
12
votes
1answer
574 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 ...