Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix verbose option #166

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- Fixing the installation of svg2tikz as command line tool
- Wrapping line now respect newline
- Fixing error on treating polylines and polygones
- Verbose option to add name of shapes and layers
### Security

## v2.1.0 - 2023/06/28
Expand Down
3 changes: 2 additions & 1 deletion svg2tikz/tikz_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,8 @@ def _handle_group(self, groupnode):
if len(options) > 0 or self.options.verbose:
# Remove it from the list
if hide or self.options.verbose:
options.remove("none")
if "none" in options:
options.remove("none")

pstyles = [",".join(options)]

Expand Down
5 changes: 5 additions & 0 deletions tests/test_complete_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def test_circle(self):
filename = "circle"
create_test_from_filename(filename, self)

def test_circle_verbose(self):
"""Test complete convert circle"""
filename = "circle_verbose"
create_test_from_filename(filename, self, verbose=True)

def test_ellipse(self):
"""Test complete convert ellipse"""
filename = "ellipse"
Expand Down
49 changes: 49 additions & 0 deletions tests/testfiles/circle_verbose.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions tests/testfiles/circle_verbose.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\begin{document}


\def \globalscale {1.000000}
\begin{tikzpicture}[y=1cm, x=1cm, yscale=\globalscale,xscale=\globalscale, inner sep=0pt, outer sep=0pt]
\begin{scope}[]%% layer1
%path1573
\path[draw=black,line cap=,line width=0.2cm] (2.7319, 26.8727) circle (2.2948cm);



\end{scope}

\end{tikzpicture}
\end{document}