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
1 vote
1 answer
78 views

Change default column type in tabularray

Is it possible to set all tblr in the document to be \linewidth wide specifying the X column type by default?. This requires not mentioning the number of columns like it happens in colspec, as it ...
Polizi8's user avatar
  • 127
2 votes
1 answer
53 views

Kerkis font activation error in latex

I am trying use kerkis font in latex using \usepackage{kmath,kerkis}. The following is my preamble: \documentclass[12pt]{article} \usepackage{kmath,kerkis} \usepackage[T1]{fontenc} \usepackage[...
Sayan's user avatar
  • 55
0 votes
0 answers
62 views

Preamble too large

I have a question about the preamble. In my LaTeX documents the preamble is often too big (about 1000 lines): is there a method to create a subfile (e.g. New File) in which to write the preamble and ...
Puck's user avatar
  • 1,119
3 votes
1 answer
99 views

\parbox not working, or invisible?

I want to use \parbox to, well, make a box around text. But when I typeset, I just get the text and no box... I have no idea why. I am afraid it could be something in my preamble... I keep including ...
Jacob Shulman's user avatar
0 votes
0 answers
123 views

Look for a tutorial for the "precompile" teXstudio option

I assume that "precompile preamble" texStudio (advanced) option is meant to precompile a "preambule.tex" that is included before "begin{document}" in a "main.tex&...
Julien Faure's user avatar
0 votes
1 answer
74 views

Error in preamble while compiling

I am getting errors while compiling my files, but the errors are not mentioning the line numbers where I can check and correct them. Can someone tell me what are these errors about? enter code here ...
Formal_this's user avatar
0 votes
1 answer
30 views

How to turn arrow into command

I have found a symbol that I think is appropriate for a mathematical construct and this is the code for it \ \rotatebox[origin=c]{-90}{$\circlearrowright$}\ I would like to just type \act instead of ...
Karl's user avatar
  • 259
0 votes
2 answers
36 views

Preamble parametrization - passing parameters to `\usepackage` [closed]

I have CV in two languages, which share most of the preamble but \usepackage[<language>]{babel}. I want to parametrize the preamble similarly to: \usepackage[\cvLanguage]{babel} \usepackage{doi} ...
abukaj's user avatar
  • 127
2 votes
1 answer
28 views

Using \def to output boolean true/false values - Usage in Tasks Package "Resume" Function

I am attempting to use a \def (or any equivalent) to give a boolean output, but unable to do so. Compilation of below results in the following error: \documentclass{amsart} \usepackage{tasks} \begin{...
Terry Panda's user avatar
1 vote
0 answers
40 views

Error compiling my bibliography [duplicate]

I'm using Gummi {https://github.com/alexandervdm/gummi/} as my Latex editor. When I try to compile my .bib file, it returns the following error: My .bib file is bibligrafia.bib (generated using ...
JJP's user avatar
  • 57
0 votes
0 answers
26 views

Bibliography/references do not work in any capacity

This is my preamble, I have tried several things including running it through pdflatex (without fontspec etc.) and following documentation properly as far as I can tell (although it's clear that I'm ...
Golden_Serpents's user avatar
0 votes
1 answer
44 views

How to change quote behavior?

I'm using Org-Mode to write documents that I export to LaTeX. Org-Mode exports its quote blocks to: \begin{quote} ... \end{quote} In order to color these quotes I'm using the following code (found ...
crocefisso's user avatar
0 votes
0 answers
37 views

Is there a way to `\includeonly` when the memoir document is monolithic?

When writing a memoir document it's easy to focus on just one chapter by using \includeonly. \documentclass{memoir} \title{title} \author{author} \includeonly{chap-3} \begin{document} \include{chap-0}...
Sam's user avatar
  • 385
0 votes
0 answers
73 views

Numbering of theorems, lemmas, definitions, examples, etc for thesis

I am trying to work on the numbering of the theorems/definitions/lemmas etc., and I have some problems with the numbering. I would like the theorems, propositions, corollaries, definitions, ...
Vipul Singh's user avatar
1 vote
2 answers
32 views

Reduce white spacing before a SINGLE chapter heading in memoir class

I am using memoir document class. I wanted to decrease the space preceding my chapter headings, and I want to do it individually because I do not want to decrease white space before other headings (...
FueledByPizza's user avatar
0 votes
1 answer
124 views

Declare footnote text before usage in the preamble

I want to reuse footnotes. The problem is that it is inside \authors, and some solutions won't work. I tried first the fixfoot package, but it gives an error, and the package is not being updated for ...
DrBeco's user avatar
  • 237
0 votes
1 answer
49 views

expl3 / setlength not working in preamble with expl3

I am writing a package that should output typographic sizes. For example the absolute character height, the x height, average character width,... These should be available in the preamble. \...
alexBer's user avatar
  • 33
1 vote
1 answer
77 views

Loading a preamble from a separate file than the main file with the subfiles package. When I compile the main.tex everything works but not subfile

I have a document with a very long preamble in the separate file general.tex. The main.tex looks something like \documentclass[10pt, letterpaper]{article} \input{general.tex} \usepackage{subfiles} \...
Alex Cong's user avatar
0 votes
0 answers
28 views

Huge Spacing between \date and \abstract

I would like to reduce the spacing between the word "abstract and the date in this document: \documentclass[12pt,twoside]{article} \usepackage[utf8]{inputenc} \usepackage[font={footnotesize,bf}]{...
Matteo Bulgarelli's user avatar
0 votes
1 answer
41 views

How to included nested standalone documents with subpreambles

I have discovered that standalone package can be used to combine multiple standalone documents into one document. I find this beneficial to split my work into multiple files and then compile certain ...
nikost's user avatar
  • 211
2 votes
0 answers
56 views

standalone package wrongly claims sub-preamble of a subfile changed if used with \file_input:n instead of \input

As shown by the following MCE, the standalone package loaded with its subpreambles option gives the expected result with \input, but not with \file_input:n when the input file has a non empty preamble....
Denis Bitouzé's user avatar
2 votes
0 answers
60 views

How to access a unicode-math symbol in the preamble? [closed]

A demonstration of the problem by way of a minimal working example I saved the following LaTeX code in the file ~/Test.tex. \documentclass{article} \usepackage{unicode-math} \setmathfont{STIX Two Math}...
Evan Aad's user avatar
  • 10.8k
0 votes
0 answers
32 views

Highlighting all elements of type in the document

I would like to know if there's a command that I can use in the preamble to highlight all elements of a given type in a colour of my choosing. I would particularly like to highlight all math formulae. ...
lfba's user avatar
  • 721
0 votes
1 answer
40 views

Changing font size of main text and Centering title in "Pomona Linguistics LaTeX Template"

I am using Pomona Linguistics LaTeX Template (https://www.overleaf.com/latex/templates/pomona-linguistics-latex-template/bvdxdtpwysnd) provided at Overleaf and would like to: (1) Change the font size ...
Econ Latex Question's user avatar
0 votes
0 answers
53 views

How to save and reuse a preamble as a template/package

I have created my own presentation template based on beamer. The preamble is super long (~250 lines) and I really don't want to copy/paste it over and over. Is it possible to save the preamble as a ...
Thiên Việt Nguyễn's user avatar
0 votes
0 answers
227 views

"Command \algorithmic already defined" when attempting to compile in MiKTeX/TeXworks

I have two questions about the error message described by the subject line. My first question is why does Overleaf not have this error? And my second question is how do I solve this problem? I was ...
kwhobbs's user avatar
3 votes
2 answers
205 views

Moving \sffamily to latex preamble

I'm using \rmfamily and \sffamily to switch between two fonts in my document, one for sections and one for the rest of the text. However, I cant find a way to move my \sffamily command before \begin{...
curry's user avatar
  • 231
0 votes
0 answers
18 views

How does one indent the beginning of a theorem like a new paragraph?

How do I indent my lemma as if it was the beginning of a new paragraph? In my preamble this is all I got for the Lemma environment: \theoremstyle{definition} \newtheorem{lemma}{\normalfont\scshape ...
Richard's user avatar
  • 200
0 votes
0 answers
47 views

Umlaut in the name of the file containing the preamble

Using \input{filename} for a file in a subdir works fine even including the whole preamble, but when the targeted file has an Umlaut in its name, I get an Emergency stop with a Missing \begin{document}...
Nepumuk's user avatar
  • 483
0 votes
1 answer
91 views

how to hide a part of .tex file [duplicate]

I would like to be able to make sure that in the file (.tex) the entire preamble is not seen, in the sense that it is there and actually works, but not seen, so that it preserves all the lines of code ...
Antonello's user avatar
2 votes
1 answer
209 views

Switching paper size in amsart

Consider the following LaTeX Code: \documentclass[a4paper]{amsart} \usepackage{lipsum} \begin{document} \lipsum \end{document} The generated PDF has US Letter, Portrait (8.50 × 11.00 inch) as its ...
Wilfred Montoya's user avatar
0 votes
1 answer
78 views

Defining numerical variables in latex preamble

In my manuscript, I need to specify the vspace command in a few places. I wonder if I can define numerical variables for this purpose in an article document class. For example, instead of typing \...
Salivan's user avatar
  • 303
1 vote
1 answer
54 views

\addcontentsline link isn't taking me to correct page

Here's the code: \documentclass[a4paper]{article} \usepackage{cmbright} \usepackage{stix} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage{amsmath, amssymb, ...
SingularisArt's user avatar
0 votes
0 answers
111 views

About LaTeX document preamble

This migh be a silly question but I ask to you LaTeX veterans for help in improving my LaTeX-document preamble. The following is what I usually run as predefinite preamble, but I suspect that I could ...
Henry's user avatar
  • 330
0 votes
1 answer
106 views

Set itemize default settings in preamble [duplicate]

If I want itemize always in this format \begin{itemize} \setlength{\parskip}{3pt} \setlength{\itemsep}{0pt plus 1pt} \item ... \end{itemize} How could I do? ...
user3713179's user avatar
0 votes
1 answer
70 views

Editing the style of chapters, sections, subsections, etc and add a chapter outline, along with a brief content section

I found this Algebra and Trigonometry crash course pdf, and I really like the style. Could someone give me tips or links to websites that teach you how to create chapters, sections, subsections, etc? ...
SingularisArt's user avatar
0 votes
1 answer
80 views

How to create one command that typesets each letter in the alphabet in mathbf. (See body for examples)

Right now I've got commands defined in my preamble that abbreviate \mathbf. For example, instead of writing \mathbf{F} every time I want to write F, I've simply defined a new command \def\F{\...
GibbNotGibbs's user avatar
0 votes
0 answers
212 views

Removing PACS and keywords field from latex template

I am using the same template as given in this post here: How to switch the position of PACS and keywords in revtex 4 Here is the code reproduced for convenience: \documentclass[jkps,preprint,fleqn,...
CAF's user avatar
  • 983
1 vote
1 answer
100 views

How to reuse a specificall PSTricks figure with pdfLaTeX?

I have to use a preamble (see below) which is outdated (and, in my opinion, clogged with garbage). My task is to set up the given preamble for using with pdfLaTex, and if possible to clean it from ...
Su-47's user avatar
  • 2,428
1 vote
1 answer
100 views

Disable LyX preamble

In LyX, I would like to know if there is a way, for a given document, to disable all parts of the preamble that LyX adds automatically, leaving only the user-defined preamble before compilation occurs ...
Captain Pi's user avatar
-1 votes
2 answers
278 views

How to create code in the preamble to give the same result as a prescribed boxed figure with nested caption and numbering

Can a routine be created - similar to those for \chapter, \section, \subsection i.e., containing a number of #2, #1 parameters - to control the boxes used to highlight a series of figures? In my MWE ...
keith77777's user avatar
1 vote
1 answer
72 views

Precompiled preamble + TikZ fadings library

It seems that the fadings library is not compatible with precompiled preambles. MWE: %&mwe \documentclass{article} \usepackage{tikz} \usetikzlibrary{fadings}% Incompatible with precompiled ...
Bibi's user avatar
  • 1,431
2 votes
1 answer
492 views

How do I add a frame title specifying the section and subsection names whenever a new subsection come up?

I'm very new to StackExchange, let alone LaTeX. The issue here is temporarily adding a frame title to whichever frame comes right after a new subsection is defined. Following is a sample code with an ...
Nikhil Alex's user avatar
0 votes
1 answer
68 views

Creating links to things other than url's and other pdf files

I found this blog post where he talks about how he manages to do his research Ph.D. thesis and maintain his Ph.D. thesis notes. When I create a reference link to a note.xoj file and I click the link, ...
SingularisArt's user avatar
1 vote
1 answer
41 views

Create automatic label from a given input command

I created/copied this piece of latex preamble code: \makeatletter \def\@lesson{} \def\@lessonabbr{} \newcommand{\lesson}[4]{ \ifthenelse{\isempty{#3}}{ \def\@lessonabbr{Les #1} \def\@...
SingularisArt's user avatar
3 votes
0 answers
165 views

Is it bad to have a large preamble? (~100 lines) / are there any optimizations there could be made to my preamble?

I must say I've been using LaTeX for only a couple of months, so you could say I'm still a beginner. I have a large project that has many modifications applied to it. Every single time I wanted to ...
Andy3153's user avatar
  • 177
-2 votes
1 answer
67 views

Check these errors

\documentclass[a4paper,twocolumn]{article} \usepackage[utf8]{inputenc} \usepackage{booktabs} \usepackage{array} \usepackage{multirow} %\usepackage[T1]{fontenc} \usepackage[left=1cm,right=1cm,top=0.5cm,...
Pallab Nandi's user avatar
0 votes
0 answers
32 views

Nested Stand-Alone with flash cards not working

I have made flash cards using the flacards document class, but they are from multiple topics across multiple semesters. I want to be able to have a unique footer for each topic/semester, as well as ...
Wouter's user avatar
  • 11
0 votes
2 answers
253 views

How to adapt \crefrangelabelformat to subexample formatting?

I would like to be able to redefine something which is supposed to be defined in the preamble. In this example and in relation to this question : Cross-referencing: more sublevels, and presets, I want ...
Vincent Krebs's user avatar
0 votes
0 answers
49 views

Can I re-use the same preamble in multiple documents? [duplicate]

I would like to reuse a piece of code from the preamble in multiple .tex documents. I can just copy and paste that code in all my documents, however, if later on I decide to modify the code I need to ...
Zoltan King's user avatar

1
2 3 4 5
8