Questions tagged [formatting]

{formatting} is for general questions about formatting document elements. Use this tag in addition to other tags specifying what should be formatted. For questions about font attributes (e.g., {bold}, {italic}, {small-caps}, {sans-serif}, {typewriter}), use the appropriate tag instead.

420 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
0 answers
882 views

Comfortably typesetting Extended Backus-Naur-Form

On this site I've found some solutions how to typeset Backus-Naur-Forms, e.g.: How to type a Backus-Naur form in LaTeX Which package can be used to write BNF grammars? Unfortunately both solution ...
TeXnician's user avatar
  • 33.4k
7 votes
0 answers
244 views

How can I set up nested keys using pgfkeys

I've got several documents that I would like to be able to format in different styles depending on the context of the presentation. The content should stay the same, but the formatting may need to ...
A.Ellett's user avatar
  • 50.2k
6 votes
0 answers
2k views

Formatting bash with listings

I writing a documentation in LaTeX about Linux Bash resp. Shell script. And I'm having some problems: How can I start a formatting at the beginning of a line? How can I format between two signs, but ...
Hur'q's user avatar
  • 59
4 votes
0 answers
1k views

How to get highlights in article before abstract and keywords?

Using the cas-dc document class I am trying to have the highlights of the article before the abstract and keywords in a two word document. Like this picture shows. I am using the template provided on ...
c_dogg's user avatar
  • 41
4 votes
0 answers
348 views

Where does not TeX make correct spacing and formatting in math formulas automatically?

I am writing book with a lot of math formulas. I am interested to print them correctly according to typography rules, Knuth's recommendations or AMS-society's recommendations. I saw in this question ...
user avatar
4 votes
0 answers
998 views

Wrap text around a centered tikz figure on a poster

Is that possible to prepare a A0 size poster with the following format in Tikz environment or so? The figure in the middle is a mindmap (code available online) and I want to wrap my text around it.
Reza's user avatar
  • 811
4 votes
0 answers
220 views

How to create italic "in press"-year labels for in-text citations by modifying the bibtex style file

I'm looking for a way to add "in press" in italics into my bibtex-style file for publications for which a doi already exists. As I'm using a Natbib-AuthorYear reference style, I have to add this in ...
Robert B's user avatar
  • 111
3 votes
0 answers
109 views

Best way to write title paragraphs in LaTeX

I was trying to emulate the style found in some math textbooks of having titled paragraphs through a sidebar of sorts, and i was wondering what the best way to go about it was. For now, i am (ab?)...
quartztz's user avatar
3 votes
0 answers
112 views

What are some practical approaches to generally improving fluency and range of knowledge/skills in TeX?

Excuse me if this question is better fitted for another SE, as it is somewhat more of a meta question, but still on-topic. As a background, I'm an undergraduate Mathematics major in my final semester, ...
pyridoxal_trigeminus's user avatar
3 votes
1 answer
208 views

customize article function output in bst file

I'm working with a modified harvard.bst file to match the specific (and weird) requirements from my University guidelines. I must reference articles following this structure: if there's no doi, the ...
raulindo's user avatar
3 votes
0 answers
326 views

How do I add a dot inside the zeros on the date?

My MWE \documentclass[a4paper,11pt]{article} %%%%%%%%%%%%% dot with zero \makeatletter \newcommand*{\pmzerodot}{% \nfss@text{% \sbox0{$\vcenter{}$}% math axis \sbox2{0}% \sbox4{0\/}% \ooalign{% 0\...
Özgür's user avatar
  • 3,270
3 votes
0 answers
582 views

Would you know a diary with notes template (A5 format)?

Would you know a diary with notes template? Pdflatex and Tikz would be the best to perform this. It would be great to have the time slots + below/above some place for some notes and priorities. It ...
patrick295767's user avatar
3 votes
0 answers
725 views

C++ Code formatting

i have read a lot and for a long time in your great forum. Now this is my first question. I included C++ Code in my latex document and I formatted it successfully. But one detail isn't working. I want ...
Spliffer's user avatar
3 votes
0 answers
1k views

Positions of variable indices: use of package "subdepth"

For some reasons I like to align top of indices regardless if variable has exponents or not and if exponent is a, 1 or g, p, q, y. With use of package [low-sup]{subdepth} the aligning is improved, ...
Zarko's user avatar
  • 293k
3 votes
0 answers
1k views

Changing top margin for second page only? \vspace inserts extra whitespace

I am trying to format a LaTex template for pandoc output from .md to pdf. The document is for lengthy university papers requiring very specific layout. The majority of the paper has 1 in margins all ...
Tyler Mykkanen's user avatar
2 votes
0 answers
110 views

Enforcing Full Stop at the End of Hanging Captions within `xltabular`

The following posts provides a solution for adding a full stop at the end of hanging captions, but I'm encountering issues when applying this in the context of xltabular. Can I extend this ...
Highnoon's user avatar
2 votes
0 answers
41 views

How to repeat part of the last (first) line of the previous (next) page in LaTeX?

For example, Is there a way to do this automatically in LaTeX?
Tee's user avatar
  • 21
2 votes
0 answers
36 views

Adding a double spaced line after chapter heading

I'm working on formatting a thesis for graduate school, and they're asking me to put one double spaced line after the chapter heading. I'm using someone else's template, and trying to modify it as ...
AJY's user avatar
  • 131
2 votes
0 answers
30 views

titlesec package: using the <wrap> shape, can I separate the label and the title by a vertical bar, even if the title spans multiple lines?

I am trying to create a section that would ideally look something like the following: Where the label and title are entirely separated by a vertical bar. My very naive attempt is this: \documentclass[...
MikeV's user avatar
  • 21
2 votes
0 answers
24 views

Why is there more space after single line table?

This is a simplified code which reproduces the issue. I compile it with: pdflatex --halt-on-error test.tex There are multiple tables placed one after the other with the dual command. When the content ...
Crouching Kitten's user avatar
2 votes
0 answers
175 views

Command to format latex source code?

I've been typsetting this last weeks and my code looked like something garbage. I wouldn't want to manually format this as it is tedious, and I wondered if there is such command to format latex source ...
harieamjari's user avatar
2 votes
0 answers
114 views

ToC appearance to be customized/optimized

Unfortunately a minor problem with my ToC encountered recently. My recent research in the internet was equally unsuccessful. Thats why I ask you for help and I hope there is somebody skilled out there ...
MaximilianP's user avatar
2 votes
0 answers
482 views

How to add text at the start and end of each line?

I would like to add some text at the end of each line. For example, for the input This is a long text that will be split by LaTeX into various lines. I want to obtain This is a long textX Xthat will ...
Alexander Gelbukh's user avatar
2 votes
0 answers
66 views

Howto break columns in mcexam and longtables

Friends! I want to typeset a mcexam (or longtable) in a multicol framework. Is it possible to break columns more properly, i.e. with some variant of \columnbreak? The only workaround I found is using ...
H-J Salchow's user avatar
2 votes
0 answers
34 views

Making selected, isolated siunitx-formatted cells bold in a table

I want to bold selected, isolated siunitx-formatted cells in a table. Generally, I do this with \bfseries and \usepackage{etoolbox}, as suggested in Joseph Wright's answer here. However, in the ...
Andrew's user avatar
  • 1,219
2 votes
0 answers
62 views

Is it possible to concatenate itemized lists?

I am currently keeping track of my research / tasks to do in a LaTeX lab journal. The organization of each day in the Latex code is essentially like the following toy example: \chapter{Saturday, 2nd ...
Jacob Denson's user avatar
2 votes
0 answers
164 views

Change subscript font size in ConTeXt

In ConTeXt, is it possible to make subscript font larger (but not other parts) in math formulas? I'd be happier if it takes effect document-globally. I'm creating a document like this (my real example ...
user avatar
2 votes
0 answers
162 views

What is the difference between \usepackage[margin=1in]{geometry} and \usepackage{geometry}, \geometry{margin= 1in}?

I would like to know the difference between this: \documentclass{article} \usepackage[margin=1in]{geometry} and: \documentclass{article} \usepackage{geometry} \geometry{margin=1in}
Jovin Goh's user avatar
2 votes
0 answers
4k views

LaTeX listings package JSON formatting

I am using package listings for JSON data. I am following this example How to improve listings display of JSON files from this stackexchange answer. It generates the following output: I added caption ...
Raja Ayaz's user avatar
  • 123
2 votes
0 answers
87 views

Formatting multiple characters and glyphs/accents within the same word

As an extension to the macros (\FormatChar - \FormatChars - \ColorNthChar - \colorrange) posted in: Apply command on nth character of a word Emphasizing Arabic text characters Apply command on ...
Silva's user avatar
  • 743
2 votes
0 answers
766 views

Subfile Sectioning number

So I want to write my Script in LaTex and wanted to Structure it using the Subfile Package. I managed to include it and the main.tex file is working as wanted. My problem now is, that when i want to ...
Yannis's user avatar
  • 21
2 votes
0 answers
3k views

Is there a particular way to add an appendix in the Springer LNCS format with LaTeX?

I'm required to add a one-page appendix to an article written in the Springer LNCS format, and I write on Overleaf (where the Springer LNCS template doesn't include appendices). Is there a specific ...
Paw in Data's user avatar
2 votes
0 answers
239 views

Get dots under Section Heading for Custom Beamer Template

I am using a modified version of the ua-theme by Nico Schlomer. https://github.com/nschloe/ua-beamer/blob/master/theme/beamerouterthemeUniversiteitAntwerpen.sty Using the posting on: Navigation bar ...
NM_'s user avatar
  • 355
2 votes
0 answers
73 views

positioning rgb wave bar

What is the code to position the rgb wave bar on the left of page in vertical format? Also when positioned at the bottom of page why does the line at the bottom of page shorten its length--the line ...
js bibra's user avatar
  • 20.3k
2 votes
0 answers
674 views

Extremely weird formatting of text in section

\documentclass[a4paper, 11pt]{book} % Packages \usepackage[utf8]{inputenc} \usepackage{graphicx} % For images \usepackage{titling} % For adjusting white space above headers \usepackage{titlesec} % ...
roaibrain's user avatar
  • 121
2 votes
0 answers
46 views

Render/export latex into non-paper-oriented formats

I use Latex very much and I generate many PDF files. I love the output quality. However I almost never print these PDF files, I always read them from the computer. Thus I find it nonsense to have the ...
user171780's user avatar
2 votes
0 answers
315 views

Formatting code of a tex file output by Lyx

When converting a LyX document to a TeX file, I've noticed that the resulting code is not formatted in a "pretty" way. For example, when writing my own documents in LaTeX, I will tab lines with ...
concertpi's user avatar
2 votes
0 answers
151 views

How to change the zero in increasing numbers with dotted zero?

MWE \documentclass[a4paper,11pt]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \makeatletter \newcommand*{\pmzerodot}{% \nfss@text{% \sbox0{$\vcenter{}$}% math ...
Özgür's user avatar
  • 3,270
2 votes
0 answers
129 views

Automatic paragraph numbering within subsections

I'm attempting to create a similar format to a word document (example attached) within LaTeX but I'm having a lot of issues with achieving. The document is an article and every single single paragraph ...
Scott's user avatar
  • 45
2 votes
0 answers
145 views

Accurately remove whitespace introduced by footer on only the first page

I have a document that has text that very nearly reaches the limits of the page geometry (the document has one centimeter margins). I have a footer (using fancyhdr) on all pages except the first by ...
skyrocket's user avatar
2 votes
0 answers
718 views

Yet another Overfull \vbox

My document is a kind of long thesis that I will not copy paste here. When I compile it, everything goes fine, except for the following warning Overfull \vbox (1.83182pt too high) has occurred while \...
nabla's user avatar
  • 121
2 votes
0 answers
279 views

Easier row grouping on tables

Sometimes I want to group some rows like that: Now I can do that like that: \documentclass[a4paper]{report} \usepackage{geometry} \geometry{a4paper,total={170mm,257mm},left=20mm,top=20mm} \...
Dimitrios Desyllas's user avatar
2 votes
0 answers
110 views

Writing under conditions in a tcolorbox using fontspec

This is my third question in 2 days but Im struggling with a problem and I have the feeling I'm not far from finally solving it, but cannot figure it out myself. I have a document for my students who ...
HerculePoivrot's user avatar
2 votes
1 answer
199 views

Multicol listings and ntheorem rendering wrong

Given the quite long MWE: \documentclass{memoir} \usepackage[dvipsnames,table]{xcolor} %\usepackage[showframe]{geometry} \usepackage{mathtools} \usepackage{needspace} \usepackage{multido} \usepackage{...
markus23's user avatar
  • 345
2 votes
0 answers
59 views

How can I recolor each part of citations in BibTeX?

I can't find a way to color each part of a reference just like the attached image. I am using BibTeX to create bibliographic references along with the style aasjournal.bst, but there are two problems:...
Perfect Fluid's user avatar
2 votes
0 answers
772 views

Is it possible to get the leading spaces in copy/paste from PDF?

Using this solution Only Select Code without Line Numbers I allow the listings to be copyable from PDF w/o the line numbers and many extra spaces. But that also removes the leading spaces used for ...
ajeh's user avatar
  • 2,552
2 votes
0 answers
145 views

How can I customize headings in book-class?

I am writing my master thesis in the book-class in Latex and need some help to format the headings in the document. I have a Word-template from the University which have specific formats of the ...
Emelie's user avatar
  • 21
2 votes
0 answers
649 views

How to move the abstract to the left column?

My question is similar to this question, however, instead of a picture, I wish to move the abstract section to the left column, using same document class. Can anyone help with this? The document ...
lonesome's user avatar
  • 555
2 votes
0 answers
530 views

Changing the Font of Variables in an Equation Using XeLaTeX

I am trying to digitalize a book(130pages) by retyping it all(copy is in a really bad shape to be scanned). I am attempting to use Helvetica Neue as the main font for all numbers and variables on all ...
Ricardo Veloz Jr's user avatar
2 votes
0 answers
153 views

htlatex adding _ after - in URLs

I'm using htlatex on Fedora 21, texlive-tex4ht-svn33024.0-1.1 I noticed that whenever a URL has a hyphen within it, in the HTML output it's formatted with an underscore symbol following -. For ...
mst's user avatar
  • 21

1
2 3 4 5
9