Hi there,
we are evaluating the possibility to use Sphinx and rst to document our
projects. What we have is a project structure that would look like this:
./sandbox/project/
├── components
│ ├── module1
│ │ ├── doc
│ │ │ └── module1.rst
│ │ └── src
│ └── module2
│ ├── doc
Hi Mark,
Mark Lawrence wrote:
[]
>>File
>> "/home/debian/repos/2418_IASI-NG/Documents/Tools/tex_tool/venv/local/lib/python3.2/site-packages/progress/bar.py",
>> line 48
>> empty_fill = u'∙'
>>^
>> SyntaxError: invalid syntax
>>
[]
>
> Python 3.0 removed the 'u'
Hi Chris,
Chris Angelico wrote:
[]
>> Python 3.0 removed the 'u' for unicode in front of strings but due to
>> popular demand to ease porting it was reinstated in 3.3. Strip it away and
>> you should be fine to go.
>
> Or upgrade to 3.3 or better; is there anything holding you on 3.2?
> Buildin
Hi everyone,
I've installed the 'progress' module (ver 1.2) and I have the following
error when used:
File
"/home/debian/repos/2418_IASI-NG/Documents/Tools/tex_tool/venv/local/lib/python3.2/site-packages/progress/bar.py",
line 48
empty_fill = u'∙'
^
SyntaxError: inv
Hi Gregory,
Gregory Ewing wrote:
[]
> From a cursory reading of the pypandoc docs, it looks
> like enabling the raw_tex extension in pypandoc will
> give you what you want.
>
> Search for raw_tex on this page:
>
> http://johnmacfarlane.net/pandoc/README.html
As far as I understood the docs, it
Hi Steven,
Steven D'Aprano wrote:
[]
>> The two results are clearly *not* the same, even though the two inp
>> /claim/ to be the same...
>
> The two inp are not the same.
Correct. My statement was wrong.
[]
> I'm sure that you know how to do such simple things to investigate whether
> two inpu
Hi Mark,
Mark Lawrence wrote:
[]
> The two inps are *not* the same.
My bad. I did not notice the difference, thanks for pointing that out.
Al
--
https://mail.python.org/mailman/listinfo/python-list
Hi Steven,
Steven D'Aprano wrote:
[]
>> In [43]: print pypandoc.convert(s, 'latex', format='rst')
>> this is \textbackslash{}some restructured text.
>>
>> since a literal backslash gets converted to a literal latex backslash.
>
> Why is this a problem? Isn't the ultimate aim to pass it through
Hi Dave,
Dave Angel wrote:
[]
>>> or use a raw string:
>>>
>>> i = r'\\ref{fig:abc}'
>
> Actually that'd be:
>i = r'\ref{fig:abc}'
Could you explain why I then see the following difference:
In [56]: inp = r'\\ref{fig:abc}'
In [57]: print pypandoc.convert(inp, 'latex', format='rst')
\textb
Hi MRAB,
MRAB wrote:
[]
> Have you tried escaping the escape character by doubling the backslash?
>
> inp = 'ref{fig:abc}'
In [54]: inp = 'ref{fig:abc}'
In [55]: print pypandoc.convert(inp, 'latex', format='rst')
\textbackslash{}ref\{fig:abc\}
the backslash is considered as literal te
Hi Dave,
Dave Angel wrote:
[]
>> Rst escapes with "\", but unfortunately python also uses "\" for escaping!
>
> Only when the string is in a literal. If you've read it from a file, or
> built it by combining other strings, or... then the backslash is just
> another character to Python.
Holy
Hi Steven,
Steven D'Aprano wrote:
[]
> Since \r is an escape character, that will give you carriage return followed
> by "ef{fig:abc".
>
> The solution to that is to either escape the backslash:
>
> i = '\\ref{fig:abc}'
>
>
> or use a raw string:
>
> i = r'\\ref{fig:abc}'
ok, maybe I wasn't
Hi Dave,
Dave Angel wrote:
[]
> You should be a lot more explicit with all three parts of that
> statement. Try:
>
>
> I'm trying to get a string of
\ref{fig:A.B}
but unfortunately I need to go through a conversion between rst and
latex. This is because a simple text like this:
this is a
Hi everyone,
I'm writing a document in restructured text and I'd like to convert it
to latex for printing. To accomplish this I've used semi-successfully
pandoc and the wrapper pypandoc.
My biggest issue is with figures and references to them. We've our macro
to allocate figures so I'm forced
Hi Chris,
Chris Angelico wrote:
[]
>> Thanks a lot for the hint. Maybe I should seriously think about
>> upgrading the whole distro. It's just that Gnome3 really sucks to my
>> taste and I'm not in the mood to look for another Desktop
>> Environment...(maybe I should go back to CDE).
>>
>
> This
Hi Wolfgang,
Wolfgang Maier wrote:
[]
> I have pandoc 1.12.2.1 and it recognizes the figure directive just fine
> (tested with html output so I cannot say anything about LaTeX).
This reminds me that I need to move sooner or later from squeeze to
wheezy...
Do you know of anyway to install whee
Hi everyone,
I'm trying to convert restructured text to latex with pandoc and it
seems to me there's something not correctly working.
I have the following text:
.. figure:: picture.png
:scale: 50 %
:alt: map to buried treasure
This is the caption of the figure (a simple paragraph).
Hi Peter,
Peter Otten <__pete...@web.de> wrote:
[]
> Let's start with the simplest:
>
>> Peter Otten <__pete...@web.de> wrote:
>
>>>def show2(self):
>>>yield str(self)
>>>for child in self.children:
>>>yield from child.show2()
[]
>
> Given a tree
>
> A --> A1
>
Hi Peter, I'll try to comment the code below to verify if I understood
it correctly or missing some major parts. Comments are just below code
with the intent to let you read the code first and my understanding
afterwards.
Peter Otten <__pete...@web.de> wrote:
[]
> $ cat parse_column_tree.py
> i
Hi MRAB,
MRAB wrote:
[]
>>> SyntaxError: invalid syntax
>>> debian@debian:example$ python3 export_latex.py doctree.csv
>>> File "export_latex.py", line 36
>>> yield from child.show2()
>>> ^
>>> SyntaxError: invalid syntax
>>
>> and I've tried with both python and python3 (see b
Hi Tim,
Tim Chase wrote:
[]
>> I know about the xlrd module to get data from excel
>
> If I have to get my code to read Excel files, xlrd is usually my
> first and only stop.
>
It provides quite a good interface to manipulating excel files and I
find it pretty easy even for my entry level!
>
Hi Peter,
Peter Otten <__pete...@web.de> wrote:
[]
>def show2(self):
>yield str(self)
>for child in self.children:
>yield from child.show2()
here is what I get:
> SyntaxError: invalid syntax
> debian@debian:example$ python3 export_latex.py doctree.csv
> File "e
Hi Peter,
Peter Otten <__pete...@web.de> wrote:
[]
> You can save the excel sheet as csv so that you an use the csv module which
> may be easier to use than xlrd. The rest should be doable by hand. Here's
> what I hacked together:
>
> $ cat parse_column_tree.py
> import csv
>
> def column_inde
Hi everyone,
I've a document structure which is extremely simple and represented on a
spreadsheet in the following way (a made up example):
subsystem | chapter | section | subsection | subsubsec |
A | | || |
| func0 | |
Hi everyone,
I'm looking for a kbhit/getch equivalent in python in order to be able
to stop my inner loop in a controlled way (communication with external
hardware is involved and breaking it abruptly may cause unwanted errors
on the protocol).
I'm programming on *nix systems, no need to be porta
25 matches
Mail list logo