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
0answers
19 views

Combining multiple tex docs with different documentclass and independent preambles

I am trying to combine different tex documents into a single document. Each document has a different document class and independent preamble. More specifically, I am trying to combine my CV, with my ...
0
votes
0answers
31 views

Compile sub-files independently with standalone

I try to set up an application where no info regarding me is showing on the motivation letter. On the CV on the other hand, it should be. I tried to implement it with the standalone package, where the ...
0
votes
1answer
61 views

LaTex will not include reference

I'm writing a project in LaTex, and when I'm inserting a reference, it will not work. The name I named in the bib-file only gets into the pdf in bold. Here is my code: \usepackage[backend=biber,...
2
votes
1answer
50 views

Enforcing ImageMagick parameters into tex4ht during magick convert (Windows)

Use of the newer versions of ImageMagick in Windows with MikTeX and tex4ht requires a trick in the preamble to enforce tex4ht to invoke magick convert instead of the previously used convert.exe, which ...
1
vote
1answer
39 views

Text from Preamble in LaTeX document

I'm getting an fl in my document when I compile the the following code: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[x-1a]{pdfx} \begin{document} \end{document} Can any body tell ...
0
votes
1answer
36 views

Define variables in document so that macro definition goes into preamble

I've written some macros to add OMR characters to the generated document. The OMR characters are needed for an envelope inserter machine. When I want to print OMR characters for a double-sided ...
0
votes
1answer
580 views

'l3regex.sty' not found [closed]

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
126 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
70 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....
1
vote
1answer
120 views

What preamble or packages do TeX StackExchange answers use?

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
66 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{}? ...
3
votes
2answers
789 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
858 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
33 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. ...
2
votes
1answer
63 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
45 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
53 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
39 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
83 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
34 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
95 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
84 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
1k 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
63 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
56 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
137 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
26 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
54 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
78 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
53 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
1answer
36 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
48 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
58 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 ...
2
votes
1answer
283 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
340 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
53 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
53 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
39 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
213 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
41 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
383 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
159 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
985 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
87 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
68 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
103 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
194 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
139 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: \...
2
votes
0answers
52 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 ...