As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [coding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

breakline is not working for lstlisting package while none option in hyphenat package used

The below code is the tex file content, which has listings package. \documentclass[12pt,a4paper]{report} \usepackage{hyperref} \usepackage[english]{babel} \usepackage{xcolor} \usepackage{listings} % ...
Nandy's user avatar
  • 23
0 votes
1 answer
45 views

Simplex equations using LaTeX

I am completely new to LaTeX. Can anybody help me in showing how to write simplex equations using LaTeX. ie z= 3x(1) +5x(2) and x(1)<=4 etc
Garry's user avatar
  • 9
0 votes
1 answer
88 views

Should we really use csname?

Over time have seen csname but I never had to learn it until now. But after reading @egreg's (beautiful!) answer to What exactly do \csname and \endcsname do?, I am not so sure if this is good coding. ...
AD - Stop Putin -'s user avatar
1 vote
1 answer
143 views

Taking screenshots of Java code from IDE to Latex (Text being to small)

I have been trying to make the screenshot of my code fit the document better, where it fills from side to side, without being stretched as a "background" Any idea of how to implement it? ...
Christian K's user avatar
0 votes
1 answer
103 views

Numbering Theorems by Subsections

I want to make my theorems to be numbered by subsection, for example after subsection 4.1 I want the next theorem to be numbered as 4.1.1 but instead I get the numbering only by the section itself. Is ...
Yehonatan Cohen's user avatar
2 votes
2 answers
357 views

Creating a new symbol in LaTeX

I would like to create a symbol for a function in LaTeX, like this: Can someone help me? It would have to look like this:
AlgebraicPotato's user avatar
1 vote
0 answers
42 views

Just Beginning, need some help! InfiniTeX Problems?

I am just getting started in learning LaTeX! However, when I am writing some "code" to compile I am running into an error message. It could be the editor that I am using, for reference it is ...
Matt's user avatar
  • 11
1 vote
1 answer
201 views

T1 fontenc with utf8 inputenc don't behave well together in the output pdf

if I use the following document \documentclass[11pt, a4paper, english]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \begin{document} Why is this output so strange öäü at zoom ...
ZPlaya7's user avatar
  • 79
1 vote
0 answers
120 views

Add style to pseudo-class keywords in CSS with listings

Problem: Adding specific color to pseudo-class keywords in CSS using listings. For example, the pseudo-classes :link, :visited, etc should be colored differently. Minimal Working Example (MWE): \...
kexxcream's user avatar
  • 2,743
2 votes
3 answers
233 views

please tell me how to write this equation in Align, I tried coding below but got errors

\begin{align*} c\sup_{L>0,L\in \mathbb{Z}}\biggl[ \biggl{ \sum_{k=-\infty}^{-1}2^{(k \alpha_1(0) -L \lambda) q_1(0)}biggl ( \sum_{i=k-5}^{+\infty} \lambda_i \norm{a_i}_{p_1(\cdot)} \biggr )^{q_1(0)}...
Shoaib Assar's user avatar
1 vote
1 answer
312 views

animateinline problems

I have a couple of problems regarding an animation in latex 1) The animation flicker while it runs 2) The animation is shown as a sliding window, I would like to keep the already played ...
Jesper Hagelskjær's user avatar
0 votes
1 answer
782 views

Coding formatting (C language)

I have a code in C language. I wish to set the margin numebers and the symbols (e.g., (, ), {, }, =, >, etc.) in white. I am working using the following format, but without any real result. \...
Gianni Spear's user avatar
1 vote
0 answers
75 views

Is there a way to impose/automate coding style?

I am wondering if there is a way to impose coding style in editors (TeXstudio etc.), or to get it automatically formatted, in order to have always code as clean as in C or Python, for instance.
jjrr's user avatar
  • 123
2 votes
1 answer
105 views

Line breaks in code affecting outcome appearance (boxes)

I fear the answer to my question might be obvious to many of you, still I couldn't explain it to me. Using a parbox in an fbox and changing the textcolor works out as desired. But I came across a ...
MaK's user avatar
  • 94
1 vote
0 answers
49 views

Unwanted coding shown next to inserted images on PDF, have no idea why? Pictures and code shown in description

Have this problem for all images except this one: I have tried PNG and Jpeg files, same problem. Here is the code us for the "count final.jpg" \begin{figure}[htp] \centering \includegraphics[width=...
Giorgio Scrocca's user avatar
1 vote
0 answers
90 views

Can I code within latex? [closed]

I want to make a slide show that displays different slides depending on input that I give it. Simple example: Given n, display 2n. Can Latex do this? The idea is that the values in the slideshow will ...
Jack's user avatar
  • 11
11 votes
1 answer
5k views

Specific color for different tags and comments using Listings package

Problem: The > symbol for HTML tags in the MWE has a different color than the < symbol. Would like to have both the same color. Minimal Working Example: \documentclass{scrreprt} \makeatletter ...
kexxcream's user avatar
  • 2,743
1 vote
0 answers
1k views

Define listings for PHP [closed]

Problem: 1) Getting the following error messages: (a) Package Listings Error: Couldn't load requested language (b) Package Listings Error: language phpalsodigit undefined. 2) Unable to figure out ...
kexxcream's user avatar
  • 2,743