Search found 8 matches

by DryRun
Sun Oct 13, 2019 9:02 pm
Forum: Graphics, Figures & Tables
Topic: How to split long C/C++ code line on two lines without inserting new line number?
Replies: 3
Views: 4721

How to split long C/C++ code line on two lines without inserting new line number?

kaiserkarl13 wrote:You want "breaklines=true" inside lstset.
I'm not sure where to find lstset. I looked inside macros.tex and preamble.tex but i couldn't find it.

I also tried adding

Code: Select all

baselinestretch=1.2,
linenos
breaklines=true
But it gives an error.
by DryRun
Sun Oct 13, 2019 12:20 am
Forum: Graphics, Figures & Tables
Topic: How to split long C/C++ code line on two lines without inserting new line number?
Replies: 3
Views: 4721

How to split long C/C++ code line on two lines without inserting new line number?

I am using the following snippet to insert C/C++ code into my LaTeX document but the problem is that the code on one line is too long and it goes over the right side of the document page. How to split this on two lines? I tried to simply move part of the line to another line but then it also ...
by DryRun
Fri Jul 26, 2019 2:43 am
Forum: Graphics, Figures & Tables
Topic: How to display auto-formatted code in document?
Replies: 3
Views: 3061

How to display auto-formatted code in document?

I also have another problem/question:

At the bottom of each code snippet that i included in my LaTeX document, there is a "Listing 1:", "Listing 2:", etc and i want to change this or remove it, if possible? I can only add a caption to it, but i would like to change it to "Source code" instead of ...
by DryRun
Fri Jul 26, 2019 12:22 am
Forum: Graphics, Figures & Tables
Topic: How to display auto-formatted code in document?
Replies: 3
Views: 3061

How to display auto-formatted code in document?

Thank you for the suggestion. I am now using the 'minted' package and i have several pieces of codes in my LaTeX document. Now, i want to have a list of all the pieces of codes listed in my document and show it in the table of contents such that when i click on the title, it takes me to that section ...
by DryRun
Thu Jul 25, 2019 11:51 am
Forum: Graphics, Figures & Tables
Topic: How to display auto-formatted code in document?
Replies: 3
Views: 3061

How to display auto-formatted code in document?

Hello,

I am new to using LaTeX and i have seen this LaTeX document with this format for C/C++ code. It's mostly just Arduino code and i want to know how can i do the same to display my code with numbered lines and this special font and colour based on code tags? Any ideas? :D
by DryRun
Mon May 20, 2019 12:39 am
Forum: Graphics, Figures & Tables
Topic: How to change the font of the headers?
Replies: 3
Views: 1708

How to change the font of the headers?

Thanks for the hint. I changed it to \textbf :D

The tex file compiles with no errors in Overleaf but i'm puzzled over why this part of the code is highlighted in red:

Code: Select all

$\mathstrut\displaystyle}l<{$}
Is this a deprecated style??
by DryRun
Sun May 19, 2019 8:47 pm
Forum: Graphics, Figures & Tables
Topic: How to change the font of the headers?
Replies: 3
Views: 1708

How to change the font of the headers?

Hi,

How to change the headers so that it is not italic but instead bold?

\begin{tabular}{ @{} l l l >{$\mathstrut\displaystyle}l<{$} @{} }\toprule
\emph{first} & \emph{second} & \emph{third} & \multicolumn{1}{l}{\emph{fourth}} \\\midrule
foo & bar & y=f(x) & data\\
foo & bar & y=f(x) & data ...
by DryRun
Sun May 19, 2019 7:21 pm
Forum: New Members
Topic: Hello from a newcomer and already great admirer of LaTeX!
Replies: 2
Views: 3817

Hello from a newcomer and already great admirer of LaTeX!

Hi,

I discovered LaTeX by looking at other reports at my school from other students, especially those who were doing more advanced classes. Their papers look so nice and clean. I was just a good ole MS Word (is that a banned word here? :D ) user until a few days ago. I started with Overleaf as it ...