In LaTeX, the code
\bibliography{/Users/Name/Library/Mobile Documents/com~apple~CloudDocs/Academic/Research/Bibliography/Bib.bib}{}
does not render the reference list. When I use
\bibliography{/Users/Name/Library/Bib.bib}{}
it does. So I thought the problem is the space in "Mobile Documents". Therefore I used
\bibliography{"/Users/Name/Library/Mobile Documents/com~apple~CloudDocs/Academic/Research/Bibliography/Bib.bib"}{}
and it does not work. Where am I making the mistake?
To avoid all possible conflicts with special characters like spaces and ~, you could use a relative path. In your specific case this would mean
\bibliography{../../../Bibliography/Bib}
which means going 3 directories upwards and then into the Bibliography folder.
Related
I want to read in a list of files (inc path) from either a spreadsheet or a text file for some downstream processing. The list has been generated as a log from another process and the path includes a 2 digit year folder followed by a project number folder as follows:
\\servername\projects\19\1901001\project files\filetobeprocessed.abc
The problem is as soon as the above string is read in, it is interpreted as
\\servername\\projects\x019\x01901001\\project files\x0ciletobeprocessed.abc
Which then means that I cannot use the path to access the file.
Assigning the path string to a variable, I have tried:
thePath = repr(pathreadfromfile)
After assigning the path string I have tried fixing the string using
thePath.replace('\x0','\\')
thePath.replace('\\x0','\\')
thePath.replace(r'\x0','\\')
Nothing seems to fix the path so that it can be used to open the file.
I can't find anything in either python or Ironpython that suggests a fix for this programatically. I know that you can fix this is the path is known within the code by using r'' to use raw text to create the path.
Any help appreciated
Obviously, the backslash \ is interpreted as an escape character.
For a really simple solution, hopefully the simplest, I would suggest using forward slash / for all your path separators instead of backslash.
If you really need the backslash somewhere further down the road, you can replace them back again.
This should be pretty simple I need know what dots mean in a url such as "../../../Program Files (x86)/Filed/examples/tmw_desert_spacing.png"
I'm assuming this is some kind of shorthand that means "the same as the current directory"/etc/folder/file.png a link to an article that explains this would be nice too, my google search turned up nothing since im not even sure this is called a url. thanks
more info: the program im writing won't except this as the file name, I need to konw what need to change to become acceptable.
According to RFC 3986:
The path segments "." and "..", also known as dot-segments, are
defined for relative reference within the path name hierarchy. They
are intended for use at the beginning of a relative-path reference
(Section 4.2) to indicate relative position within the hierarchical
tree of names.
The takeaway is that they have the same meaning as in paths on a linux or windows system - single dot means "the directory specified by the preceding part of the path", two dots mean "the parent directory of the directory specified by the preceding part of
I have a doubt about indicating a path in makefile and I'd like to have a clarification.
Suppose my structure is made this way:
/home/machinename/softwarefolder/mainfolder
--------------------------------------------> /subfolder1
--------------------------------------------> /subfolder2
This means that both subfolder1 and subfolder2 are at the same nesting level in /mainfolder.
Now I'm compiling something inside subfolder 2 (this means that I cd to that folder) that uses a configure file with a macro pointing to a path that, in my case, it's in subfolder1.
This configure file used by the program in subfolder2 to compile is generated automatically by the program itself after running ./configure
The automatically generated configure file has the macro defined this way
MACRO = ../subfolder1
Do the two dots (..) indicate, as in the cd command, "go back one step" (and, therefor, the configure file is pointing to the right folder)?
If the answer to the first question is "no", then why substituting the aforementioned macro with
MACRO = /home/machinename/softwarefolder/mainfolder/subfolder1
generates a "missing separator" error in compile-time?
Sorry for the probably trivial question and thanks for the help!
Make doesn't interpret the content of variables in any way, for the most part. The question of how the .. will be interpreted depends entirely on where the variable is used. If it's used in a place where a path like ../subfolder1 makes sense, then that's how it will be interpreted. If not, not.
Since you don't show how $(MACRO) is used, we can't help. But in general the answer to your question is "yes, it means go up to the parent directory".
As for your second question, there is no way I can envision that changing just that one line will result in a "missing separator" error. Maybe your editor "helpfully" made other changes to the file such as removing TABs and substituting spaces, or adding TABs? TAB characters are special in makefiles.
If you want help with the second question you must provide (a) the exact error you received (cut and paste is best), and (b) the exact text of the rule in the makefile at the line number specified in the error message.
Bet you didn't see this coming? ;)
So, a project of mine requires that I specifically read and make sense out of .htaccess files.
Sadly, searching on Google only yields the infinite woes of people trying to get their own .htaccess to work (sorry, couldn't resist the comment).
Anyway, I'm a bit scared of trying to get this thing out of open-source projects that use it. See, in the past few weeks, I ended up wasting a lot of time trying to fix my issues with this strategy, only to find out that I did better to read RFCs & specs and build the thing my way.
So, if you know about a library, or any (hopefully clean!) code that does this, please do share. In the mean time, if you know about any articles about .htaccess file format, I'm sure they'll be very handy. Thanks.
NB: I'm pretty much multilingual and could make use of any codebase, even though the end code will be Delphi. I know I'm asking too much, but I'd love to see less of C++. Just think of my mental health before sharing C++ code. :)
Edit: Well, I think I'm just going to do this manually myself. The file structure seems to be:
directive arg1 arg2 argN
<begin directive section>
</end directive section>
# single line comment
.htaccess grammar is actually the exact same as the Apache configuration itself, and example parsers do exist for it.
If you're looking to write your own, you are mostly correct on the format. Remember, section tags can be nested and can have parameters (like <Location />)
English method of parsing:
For each line in the file:
Strip whitespace from beginning and end of line.
If the line starts with a '#':
Parse it as a comment (or skip it)
Else, If the line starts with a '<':
If the next character is a '/', the line is a closing tag:
Seek to the next '>' to get the tag name, and pop it from the tag stack.
Else, the line is an opening tag:
Seek to the next '>' for the tag name.
If the tag, trimmed, contains whitespace:
Split on the first whitespace. The right side is params, left is the tag.
(IfModule, Location, etc use this)
Push the tag name to the tag stack.
Else, the line is a directive:
Split the line on whitespace. This is the directive and params.
Just add quote handling and you're set.
I have some graphic files with some rather long filenames which includes several periods. includegraphics interprets the first of these as the beginning of the file extension, which makes it impossible for it to guess the proper graphics extension. A typical error message is
LaTeX Error: Unknown graphics extension: .9332.1dwc_kpl_h.log.png
One solution is to rename all files, but they are generated by another program, and I would rather use the naming scheme from there. Is there a way to tell graphics what the image format is, such that the extension will be ignored?
You can also hide the dots from LaTeX by putting extra curly braces in:
\includegraphics{{my.file.with.dots.in.it}.png}
(from https://tex.stackexchange.com/questions/10574/includegraphics-dots-in-filename)
Use the grffile package.