I am writing a sphinx rst table and one of the cells contains a certain symbol that errors.
Here is an example:
+--------+---------+
| Test | Field |
+--------+---------+
| |$| | Errors |
+--------+---------+
This results in ERROR: Undefined substitution referenced: "$"., even though this is the symbol I want in my table. It still shows up in the resulting documentation though.
|x| is recognized as a substitution reference, using \ to escape it should work for you.
+--------+---------+
| Test | Field |
+--------+---------+
| \|$| | Errors |
+--------+---------+
The solution I found was to simply surround |&| with two backticks:
``|$|``
It does make the text monospace, but it doesn't bother me. I no longer have the error in my console.
Related
+---------------+---------------+--------------------+
| Right | Left | Centered |
+==============:+:==============+:==================:+
| Bananas | $1.34 | built-in wrapper |
+---------------+---------------+--------------------+
I used the standard command
pandoc test.txt -o test.pdf
But I get the above unrendered text. Am I doing something wrong here?
I am new to pandoc tables. Are grid tables fundamentally different than other tables supported by pandoc markdown?
I managed to render this adapted version in stackedit.io
| Right | Left | Centered |
|-:|:-|:-:|
| Bananas | $1.34 | built-in wrapper |
And your version in pandoc/try, which did work as expected. Try specifying the input and output format, and also try a different output format to see if that works.
I'm trying the following and unable to get the desired results:
cat sfd_log.txt | grep '12/*/17' | more
My objective is to get all December 2017 entries from the file. Thank you.
grep uses (optionally extended) regular expression syntax. Bash uses globbing. Similar enough to be confusing, but different enough to be important:
grep '12/.*/17' sfd_log.txt | more
Or, more precise if you like:
grep -E '12/[0-9][0-9]?/17' sfd_log.txt | more
What you actually asked for with "12/*/17" is:
a literal '12' followed by 0 or more literal '/' followed by a literal '/17'".
It should be clear to know (for a human) what I want this ditaa-input file to look like
/---------------------------\
| TEST |
+--------------+------------+
| foo() | "yuck < 3" |
+--------------+------------+
| bar() | NEVEREVER! |
+--------------+------------+
| antlioneater | (x>5) || d |
\--------------+------------/
But it doesn't. Look at the less/greater signs. Plus, that is one out-of-shape antlioneater!
What am I doing wrong? I invoked ditaa v0.9 as ditaa -E -e utf8 test.txt.
I suggest using another character that looks like it, for example ‹ and ›.
It's a bit of a trick, but since the output of ditaa is an image anyway, having a visually similar character is usually good enough.
I personally use this to embed HTML markup in my ditaa charts.
Ditaa parses > and < as arrow heads even if they are not attached to a line ( --> ), hence the weird rendering. It's unfortunate, but that's how it is!
I have created a file with contents as given below.
+---------------------------+
| Tasks
+---------------------------+
| 1) option one
| 2) option two
+---------------------------+
But it is not displaying anything while I am trying to run the following command
cat < filename
Please help me to solve this.
Thanks in advance.
Use cat filename. The redirection isn't necessary.
(You could do cat - < filename also).
I'm writing a program where at some point in my loop I want to print to output whatever is stored in a separate file (an image). But if I code it like this:
for c in $LIST
do
clear
./image.0
done
And the "image.0" file contains only an image like this:
+----+
| |
|
|
|
|
|
========
Then when I run my program I get this message:
./image.0: 1: +----+: not found
./image.0: 2: Syntax error: "|" unexpected
Why?
================================
So "cat" works, the image appears in the output but it's shifted in a strange way.
Do you know why this would happen?
+----+
| |
|
|
|
|
|
========
Answer: I put printf "\n" that fixed the shifting image
With ./image.0, you tell the shell to execute the image. You want to output it, so use cat image.0
Try to use the command cat to output the content of the image.0 file
cat ./image.0
./something will take something as a program and execute it. That's not what you want : to display the contents of a file, you can use the cat command, like this :
for c in $LIST
do
clear
cat image.0
done