-
Notifications
You must be signed in to change notification settings - Fork 64
Manual for Versions 3.x
- Current issues
- How to report a bug
- Supporting
- Requirements
- Installation
- Pictures
- Presentation
- Shapes
- LaTeX text rendering
- Editing shapes
-
Check with and without the hardware acceleration. To do so, go in the preferences, in the quality tab, and check/uncheck the OpenGL check box. This option may lead to glitches with some graphical cards. If you cannot access the preferences through the user interface (e.g. the screen is white without any widget accessible), you can modify the preferences file that is located: ~/.latexdraw/.preferences.xml on Linux; AppData\Local\latexdraw.preferences.xml on Windows (AppData may be a hidden directory); /Library/Preferences/latexdraw/.preferences.xml on MacOSX. Then, modify or create the .preferences.xml file as explained here.
-
Installation on Linux+Wayland. On Linux with Wayland, the installation will fail since Wayland forbids graphical applications to run in sudo/su mode. See this discussion. The workaround consists of installing LaTeXDraw using a X11 session, or manually (see below). We will fix that in a next release.
-
Characters not supported. Some languages are not fully supported yet (chinese, thai, etc.). To overcome this issue, you can use specific LaTeX packages to work with PDFLaTeX (see the discussion on this problem):
\usepackage{CJKutf8}
\newcommand*{\CH}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
\newcommand*{\JA}[1]{\begin{CJK}{UTF8}{ipxm}#1\end{CJK}}
\newcommand*{\KO}[1]{\begin{CJK}{UTF8}{mj}#1\end{CJK}}
Before reporting a bug, please check the following elements:
-
Make sure you use the latest LaTeXDraw version.
-
Make sure that 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.
-
For Linux users, make sure you use the OracleJDK and not the OpenJDK (that does not work correctly). I know, Oracle is Evil regarding open-sourcing, but I had so many problems related the OpenJDK that I now advise the use of the OracleJDK.
-
Did it work with the previous release? Please download the previous version and check whether the problem was already here.
-
Do you have LaTeX and some required packages installed? The required packages are:
pstricks
,pstricks-add
,pst-grad
,pst-plot
,geometry
,pst-tools
. -
With MikTeX, check that 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:
-
Did you look at "the current issues" section?
-
Does the problem still occur using the latest development version? See here to download it for Windows and Linux and here for Mac.
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 either here: https://launchpad.net/latexdraw, the official bug report system, or here: https://sourceforge.net/p/latexdraw/bugs/?source=navbar
You can support this software by making a donation, reporting bugs, or translating it.
To run latexdraw, Java 8 (at least) must be installed. You can check your Java version here: https://www.java.com/en/download/installed.jsp.
To produce LaTeX documents using PSTricks, LaTeX and its PSTricks package must be installed. On Windows using Miktex, you can use the package manager to look for pstricks. On linux, and usually with texlive, search for a package pstricks, such as texlive-pst-tools.
On Windows you must use the install_windows.vbs to install LaTeXDraw. This script activates the "run as administrator" feature to install files in dedicated directories such as "Program Files". It may ask you your password.
On Linux, the script install_debian_ubuntu will ask administrator privileges before launching the installer. This script simply runs gksu 'java -jar installer.jar'. Warning: on Fedora 25 with Wayland, the installation will fail since Wayland forbids graphical applications to run in sudo/su mode. See: https://bugzilla.redhat.com/show_bug.cgi?id=1274451 The workaround consists of installing LaTeXDraw using a X11 sessions, or manually (see below). We will fix that in a next release.
On MacOSX, try to run the file installer.jar directly. A Mac app bundle is now available so that you should not use this installer. See: https://sourceforge.net/projects/latexdraw/files/latexdraw/
If you want to manually launch the installer (i.e. without through a script as explained above)
in a console, the command is java -jar installer.jar
(but you must have admin rights).
The shared templates are located in the following folder:
- for Unix,
/usr/share/latexdraw
- for Mac OS X,
/Users/Shared/latexdraw
- for Vista,
ProgramData\latexdraw
- for other Windows,
All Users\Application Data\latexdraw
For Linux, the installer will create a script in /usr/bin
to launch LaTeXDraw (if the installer is launched as root).
On Windows the installer creates a shortcut.
The first execution of LaTeXDraw will create the profile of the current user in the following location:
- for Unix,
~/.latexdraw
- for Max OS X,
<user>/Library/Preferences/latexdraw
- for Vista,
<user>\AppData\Local\latexdraw
- for other Windows,
<user>\Application Data\latexdraw
This profile contains the preferences of the user and its templates.
If you are not able to install LaTeXDraw using these processes, the folder 'data' contains all the required files that you can put in a folder manually. To launch the application, runs the file latexdraw.jar.
Since the version 4.0, the program convert
provided by ImageMagick is used to automatically convert: eps/pdf images in a raster format (to be used within LaTeXDraw); raster pictures (png/jpg/etc.) in eps (required by the LaTeX compilation).
You can either install ImageMagick (available on Linux repositories, or see: https://imagemagick.org) or convert manually your pictures (using Gimp, Inkscape, etc.) to have in the same folder two pictures, one in the EPS format and one in a raster format, for example:
C://foo/bar/pic.png
C://foo/bar/pic.eps
Latexdraw is a vector-drawing editor for LaTeX. It uses the graphical LaTeX language PSTricks for producing either:
- PSTricks code that can be integrated into LaTeX documents.
- PS/PDF pictures that can be included into LaTeX documents without any compilation constraint.
The PSTricks code corresponding to the current drawing is automatically generated and updated in its dedicated tab PST
.
Various shapes can be created by clicking on the corresponding button.
Lines, polygons, and Bézier curves can be created by clicking on the drawing area (the canvas). Left-clicking adds a point. Right-clicking or middle-clicking stops the creation. Simple lines (2 points) or chained-lines (more than 2 points) can be produced. A polygon must contains at least 3 points. Pressing the key escape
during the editing stops the process.
Rectangles, ellipses, triangle, and rhombuses can be created using the same process: a drag-and-drop (DnD, press-move*-release) must be performed on the canvas to produce the shape. Pressing the key escape
during the editing stops the process.
Squares circles, and arcs can be created using the same process: a drag-and-drop (DnD, press-move*-release) must be performed on the canvas to produce the shape. Contrary to rectangles and co, the position of the mouse pressure identifies the centre of the shape. Moving the mouse thus defines their width. Pressing the key escape
during the editing stops the process.
Dots, grids and axes can be created by clicking on the canvas.
As grids and axes, text shapes can be created by clicking on the canvas. Then, a text field appears to define the text following the LaTeX format.More details on how to obtain a LaTeX rendering is provided in the next section.
Freehand shapes can be created by pressing on the canvas on moving the mouse. Points are created until releasing the mouse button. Pressing the key escape
during the editing stops the process.
Pictures can be added to a drawing. Clicking on the canvas shows a file chooser that permits to select the picture to include. It is not possible to include ps/pdf pictures yet. To be usable in the LaTeX environment, the picture is converted in postscript. So, a ps file is normally created near the original file. This ps file is used during the compilation in pdf/ps and in the pstricks code.
PSTricks code can be inserted in the drawing (converted in shapes). Clicking on the button dedicated for this purpose displays a window with a text area. In this text area can be put the PSTricks code. All the PSTricks commands are not managed yet. Only commands generated by Latexdraw should be used here.
Texts added to a drawing can be rendered in LaTeX. LaTeX commands may need specific packages to be complied. These packages can be defined by clicking on the button: at the bottom of the user interface. A text area appears and the package can be put there.
Recurrent packages can be put in the preferences dialogue box (Edit
-> Preferences
-> LaTeX
tab).
In the text field you can write as in your LaTeX editor. For instance, you can set the font size by typing in the text field: \Huge my text
. Commands used in one text shape do not have any side effect on the other text shapes of the drawing.
Typing the key combo shift-enter
permits to create a new line in the text field (not in the rendered LaTeX text). For the moment, the commands \\
and \newline
do not create a new line in the rendered LaTeX text. So, the only way to do that is to use \begin{tabular}
.
If a text is not rendered in LaTeX, check the error message: put the cursor over the text, the error message should appear.
You can also open the text panel and look at the log.
Then, you can check that:
- All the required packages are used. Maybe some math or internationalisation packages are missing. Check the wikibook on LaTeX, notably the internationalisation and math pages.
- There is no LaTeX error
- You have LaTeX and all the PSTricks packages installed
Shapes can be selected in the selection mode (button ). A shape can be selected by clicking on it or by doing a drag-and-drop on the canvas to intersect the wanted shapes. All the shapes can be selected using the shortcut ctrl+A
.
When shapes are selected, handlers appear.
2 standard handlers exists: a unique rotation handler and 8 scaling handlers. Pressing on a handler and moving it rotates or scales the selected shape(s). When shapes are selected they can be moved by:
- left-pressing on one of the selected shapes and moving the mouse.
- right-pressing anywhere on the canvas and moving the mouse.
Some shapes provide with handlers to edit some specific properties. For arcs, 2 rectangular handlers exist to set the arc angles. Drag-n-droping them changes the arc's angles.
Similarly, polygons, lines, and bézier curves have rectangular handler to move each point. Drag-n-droping them moves the targeted point. Bézier curves also have rounded handlers to edit the control points of each points.
All the other properties can be edited using the widgets located in the toolbar at the bottom of the user interface. There is 2 ways for setting shape properties:
- Before creating a shape you can set properties (i.e. customising the pencil). Then, these properties will be applied to all the shapes created afterwards.
- After having created shapes you can select them and set properties. In this case, the properties will be applied to the selected shapes only.
The different properties are grouped by concern:
- This toolbar allows the editing of the border line of shapes: thickness, colour, line style, border position, corner roundness.
- This toolbar concerns the double border line of shapes: having double border line or not, the colour of the gap; the size of the gap.