Stack Exchange Network

Stack Exchange network consists of 174 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
38 views

Latex structure preamble [on hold]

What is the best way to separately store a config file with all the packages, commands etc. that come before the \begin{document}. I think this is called a preamble. Currently I have a main.tex file ...
1
vote
2answers
120 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
139 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
29 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
35 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
39 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
0answers
30 views

How to set path to a .tex in preamble (texmaths)?

I'd like to set up the installation of two packages (scratch which requires simplekv) to be used with texmaths. The preamble in texmaths is : % LaTex Compiler \usepackage{amsmath} \usepackage{...
0
votes
0answers
42 views

There are empty double pages inserted in the .pdf document that there are absent from the preview pdf

My problem is that when I work on the latex text there is no problem with pdf preview. When I am printing the pdf there are empty pages between and at the end of it, meaning that a 2 pages document (...
0
votes
2answers
50 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
32 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
37 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
24 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
61 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
53 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
757 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
49 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
33 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
58 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
20 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
50 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
48 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
37 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
46 views

Having a clean and organized Header (Using Texshop)

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
30 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
36 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
45 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
38 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
132 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
190 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
47 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
44 views

Glossary description width / length - acronyms too long

I'm using the glossaries package in my thesis. The glossary is defined in the preamble: %%% Glossary: \makeglossaries %\input{ressources/Abkuerzungen} \setacronymstyle{short-long} \makeatletter \...
0
votes
0answers
46 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
84 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
79 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
229 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
115 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
811 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
73 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
62 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
93 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
144 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
126 views

Wrapfigure needs new paragraph to keep text formatted

I'm totally new to latex. I was given a premade preamble to use for the document I'm writing on. I've been trying to use wrapfigure, but this is what happens. wrapfig destroys text formation It only ...
0
votes
0answers
42 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
120 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
200 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
86 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 ...
2
votes
1answer
109 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 ...