Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
45 views

'l3regex.sty' not found

I updated my MiKTeX today. Now, I do not get any error without packages but it can not compile my latex files with packages. Uninstalling and reinstalling both Texmaker and Miktex did not work. I ...
1
vote
1answer
37 views

changing name of “nomenclature” not working in lyx

why could it be that the suggested command won't work in Lyx? I am using the "Book (standard) class". Thank you, everyone! \renewcommand\nomname{New Name for Nomenclature} edit: I have to enter the ...
0
votes
1answer
34 views

“LaTeX Error: Can be used only in preamble” for a directive not used except in the preamble

For a markdown doc that has the following preamble: --- title: Cloud Capstone Task1 subtitle: Airline Dataset Queries documentclass: scrartcl author: Stephen Boesch geometry: "fontsize=9pt left=1....
2
votes
1answer
88 views

What preamble or packages does the tex.stachexchange uses?

I want to copy some good answers to my local tex editor in order to review sometimes future. There will be many errors since like ** ** means bold, space x 4 means writing codes, etc. And sometimes ...
0
votes
0answers
29 views

Any Overlapping or Misordering in My Preamble? [duplicate]

I've used both hyperref and url to enable href and url, but heard that they're redundant. Also I realized that ordering \usepackages matters. For example, \usepackage{hyperref} \usepackage[...
2
votes
1answer
61 views

Is it possible to abbreviate a given set of necessary commands in the preamble?

I wonder if it is possible to abbreviate a given set of commands in the preamble? For example, is it possible give a one-line code that abbreviates the commands from \documentclass to \usepackage{}? ...
1
vote
2answers
343 views

Adding google scholar and Researchgate profile to the preamble in moderncv

I'm new to Latex. I am creating my resume using moderncv and I want to add my google scholar and researchgate profiles (icon and clickable link) to the preamble (below the website link in the image). ...
2
votes
2answers
331 views

“LaTeX Error: Can be used only in preamble” even though all directives before begin directive

In the following simplified version of a markdown doc intended for pandoc/latex generation to `pdf: \documentclass{article} \usepackage{unicode-math} \setmainfont{TeX Gyre Schola} \setmathfont{TeX ...
2
votes
1answer
30 views

Can't figure out how to indent with the packages

I'm trying to write my personal statement, and I used some new packages to format it. I can't figure out why it won't let me indent the paragraphs. I've tried \par, \hspace, etc, but I've had no luck. ...
3
votes
1answer
41 views

How do I generate a PDF without compressing the page count?

I need to submit a PDF to an online submission portal that searches the plaintext PDF file for the page count in order to verify that it has the correct number of pages. PdfTeX by default compresses ...
0
votes
3answers
42 views

How to change macro to replace \begin{theorem} … \end{theorem} by \theorem?

To state a theorem, what we do usually : \begin{theorem} ... (statement) ... \end{theorem} I want to change the macro so that I can use \theorem like \section: \theorem ... (statement) ... Is ...
0
votes
2answers
51 views

Error during expanding macro command in preamble

I try to create a command if...else which seems correct when i expand it in body but not in preamble. The package answers seems to be not include because the \Newassociation command is unknown. I try ...
0
votes
2answers
35 views

Title formatting

I have the following code: \title{ \begin{center} CLAXXX Homework X \newline Prof. Professor \newline First Last \newline Day, Month XX, Year \end{center}} \begin{document} \centering \maketitle \...
1
vote
0answers
55 views

Error warning for backward compatibility

Recently I have been using Overleaf and Texworks for my latex and I seem to be getting the error: Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing ...
0
votes
1answer
28 views

Use same preamble, title page and TOC across several files

I realized that I use the same preamble across several files. These are mostly articles formatted in precisely the same --- headers, footers, margins, font, etc. Even the title page is formatted the ...
0
votes
1answer
70 views

LuaLaTeX packages for bold math symbols [closed]

I am writing a document, and this is my preamble: \documentclass[11pt]{article} % Packages dealing with fonts \usepackage{mathtools} \usepackage{amssymb} \usepackage{unicode-math} \usepackage{...
1
vote
1answer
67 views

Wrapping preamble in Texstudio

Texstudio offers the handy option to wrap the code corresponding to whole sections, environments, etc. Is there a way to the same with a documents' preamble? I have tried embedding the whole ...
8
votes
2answers
909 views

Palatino Linotype font

The font family attached below is the Platino Linotype font (name from 'MS Word') italicized. Which latex command can be used to automatically generates the font family in math mode throughout the ...
0
votes
2answers
54 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 ...
1
vote
1answer
44 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?
1
vote
1answer
80 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 ...
0
votes
0answers
22 views

Precompiling Preamble how separator “% mylatex” work?

I am using Mylatexformat for precompiling my \usepackages Per default, when adding the precompiled file latex is skipping the whole preamble and just start reading the document beginning at \begin{...
0
votes
0answers
51 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 ...
0
votes
1answer
51 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 ...
2
votes
1answer
43 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 ...
0
votes
0answers
60 views

Having a clean and organized Header (Using Texshop) [closed]

Good morning, I'd like to ask the following question about having a good and organized page in latex. I'm not very good because i just starte but I already wrote about 496 lines. Maybe i'm not ...
0
votes
1answer
34 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, ...
0
votes
1answer
39 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 ...
0
votes
1answer
48 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 ...
0
votes
0answers
39 views

Splitting big document into smaller documents

I have a big document with which I need to split into different, .tex files to manage it easily. Here is my sample code from my MAIN file. \documentclass[a4paper,11pt]{report} ***********************...
2
votes
1answer
191 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 ...
0
votes
1answer
248 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:...
0
votes
0answers
50 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]{...
0
votes
0answers
48 views

Abstract page design and a number of other issues [duplicate]

I would like to adapt my current 'Abstract page design' (code) to the style used in the picture. Furthermore, I would like to have the abstract on the title page, what I have learned thus far is that ...
1
vote
1answer
37 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 ...
2
votes
1answer
117 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 ...
0
votes
0answers
91 views

Error in using \RequirePackage[ngerman=ngerman-x-latest]{hyphsubst}

I am using Latex to write my thesis, and I want to use the University logo in title page. when I run the following commands of title page, it gives the correct output. % TITLE PAGE \documentclass[...
0
votes
0answers
40 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 ...
0
votes
1answer
286 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....
4
votes
2answers
136 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 ...
1
vote
1answer
905 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: \...
2
votes
1answer
79 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 \...
1
vote
1answer
66 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 ...
-1
votes
2answers
97 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-...
2
votes
1answer
157 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 ...
0
votes
0answers
47 views

LaTeX Error with braids and xy-pic: Can only be used in preamble

I have been trying to get an image of a Braid Group posted on Overleaf. I wasn't having any problems however have ran into the error code: LaTeX Error: Can only be used in preamble" This never came ...
0
votes
0answers
127 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: \...
3
votes
0answers
46 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 ...
1
vote
1answer
241 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 ...
0
votes
0answers
93 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 ...