{preamble} is everything before \begin{document} in a LaTeX document. It contains commands loading packages, definitions, and usually most style settings for a document.

learn more… | top users | synonyms

1
vote
0answers
29 views

Package Standalone Warning : Sub-preamble of file “myfile.tex” has changed. Content will be ignored. Please rerun latex

I am writing my resume on LaTeX, and I wanted to put a pie chart. I designed the pie chart on a standalone.tex and I wanted to bring it on the main using \input, but I have this message IN the ...
1
vote
0answers
33 views

Bolded digits in preamble

I compare two documents. Why in the first I have 2 bolded ?
5
votes
2answers
125 views

Tikz fill color

At the moment I'm using this command in the preamble to fill the color of the specified row with grey: row 2/.style={ nodes={fill=gray!10} } Unfortunately I have to write this ...
1
vote
0answers
46 views

Hyperref and description environment

I am trying to put an hyperref command inside an item name in the description environment. The following MWE works as expected (this is what I am trying to achieve!): \documentclass{article} \...
6
votes
1answer
68 views

suppress single macro from style file

I have a master style file of macros, which I use for all of my documents. Is there something I can add to the preamble of a particular file so that it ignores some specific macro from my style file? ...
2
votes
1answer
67 views

How do you efficiently make your preamble in LaTeX?

I use Atom frequently but used to use TeXWorks to write my LaTeX documents. In TeXWorks managing templates was relatively nice and easy and kept me from having to write out the preamble (i.e. ...
0
votes
0answers
28 views

conflicting packages -

I need help figuring out which packages are conflicting in my document. I get the error message at the lines 35 and 44: \T already defined' and \U already defined' My preamble includes: \...
4
votes
2answers
86 views

Conflict when using \newcommand

I've just realized that I made a big mistake sometime ago when in my preamble I defined the new command \renewcommand{\v}{\mathbf{v}} Now, I'd like to type the czech s using \v{s}, but I can't. ...
0
votes
1answer
50 views

Installing feynmp / feynmf to TexMaker

What packages do I need to download and what I need to have in my preamble in order to use feynmp and feynmf in texmaker?
2
votes
2answers
46 views

Conditional preamble and pstricks problem \psTilt and \PstLightThreeDText

Look at the following MWE. \PassOptionsToPackage{export}{adjustbox} \documentclass{article} \usepackage{fancyvrb} \usepackage{graphicx} \usepackage{adjustbox} \newcounter{psextern} \makeatletter \...
2
votes
1answer
38 views

Getting user defined constants into the preamble

I think this is a problem of expandable content, a concept I haven't quite got the hang of yet... Lets say I have a preamble or cls file that is trying to configure hyperref. If I have manually setup ...
0
votes
0answers
18 views

changing cross-references' names in LyX 2.1.0

Salut. I am writing an article in LyX 2.1.0 in a language other than English. How do I change the cross-references' names, eg. from "Figure 1" or "equation 1" to "xxx 1" and "yyy 1" ? I have been ...
0
votes
0answers
22 views

Prevent line breaks after specific words in general

I am sorry if this is duplicate but I couldn't find it... or, more specifically, I've found something even more general, but I didn't understand a word from it :D Prevent line-breaking after short ...
3
votes
1answer
53 views

Making a long macro/shortcut in Latex

I was wondering if it was possible to make a big macro, for inserting figures? I wanted it to contain: \begin{figure} [H] \centering \includegraphics[scale=0.8]{#FILENAME} \caption{#FIGURECAPTION \...
1
vote
2answers
54 views

Externalizing tikz with precompiled preamble

This is a very special case, I guess, but it's what I need: %&Testing \documentclass{article} \endofdump \usepackage{pgfplots} \usetikzlibrary{external} \tikzexternalize \begin{document} \...
3
votes
2answers
94 views

Number of pages in preamble

I have tried this to use the number of pages as an option to a package: \documentclass{article} \usepackage{lipsum} \usepackage{lastpage} \usepackage{refcount} \newcounter{mylastpage} \...
2
votes
1answer
48 views

permanent preamble in bibdesk-texshop

I use TexShop as my bib file generator and manage it with Bibdesk (I have a mac). How do I add a command to the preamble of the bib file which will always stay there even when I update my references ...
0
votes
1answer
37 views

LaTeX not hyphenating with current preamble

I have the following code generated, with my preamble here, and here's just some of the text in it. Below the code I'll show a screenshot of how it looks once compiled. %Setup og layout pakker \...
0
votes
0answers
35 views

when does the order of packages in a preamble matter? [duplicate]

I am writing my first very long document (thesis) and decided to try to keep things super organized to avoid future headaches. One thing I decided to do is to categorize the things in my preamble, ...
0
votes
0answers
38 views

Problem with a table in the header of document - LyX

I am trying to put a table as header of every page of my document. This is the cose I put in the Latex preamble setting of LyX: \usepackage{eso-pic} \AddToShipoutPicture{% \AtPageUpperLeft{% \...
1
vote
0answers
41 views

Personalize document headerwith a table - Lyx

I am trying to put a table as header of every page of my document. This is the cose I put in the Latex preamble setting of LyX: \usepackage{eso-pic} \AddToShipoutPicture{% \AtPageUpperLeft{% \...
2
votes
1answer
49 views

How to change the arrows tips for the whole document?

After I asked this question: What is "\SelectTips{a}{b}" (and how to increase the head of an arrow's head?) I'd like to know one more thing: I want to change it (the arrow tips) for the ...
34
votes
4answers
963 views

Creating a default preamble

Since I am using (almost) the same set up for my tex documents, I wonder if there is a way to create a preamble with my default packages and to recall it anytime I want to create a tex document. If ...
1
vote
0answers
53 views

Invalid Latex preamble (in lyx)? [closed]

I'm running into an error while trying to preview my document created in lyx: after adding the language setting as described here. My preamble is as follows:
1
vote
0answers
46 views

Compilation Emergency Error due to preamble (ShareLatex)

I'm fairly new to Sharelatex but I've made a fourth semester project in it before but this time the preamble seems to not be working at all even though I copied the exact sources from my fourth ...
7
votes
2answers
484 views

Is it possible to write `\left(` `\right)` in one command?

\documentclass{amsart} \DeclarePairedDelimiter{\pr}{\left(}{\right)} \begin{document} $\pr{x,y}$ \end{document} I found the commands \left( \right) quite flexible and hence useful; but I am not ...
2
votes
0answers
117 views

What hyperref options should be used for correct Unicode output?

I am trying to work out which hyperref options allow all Unicode characters to display properly, and whether XeLaTeX, LuaLaTeX, and pdfLaTeX have different configuration requirements. The hyperref ...
0
votes
0answers
43 views

Packages canceling each other? (Font-Changing problems)

I'm fairly new to Latex, and recently I started to compile my files with XeLaTeX (because I learned that would be helpful since sometimes I need to type some texts in Japanese), but recently I caught ...
2
votes
1answer
70 views

.sty file in preamble

Suppose I have the following code: %! xelatex \documentclass{report} \usepackage{fontspec} \usepackage{xltxtra,xgreek} \setmainfont{Times New Roman} \usepackage{definitions} %\newtheorem{prop}{...
1
vote
1answer
59 views

Defining glossary entries on the fly?

I am using glossaries package and Xindy to generate glossaries in Persian. Do I have to separately define the words to be included in the glossary? I tried to define a command that defines the entry ...
3
votes
2answers
161 views

How to define letter-spacing of a custom environment?

Say I have: %defines a vertical bridge hand with seat name \newcommand{\hand}[5]{ \begin{minipage}[t]{1.0cm} \begin{tabbing} \textsc{#1} \= \\ \s\Hair\=#2 \\ \h \> #3 \\ \d \> #4 \\ \c \> #5 ...
1
vote
1answer
56 views

Using custom commands in preamble

I have a the following command in a resume.cls file \newcommand{\name}[1][]{\newcommand{\@name}{#1}} I try to use it in my tex file with \documentclass{resume} \name{My Name} % use \@name in ...
3
votes
2answers
377 views

If, elseif and else conditionals in the preamble

I have a scenario where I need to define a few commands and environments based on some condition in the preamble. I used to use \newtoggle, set the conditional using \toggletrue or \togglefalse and ...
7
votes
0answers
116 views

How to precompile preamble when using arara

A different tex question led me to a link regarding a precompiled preamble. I use arara for all of my runs. What is the correct procedure to use a precompiled preamble for each of the runs made ...
0
votes
1answer
53 views

adding a lable to a newcommand in the preamble using mhchem and fancyref

I'm using [version=4]{mhchem} and fancyref as packages. In mchem's manual there is a code given for the preamble that allows easily to enumberate the chemical equations like the normal equations: \...
2
votes
0answers
36 views

\include'ing a remote file

I am creating a small header file for students that they need to include in the preamble of their document. The changes are minor enough to not need a class file. However, I do not want them to ...
2
votes
2answers
208 views

Writing the entire document as a command

When writing a document, I like to use the following format. %Settings for document %Packages I need \newcommand{\insertdocument}{ %Everything that would ordinarily be put between \begin{document} ...
4
votes
2answers
109 views

Abbreviating commands with shorter commands, launchable from the body

I have a pretty complicated command, lets call it "C" in the preamble a long document that changes how the document looks. If I'm writing text somewhere in the middle of the document, I'd like to ...
4
votes
1answer
45 views

Preamble works in .tex file but not in .sty file

I have a question concerning .sty files. I often use the same preamble in my latex documents and so I wanted to put it into a .sty file. I started with the first few lines, but it already does not ...
5
votes
1answer
115 views

is it possible to have too many things in preamble?

this might seem like dumb question, but .. I'm going to ask it anyway since I'm not an informatician I don't know quite how this works actually. I'm working on my Phd now and I already have ...
1
vote
1answer
796 views

Xetex - Font not found!

I'm a TeX Newbie and I'm trying to get XeTex to work with FontAwesome. Initially I got the error : The font "FontAwesome" cannot be found. So I added the path defaultfontfeatures as suggested in: ...
5
votes
1answer
58 views

Can \totvalue be called in the preamble?

I am trying to use the totcount package, and I noticed some strange behaviour I cannot explain. With the following MWE : \documentclass{book} \usepackage{lipsum} \usepackage{totcount} \...
0
votes
0answers
97 views

\RequirePackage{tikz} in dissertation .cls file

I'm trying to edit the standard .cls file provided by my university towards dissertations to include TikZ pictures. I tried adding \RequirePackage{tikz} in the class file and separately, adding \...
1
vote
2answers
70 views

Indenting text in all paragraphs

I want to indent all the text in all the paragraphs in a document I am writing. Below is the method I am using to accomplish this. It works well enough but I was wondering if I could somehow put the ...
1
vote
1answer
142 views

Automaticaly add paragraph spacing only between two textual paragraphs

I can use: \setlength{\parskip}{\baselineskip} \setlength{\parindent}{0pt} But this messes up the rest of the document as it also increases the spacing after chapters, sections, sub-sections, and ...
7
votes
1answer
142 views

Changing concrete preamble from pdfLatex to Lua(la)tex

I got an example handout which was written for pdflatex but since I use lualatex i'm pretty sure that I have to make some changes to the preamble. From there Frequently loaded packages: Differences ...
1
vote
1answer
534 views

Error: 'I can't write on file 'Main.pdf'

I suddenly keep getting the error message in the title. I have no idea what I did wrong as I did not have this problem before. I know this error can occur if the corresponding pdf file is opened, but ...
5
votes
1answer
229 views

How can I override geometry's scale in the preamble? (E.g. if a class or package has set a default using geometry.)

With some geometry options, it is possible to override a previous setting in the preamble. For example: \documentclass{article} \usepackage{geometry} \geometry{hmarginratio=1:1} \geometry{showframe,...
0
votes
0answers
31 views

Font Identification [duplicate]

Can anyone identify the font that is used in this article? Furthermore, is this font compatible with the 'article' class? Note: Using CTRL+D within Adobe Acrobat presents a number of fonts the ...
3
votes
2answers
108 views

how to add a horizontal line before every section by controlling the style of section

I want to add horizontal lines before every section, just like this manually I can just put \rule{\textwidth}{1pt} before every section, but I want a more flexible method, for example, by putting ...