• manuguerra

    Hello,
    I am using a workflow in Editorial to generate and preview html code.
    In my code, I have a textarea (embedded in two div, if this matters) and I need to get the text of the textarea when the user "clicks" on a specific button.
    In JavaScript this is usually done with document.getElementById(obj).value, but this does not work in Editorial. I have tried also innerHTML, and as expected it does not work as well.
    In the same script, I can successfully use document.getElementById(obj).style.display or document.getElementById(obj).name, so the problem is in "value".

    Any hints? Any way to get the textarea content?

    Thanks,
    Maurizio

    posted in Editorial read more
  • manuguerra

    Thanks JonB,
    this has solved the problem.
    Cheers

    posted in Editorial read more
  • manuguerra

    I found the problem and in fact document.getElementById(obj).value works as it should.
    I am getting an empty result because in the textarea there is markdown code with a leading "#", and everything after the hash is not captured.

    Can anyone help with this?

    posted in Editorial read more
  • manuguerra

    Newbie question:
    The current version of Pythonista (1.5) comes with Sympy 0.7.4.1, but I need version 0.7.5.
    I have downloaded the newest version of the module using the script installsympy at https://gist.github.com/henryiii/9011826 and I can see a sympy folder in Pythonista.

    How can I import the newest version?
    "import sympy" imports the builtin version, and renaming the folder to something like sympy2 and then importing it gives me conflict errors.

    What is the right way to do this? absolute_import?

    Thanks

    Update:

    If I try:

    from . import sympy
    

    I get:

    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    ValueError: Attempted relative import in non-package

    posted in Pythonista read more
  • manuguerra

    Thanks that worked!

    posted in Pythonista read more
  • manuguerra

    Thanks for the reply JonB.
    Using sys.path.append does not solve the problem.
    Honestly I am a bit in the dark (i.e. am a complete newbie), so I run sys.path.append('.'), sys.path.append('..') and sys.path.append('sympy'), not knowing which one was the right one (and killing Pythonista each time to stay on the safe side).
    In all cases,

    import sympy
    sympy.__version__
    

    gave 0.7.4.1
    What am I doing wrong?

    posted in Pythonista read more
  • manuguerra

    It should work. Be sure to manually download the workload backup files tapping on them. By default they are not downloaded, and are in fact grey, not black.

    posted in Editorial read more
  • manuguerra

    I have not been able to find this information, sorry if it has already been answered.
    Is there a way to programmatically scroll at the end of a textview? I know how to do that for a webview, but have no clue for a textview.
    Thanks

    posted in Editorial read more
  • manuguerra

    If "html" is the html code to show:

    htmlshow='<body onload="window.scrollTo(0, document.body.scrollHeight);">'+html+'</body>'
    v['webview1'].load_html(htmlshow)

    posted in Editorial read more
  • manuguerra

    Hi @mcburton,

    Thanks for your bibtex workflow, I happily use it with Papers 3 for iOS (which can now export bib files).
    It is part of my academic writing together with my md->html_tex workflow. If interested, my workflow is able to create html and tex files taking care of local and remote images, tables, formulas, etc.
    The html file can then be opened in another app or uploaded to a web service (e.g. for students or collaborators), while the tex project is zipped with the images and can be then be imported in TexPad or TexWriter.
    Both papers and presentations are supported. For presentations, deck is required (either locally or on the remote server) for html files and beamer is used for tex files.

    Cheers

    posted in Editorial read more

Internal error.

Oops! Looks like something went wrong!