Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [underscore]

A package for allowing hyphenation in words containing underscores

0
votes
0answers
27 views

tcolorbox tcblinputlisting unexpected behavior when filenames have spaces and/or underscores

I'm not a Latex expert, so I reached the limit of my knowledge in the tracking down of this problem. If someone can shed some light into this problem I think it would be very useful. The Problem ...
1
vote
2answers
40 views

How to keep a link with underscore stable when inserting the pdf?

I'm setting up my job application portfolio, and want to link my email address. However, when I insert the pdf with the linked email address to my portfolio, the link does not work properly anymore. ...
1
vote
2answers
41 views

Gradient notation spacing

I'd like to notate 'gradient of L with respect to a_f' which I can do with \nabla_{\mathbf{a}_f} \mathcal{L} and it looks like this: Look at all that space between the nabla and the L! Is there a way ...
4
votes
2answers
613 views

When are underscores allowed and when are they not allowed?

I used to think that the behavior of underscores ('_') was as follows: IF ('_') { BUFFER NEXT ITEM MAKE THE NEXT ITEM A SUBSCRIPT SEND SUBSCRIPT TO OUT STREAM } ELSE IF ('\_') SEND ...
0
votes
2answers
35 views

Missing { inserted: but no parenthesis is missing

Good evening everybody, I already searched for this problem but didn't find a solution. When compiling my LaTeX file, the error "Missing { inserted" appears but everything seems to be ok with the ...
1
vote
1answer
23 views

Disable linebreaks in \texttt while using underscore package

The \texttt normally does not lead to automatic hyphenation or linebreaks. However, it apparently does when using the underscore package: \documentclass{article} \usepackage[nohyphen]{underscore} \...
1
vote
0answers
35 views

Problem with absolute path and [ngerman] babel?

I want to get rid of relative paths and defines a new command which point to the root folder of my project: \providecommand{\myPath}{C:/Users/xxx/Google Drive/WS_1819/Bachelorarbeit/_new/} However, ...
1
vote
1answer
514 views

Underscore in URL breaks link in pdf

I have a footnote with a long url containing an underscore, like this: \footnote{\url{http://www.example.com/somethinglong_somethingotherlong}} The link appears in the pdf, but it is broken off ...
2
votes
1answer
102 views

How do I escape an underscore in the caption of a code listing, within a macro?

I use this macro to include Matlab code in my document: \newrobustcmd{\inputmatlabcode}[1]{\lstinputlisting[basicstyle={\scriptsize \ttfamily}, caption=#1, language = matlab]{#1}} It fails when I ...
1
vote
0answers
34 views

lstlisting with SuperCollider language - cannot use underscore character [duplicate]

The following fails: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{listings} \usepackage{sclang-prettifier} \begin{document} \begin{lstlisting}[style=SuperCollider-IDE] current = x[...
1
vote
2answers
363 views

\includegraphics with spaces, dots and underscores

I've already tried 10 billion advices like using \usepackage{grffile}, wrapping the filename into {} and/or "" (in any combination). Nothing is working! So, I have a file with path plots/task-1/...
4
votes
1answer
34 views

Substitute string within lstinputlisting command

listings's package command \lstinputlisting should have the following syntax for filenames with underscores: \lstinputlisting[caption={a\_b.mat}]{a_b.mat}. I would like to automate the process of ...
1
vote
2answers
55 views

modify default underscore behaviour/interpretation

Is there any way to modify the default in-text underscore behaviour document-wide? I'm utilising a lot of filenames, IDs and so on which often have underscores in, and LaTeX doesn't like this (...
2
votes
1answer
469 views

Importing csv Table with Underscores

I have to import a csv table whose entries contain underscores. A simple example is the following table: FirstCol, SecondCol Item_A, Item_B I am trying to solve my problem with the csvsimple package ...
2
votes
1answer
188 views

Use hyphenation command with underscores

I have words in my text that contains underscores and that exceeds the boundaries of the page the word is typed in the text as FOS\_SOCIAL\_SCIENCE I want the word to be able to hyphenate at the ...
1
vote
0answers
35 views

Good looking underscores with LuaTex and fontspec [duplicate]

I'd like to have shorter underscores with LuaTex and fontspec. And the vertical position of the underscores is too low compared to not using fontspec. Do I have to use some other setup than fontspec. ...
5
votes
1answer
7k views

Underscore in bibtex url

I'm trying to include a link to some code on OneDrive; the link includes an underscore, which is causing a lot of trouble. I tried adding the entry like this: @misc{code, title = {Code}, url ...
0
votes
1answer
87 views

Globally prevent hyphenation of word with underscore

I'm trying to prevent a word that contains an underscore to be hyphenated. I have tried: \hyphenation{Word\textunderscore With\textunderscore Underscore} \begin{document} \end{document} Improper \...
2
votes
2answers
138 views

long underscore before the number in enumerate environment

I am making a simple exam using the code below: \begin {document} \begin{enumerate} \item Text here \item Text here \item Text here \end{enumerate} \end {document} I want to put a long underscore ...
3
votes
2answers
360 views

How to italic the first letter of a word in \verb|| structure

How italic the first letter of a word in \verb|| structure? Suppose that I want have italic (or underscore) for G in \verb|Good|.
2
votes
1answer
286 views

Increase underscore

I have the following document: \documentclass{scrartcl} \usepackage{underscore} \usepackage{mathptmx} \usepackage[T1]{fontenc} \begin{document} TLXV\rule{.5em}{.4pt}AAB % this looks better! TLXV_2 %...
1
vote
0answers
32 views

Underscore in Pathway

I'm beginning with Latex and I want to add some JavaCode in it. My source code is in "D:\Eclipse_Projects\Algorithimique\src\s09" but I think the underscore is making trouble. I use the following code ...
1
vote
1answer
157 views

Is it safe to set underscore to a non-active character?

I am looking for wisdom i.e. potential side-effects that I may not have considered.. Underscores are quite common and irritating for inexperienced LaTeX users to escape. Let's assume that I have no ...
2
votes
1answer
607 views

How can I make the underscore character letter-like/“inactive”?

I want to write some text - not within a \verb - in which underscores can appear and will be treated just like the letters. This requires some low-level TeX magic which I don't know - maybe something ...
4
votes
1answer
762 views

svg package \includesvg with underscores in sgv

I have an SVG file that includes text with underscores. When I include the svg with the \includesvg command (from svg package), I get an error that results from the .pdf_tex file containing text with ...
0
votes
3answers
438 views

How to solve this error (missing $)

This error keeps popping while making my table: ! Missing $ inserted. <inserted text> $ l.196 \textit{E} & 13.21 \cdot\rho_{dry}$+0.73 \cdot $\% Min$-0.06$\cdot$ ...? ...
1
vote
0answers
97 views

Underscore problem with long statement [closed]

I am writing a thesis, in which I have to add a a long statement, which look like this a_b/a_b_r_M_M_l_o_f_A_a_A_A_A_Y_X_C_V_B_N_W But to handle the underscore I added the above statement as follow ...
2
votes
2answers
100 views

Using xstring IfStrEqCase and underscores causing problems

I'm using xstring (and \IfStrEqCase) to choose from a set of file paths (as the bellow example). I have two problems: Even if package documentation states that underscore is allowed, if I introduce ...
1
vote
1answer
760 views

Using underscore for subscript in text mode using underscore only [duplicate]

I want to use subscripts without actually being in math mode. N_A is Avogadro constant instead of $N_A$ is Avogadro constant Is there any method I can do that?
0
votes
1answer
267 views

Remove underscores from filename

I am using currfile package to get the file name. My file name has the form "code blah blah blah.tex" what is being displayed is "code_blah_blah_blah.tex" How can I remove the underscores? Here ...
1
vote
1answer
498 views

Dots in filename, underscores in extension [closed]

I have the following svg I want to include, that I've nicely converted to a pdf following How to include SVG diagrams in LaTeX?. Now I want to include it in my document, however the document's name ...
1
vote
1answer
2k views

space before \_ in Equation

\begin{equation} \begin{aligned} CPU\_time=\sum\limits_{i}^{n_1}{T\_int_{i}}+ \sum\limits_{}^{n_2}{T\_exe_{i}}+\sum\limits_{}^{n_3}{T\_gc_{i}} \end{aligned} \label{eq:cputime} \end{equation} will ...
1
vote
0answers
180 views

Small index left to the left bracket

I want to know how to make the underscore "3" placed to the left of the left bracket. Also, in the image it is quite far away. How to make it closer? Thanks.
2
votes
1answer
452 views

Underscores in function arguments seem to change file names

I have been trying to pass a file name that contains underscores to a couple of nested commands. Since escaping each and every _ isn't really an option, I thought a group \catcode_=12 (had to remove ...
2
votes
1answer
92 views

Cannot emphasize underscored words in listings

I declared an emphasis mode that underlines and colors words in red, as follows: \lstset{columns=fullflexible,basicstyle=\vttfamily,emph={\color{red}\underline}} However, when using it in a ...
1
vote
1answer
405 views

pgf-umlcd: underscore in class name failing

I have a simple class diagram drawn with pgf-umlcd, but using an underscore within the class name leads to an error message. \begin{tikzpicture} \begin{class}{foo\_bar}{0,0} % some stuff here ...
2
votes
1answer
2k views

How can I use underscore in listings package properly?

I understand that underscore is a special character in LaTeX, but how can I input underscores within lstlisting blocks without changing the code block itself? Here is a short example: Settings: \...
4
votes
2answers
453 views

How to use tkz-graph with syntax and underscore?

The document below is compiled without error. However, an error (I pasted it at the end) is raised if I uncomment any of the commented lines. Is there a trick to avoid this error? \documentclass{...
3
votes
2answers
155 views

hyphenation of long words in twocolumn template

I would like to have control on how Latex hyphenates long words. In my example it tries to have a right handed alligment of the paragraph but by doing so it creates big spaces. How do I get rid of ...
3
votes
1answer
35k views

How can I write an under dash in text without invoking italics or some weird font? [duplicate]

I would like to simply write a _ in latex. But when I compile it is makes the text afterwards italic and weird, how can I just write an under dash? For example: \indent Locate the file in /lbne/app/...
2
votes
1answer
311 views

newcommand for double underscores without space with listing package

I know, the similar questions have already asked and (most correctly) answered too. But I am getting stuck while writing __log or __inti__ in the block diagram or in text. The simplest solution ...
1
vote
0answers
233 views

gitinfo/gitinfo2: how to work around errors with underscores in git tags/branches? [closed]

Using the gitinfo2 package, I've run into errors which appear to originate from git tags or branch names that contain underscores. These would need to be escaped for LaTeX, gitinfo2 commands such as \...
5
votes
1answer
957 views

How to use underscore in a variable

I have a variable x which takes different names including underscore, for instance 1_10. Later, I want to use that variable as the title of a picture: \caption{\x} However I can't do that because ...
3
votes
1answer
3k views

To escape underscore without \verb and \texttt [duplicate]

I know this thread which implementation is about verb and \texttt such that you have something inside the phrase. I do not want to change the phrase at all. I want to have this as text in my ...
4
votes
1answer
438 views

Replace underscore in macro implementation?

I'm working on a document that contains a set of sections describing some technical objects. The object names contain underscores (very common in that programming environment), so I've loaded the ...