Questions tagged [preamble]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
434 views

Can I make the same preamble appear for every document?

I have a lot of commands and packages in my preamble so right now I just have to copy and paste the entire preamble every time I am making a new document. Is there any way to make the same preamble ...
Mohammed Shahid's user avatar
2 votes
1 answer
264 views

Define command that can only be used in the preamble

I remember there was a LaTeX macro used internally to define commands that can only be used in the preamble, but I cannot remember its name nor look it up. Which is that command, and how is it used?
gigabytes's user avatar
  • 3,543
1 vote
1 answer
350 views

Is it possible to set the draft mode of a document AFTER \documentclass

I am using a precompiled preamble with the \documentclass inside. However, I sometimes want to change the document to 'draftmode'. Recompile the preamble everytime I am doing this is not so ...
SRel's user avatar
  • 1,273
0 votes
0 answers
83 views

Can I make something like a 'snapshot' of the loaded packages? [duplicate]

Currently may document is not very big, however when using Texworks and have a look at the output prompt what is showing what latex currently does when compiling, nearly 90% of the compilation time it ...
SRel's user avatar
  • 1,273
0 votes
1 answer
598 views

How to insert pictures with LaTex + dvips + ps2pdf quick build?

I am using a quick build of "LaTex + dvips + ps2pdf + view PDF". What is the easiest way to insert (multiple) pictures? I am fairly comfortable with LaTeX but I have never done this before. So if ...
Pellenthor's user avatar
4 votes
1 answer
530 views

\printbibliography by variable years

This is the system I currently have: \defbibcheck{yr2016}{ \iffieldint{year} {\ifnumequal{\thefield{year}}{2016} {\skipentry} {}} {\skipentry} } This should exclude anything except ...
Michael's user avatar
  • 87
0 votes
1 answer
121 views

Redefining "ClearDoublePage" ruins subfigures

I found some solution to add a "This page intentionally left blank" text on clear pages by redefining things in preamble, but it somehow messes up with subfloats. If I have a subfigure / subtable, ...
Yossi Ovcharik's user avatar
0 votes
1 answer
182 views

LYX : import blank file.lyx with a preamble

I have some problems using LyX. So I have a blank custom cover page but I use the preamble to put some LaTeX code and do my stuff (write text, import picture, title, author, etc.). I have my main.lyx ...
clement's user avatar
0 votes
1 answer
379 views

How to set a global scale factor for all figures (for consistent sizing) with manual override?

In my PhD thesis in engineering, I expect to have approximately hundred plots which are vector graphics (in PDF format) created close to the final size (but not exactly). I'd like to declare a global ...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
1 answer
1k views

Setting enumerate item separation in preamble

For personal preference, I would like the distance between items inside enumerate to be less than the default. One way to accomplish this is to add \setlength{\itemsep}{0pt} to every enumerate. For ...
Charles German's user avatar
1 vote
1 answer
1k views

Custom color for LaTeX output in Sphinx documentation package

I am trying to customize the color of the LaTeX inline formula when using Sphinx documentation package, and html output. The details: I have a file called func.rst, which includes the following line:...
DalyaG's user avatar
  • 225
0 votes
0 answers
59 views

One definition for different files

I am new in LaTeX and have one question: I have different files, that all should have the same "definition". With "definition" I mean the following lines: \documentclass{beamer} \usepackage[utf8]{...
mrbela's user avatar
  • 1,129
1 vote
1 answer
44 views

Environment with math symboles

I'm trying to make an environment with the code below (at LyX) but it doesn't compile... I check it the problem is with the \square command. How can I fix it? (I put this code at the preamble of ...
heblyx's user avatar
  • 2,521
4 votes
1 answer
1k views

File ended wile scanning use of \harvardurl. \bibliography{thesis_references}

I have compilation errors in my document which seem to be very similar to this question. The error message: "File ended wile scanning use of \harvardurl. \bibliography{thesis_references} The ...
CiaranWelsh's user avatar
0 votes
0 answers
54 views

Extracting commands from preamble that have been called in file

My LaTeX files are organised something like this: There is a file called commands.tex containing all the custom commands I use, mostly mathematical symbols, operators, etc. Each of my other .tex ...
ascendant's user avatar
0 votes
1 answer
780 views

beamer, tabular* and array - illegal pream-token

I am trying to fit a tabular* to a beamer page. However, it produces a significant amount of errors. I searched stackexchange and google but were not able to understand nor solve the problem by myself....
user7378449's user avatar
4 votes
2 answers
476 views

How can I use \dolistloop from etoolbox with \do redefined in preamble?

I am trying to use \dolistloop from etoolbox with the \do-command redefined in the preamble. However, the redefinition of the \do-command is ignored. If I put it within the document, it works as ...
Rasmus's user avatar
  • 141
1 vote
1 answer
2k views

LaTeX Error: Can be used only in preamble

Running this shell skript: #!/bin/bash -e FILE=$1 pandoc --top-level-division=chapter -V geometry:"margin=0.8in, landscape" --toc -s $FILE -o ${FILE%.*}.pdf with this minimal LaTeX file: \...
Michael Leiss's user avatar
2 votes
1 answer
245 views

How to include preamble-only commands in .dtx file?

I am trying to write my first package using Doc and DocStrip but I have problems including preamble-only commands into the documentation. For example I want to include \allowdisplaybreaks inside \...
Marvin Dippell's user avatar
1 vote
1 answer
145 views

Is it possible to use a package/macro only locally?

I would like to create a LaTeX file from several different other LaTeX files that might use different definitions of the same macros or might use incompatible packages. Is it possible to have within a ...
Colas's user avatar
  • 6,516
-1 votes
2 answers
108 views

How do this fit into an article latex

\begin{table}[htbp]%\caption{Summary statistics} \centering \scriptsize \renewcommand\arraystretch{0.8} \setlength\tabcolsep{2pt} \begin{tabular}{@{}lS[table-format=-2.8,table-...
Prince Mc Clone's user avatar
3 votes
1 answer
847 views

Organizing preamble while using glossaries package

I am currently trying to make a dictionary in LaTeX (using iOS textmaker), and have been using the \usepackage{glossaries}. The issue I am having is that I have to define my entries in the preamble ...
Breena's user avatar
  • 31
0 votes
0 answers
610 views

How to make a high resolution document in LaTeX?

I could finish my book and my publisher is requesting me to make it in high resolution. I don't know what is she meaning because the book has a very good resolution. This is my preamble: \...
Fabio's user avatar
  • 197
2 votes
0 answers
60 views

I am new to LaTeX [duplicate]

I am new to LaTex. I am writing a paper on a number theory topic. What I know so far is that I need to construct a preamble for my paper. I don't know what packages I need for my paper. What packages ...
H.B's user avatar
  • 41
2 votes
1 answer
684 views

TeXstudio: Can I put multiple packages in a separate file and still have the autocompleter recognize their commands?

This is a follow-up question to Place preamble packages in a different tex file, Methods for autocompletion in TexStudio don't work. The Problem Over the years, I have collected quite the number ...
Aram's user avatar
  • 33
0 votes
0 answers
150 views

Using same .sty-file on different computers

I use a .sty-file where I collect all packages and commands and stuff like that. This I have on my personal computer, and I load the file with \usepackage{path/to/file} Sometimes I have to write on ...
LetGBeTheGraph's user avatar
2 votes
1 answer
373 views

LyX does not display definitions in the LaTeX preamble

I have defined the following preamble in my LyX document: \setlength{\parindent}{0pt} \newcommand{\setR}{\mathbb{R}} The first one is because the language I write in doesn't use indentations in the ...
Bary12's user avatar
  • 125
1 vote
2 answers
43 views

How to make a usual latex installation compile the following non-standard array-syntax?

Once I seem to have worked on a system where, for some reason, latex code containing $\array{a & b \\ c & d }$ seems to have worked. (Note that, in particular, the "alignment" options ...
Peter Heinig's user avatar
0 votes
1 answer
1k views

LyX: import package before LyX-added LaTeX commands

When adding something to the LyX preamble and converting to TeX, it adds the lines after LyX package imports (\usepackage{amsmath} and the like), after LyX specific LaTeX commands (\pdfpageheight\...
Ted's user avatar
  • 195
0 votes
1 answer
4k views

Preamble not found in subfile when using \input{Preamble.tex} in main file

When using the following for my main TeX file Graduation_report.tex, in the main folder: \documentclass[11pt,a4paper]{report} \input{Preamble.tex} \begin{document} \subfile{Introduction/...
Bas's user avatar
  • 61
1 vote
1 answer
129 views

compatibility of pdfpages and screenread packages?

Okay everyone, sorry about my original not being up to standard. A better version follows. First, here is a MWE: \documentclass{article} \usepackage{pdfpages} %\usepackage{screenread} \begin{...
user avatar
1 vote
1 answer
890 views

Error to load preamble in subfiles

I'm trying to write a document in spanish with multiple files, however I can't compile special characters (á,é,í,ó,ú) in the child files (these compile fine in main file) and I can't add a preamble in ...
Pablo's user avatar
  • 13
0 votes
2 answers
443 views

LaTeX - hspace all equations globally

I'm writing my master thesis and have some problems with the setup of the latex. I want to tabulate(hspace) every equation. I don't want it to start at the left site or be centered. Can I somehow ...
Abdullah Kaçar's user avatar
2 votes
1 answer
548 views

What Generates the Error?

I have been trying to figure out why the following preamble generates the error "\Alpha undefined \renewcommand{\Alpha}{\raisebox{-1.5pt}{\scalebox{1.3}{$\oAlpha$}}}" for hours, but I don't seem ...
Hector's user avatar
  • 2,233
3 votes
2 answers
645 views

How to specify default options for figure environment? [duplicate]

More specifically, how can I set in the preamble the default options for the figure environment to [htb]? I am trying to separate content from format as much as possible and want to avoid writing \...
BlackDog's user avatar
3 votes
1 answer
2k views

Creating a Macros File for Lyx

I've created a set of macros in Lyx that I use continuously. I want to automatically include them in all my .lyx documents. From what I've been reading in the forums, perhaps the most elegant way is ...
Yoni's user avatar
  • 286
2 votes
2 answers
505 views

Inserting code before Lyx generated preamble

I wish to use the url package with the hyphens option and the hyperref package. Because the hyperref package loads the url package, I have to pass the hyphens option to the url package before it is ...
Charlie's user avatar
  • 193
5 votes
1 answer
1k views

Redefine existing commands outside preamble

I have a Latex document where a lot of the text and figures is generated automatically by a program. In a minimal example, the final document is like this: \documentclass{memoir} %% This file is ...
carandraug's user avatar
2 votes
1 answer
751 views

Improving my preamble

I'm at that stage in my thesis where anything is a distraction, right now it's cleaning my tex preamble, my document layout is pretty much as perfect as I could want it. Any suggestions to use a "...
Padawan's user avatar
  • 53
6 votes
3 answers
2k views

Splitting a document per chapter with preample for Latexian live preview

Currently, I have my main LaTeX document set up as follows: \documentclass[12pt]{report} \usepackage{mystyle} \title{Mytitle} \author{Me} \date{} \begin{document} \pagestyle{plain} \maketitle \...
Echan's user avatar
  • 501
1 vote
1 answer
1k views

LyX does not generate pdf

I have just actualize my LyX version from LyX 1.6 to LyX 2.2 and now I am unable to get a pdf preview (when clicking the "eyes" button). The thing is that the following message appears: LaTeX Error: ...
Andrés Salinas Fernández's user avatar
2 votes
1 answer
341 views

Customize Table - I'm a LyX & LaTeX Newbie!

I want to customize a table that I made in a certain way, and solve a problem that I have because of the table. I'll my current table details first (looks & code), and after that, I'll ask the ...
Gal Grünfeld's user avatar
2 votes
2 answers
851 views

LuaLaTeX KOMA scrlttr2 without E-Mail:

I made a letter with scrlttr2 KOMA script and activated fromemail=on but that brings up the pre E-Mail: in the line of the email that looks like this: E-Mail: adress@url.tld. Now I don't like the pre ...
novski's user avatar
  • 1,029
1 vote
1 answer
672 views

Add page break after tableofcontent via preamble?

Is it possible to add a page break after the table of contents in the preamble rather than inline in the .tex file? This question is somewhat related to the other one I asked here, though since it's ...
Brian Madden's user avatar
3 votes
1 answer
710 views

Include title page in numbering via preamble settings only?

I'm trying to make my title page count as "Page 1" in my PDF, but I have the restriction that (I think) I can only make a change to the preamble section of my .tex file. My scenario is that I'm using ...
Brian Madden's user avatar
1 vote
1 answer
343 views

Unwanted double underline under subsection numbers

I just updated my LaTeX distribution to MacTex 2016 and also updated all my packages with the tlmgr update --all-command. After that I recompiled a project of mine and didn't believe my eyes. My ...
Sam's user avatar
  • 2,858
6 votes
1 answer
5k views

Place preamble packages in a different tex file

I have the following main tex file and I wish to place the \usepackage commands in a different usepackage.tex file and compile it on main tex file. How can I do that. I tried but keep getting error as ...
shahrina ismail's user avatar
7 votes
2 answers
4k views

Using DeclareUnicodeCharacter locally (in document, not preamble)

I have a collection of auto-generated LaTeX snippets (each in an individual file) that I include in multiple documents. These snippets use Unicode symbols instead of math commands (←, λ, ⇒, … instead ...
Clément's user avatar
  • 3,984
0 votes
0 answers
550 views

Context free LaTex

Apparently, Parsing TeX is Turing-complete. I however, do not write TeX but LaTeX. In that process, I profit from assistance by editor plugins like Auctex et.al. These plugins rely on a syntactic ...
choeger's user avatar
  • 905
1 vote
1 answer
3k views

Divide report in parts

I have the following preamble in LateX: \documentclass[whitelogo,twoside]{report} \usepackage{lipsum} \begin{document} %\input{title} %\input{abstract} \tableofcontents %\listoffigures %\listoftables ...
André's user avatar
  • 397

1 2 3
4
5
8